From e286d68a60df6ef75c46866f47883217c40b3e3b Mon Sep 17 00:00:00 2001 From: Joe Fitter Date: Mon, 30 Dec 2019 18:37:23 +0000 Subject: [PATCH 1/2] Feature - billing * updated datatable reducer to have own schema, this prevents clashing when a form and a datatable are on the same page * added modelHistory method to workflow helper - this returns all tasks for a model, filtered by status and action --- lib/workflow/client.js | 4 ++++ ui/reducers/datatable.js | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/workflow/client.js b/lib/workflow/client.js index a988e6d..f9bb907 100644 --- a/lib/workflow/client.js +++ b/lib/workflow/client.js @@ -136,6 +136,10 @@ class Workflow { openTasks(modelId) { return this.client(`/model-tasks/${modelId}`); } + + modelHistory(modelId, query) { + return this.client(`/model-history/${modelId}`, { query }); + } } module.exports = Workflow; diff --git a/ui/reducers/datatable.js b/ui/reducers/datatable.js index d665f4a..fd95610 100644 --- a/ui/reducers/datatable.js +++ b/ui/reducers/datatable.js @@ -37,5 +37,6 @@ module.exports = combineReducers({ filters, sort, pagination, - data + data, + schema: (state = {}) => state }); From b758abf65ddfbe732ed0bd7df9216bed464a0417 Mon Sep 17 00:00:00 2001 From: Leonard Martin Date: Tue, 7 Jan 2020 10:51:50 +0000 Subject: [PATCH 2/2] Remove helper function that is no longer needed --- lib/workflow/client.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/workflow/client.js b/lib/workflow/client.js index f9bb907..a988e6d 100644 --- a/lib/workflow/client.js +++ b/lib/workflow/client.js @@ -136,10 +136,6 @@ class Workflow { openTasks(modelId) { return this.client(`/model-tasks/${modelId}`); } - - modelHistory(modelId, query) { - return this.client(`/model-history/${modelId}`, { query }); - } } module.exports = Workflow;