From 11113a9e671c8093dfe04e7975690036242523c5 Mon Sep 17 00:00:00 2001 From: henry jordan Date: Tue, 26 Apr 2022 12:33:53 +0000 Subject: [PATCH] PMCORE-3703-D PMCORE-3703-D update update update 1 --- .../admin/settings/customCaseList/CaseListSketch.vue | 8 ++++++-- .../assets/js/home/CustomCaseList/CustomCaseList.vue | 12 +++++------- .../assets/js/home/CustomCaseList/defaultMixins.js | 4 ++-- workflow/engine/src/ProcessMaker/Model/CaseList.php | 11 ++++++++++- 4 files changed, 23 insertions(+), 12 deletions(-) diff --git a/resources/assets/js/admin/settings/customCaseList/CaseListSketch.vue b/resources/assets/js/admin/settings/customCaseList/CaseListSketch.vue index b19aff3ef..cebf88d51 100644 --- a/resources/assets/js/admin/settings/customCaseList/CaseListSketch.vue +++ b/resources/assets/js/admin/settings/customCaseList/CaseListSketch.vue @@ -251,7 +251,7 @@ elem.set === true); this.dataCaseList.forEach(function (value) { //Force to false in process_category & process_name - if (value.enableFilter && (value.field != "process_category" && value.field != "process_name" )) { + if (value.enableFilter && !that.disabledField(value.field)) { that.enabledFilterRows.push(value.field); } }); @@ -741,6 +741,10 @@ export default { columns.push('actions'); columns.unshift('detail'); return columns + }, + disabledField(field){ + const fields = [ "due_date" , "process_category" , "process_name" , "priority" ]; + return !(fields.indexOf(field) == -1); } }, }; diff --git a/resources/assets/js/home/CustomCaseList/CustomCaseList.vue b/resources/assets/js/home/CustomCaseList/CustomCaseList.vue index 190a510e5..b01f34bad 100644 --- a/resources/assets/js/home/CustomCaseList/CustomCaseList.vue +++ b/resources/assets/js/home/CustomCaseList/CustomCaseList.vue @@ -127,7 +127,7 @@ {{ props["item"]["CASE_NUMBER"] }} - + {{ props["item"]["THREAD_TITLE"] }} @@ -184,7 +184,7 @@ {{ props["item"]["CASE_NUMBER"] }} - + {{ props["item"]["THREAD_TITLE"] }} @@ -398,7 +398,7 @@ export default { }, itemMap: { case_number: "caseNumber", - task_title: "taskTitle", + task: "taskTitle", thread_title: "caseTitle", delegation_date: "delegationDate", send_by: "bySendBy", @@ -810,9 +810,7 @@ export default { } } that.headings[item.field] = item.name; - if(item.enableFilter){ - columns.push(item.field); - } + columns.push(item.field); }); that.filterItems = newItems; dt = that.formatDataResponse(response.data.data); @@ -849,7 +847,7 @@ export default { product.optionLabel = item.name; product.tagPrefix = item.name; if (product.items && product.items[0]) { - product.items[0].id = item.field; + product.items[0].id = item.idFilter?item.idFilter : item.field; } product.placeholder = ""; return product; diff --git a/resources/assets/js/home/CustomCaseList/defaultMixins.js b/resources/assets/js/home/CustomCaseList/defaultMixins.js index e79dcfb2c..383308894 100644 --- a/resources/assets/js/home/CustomCaseList/defaultMixins.js +++ b/resources/assets/js/home/CustomCaseList/defaultMixins.js @@ -11,7 +11,7 @@ export default { dataCasesList: [], defaultColumns: [ "case_number", - "thread_title", + "case_title", "process_name", "task", "send_by", @@ -69,7 +69,7 @@ export default { }, headings: { case_number: this.$i18n.t("ID_MYCASE_NUMBER"), - thread_title: this.$i18n.t('ID_CASE_THREAD_TITLE'), + case_title: this.$i18n.t('ID_CASE_THREAD_TITLE'), process_name: this.$i18n.t("ID_PROCESS_NAME"), task: this.$i18n.t("ID_TASK"), send_by: this.$i18n.t("ID_SEND_BY"), diff --git a/workflow/engine/src/ProcessMaker/Model/CaseList.php b/workflow/engine/src/ProcessMaker/Model/CaseList.php index c825f20a8..29025851e 100644 --- a/workflow/engine/src/ProcessMaker/Model/CaseList.php +++ b/workflow/engine/src/ProcessMaker/Model/CaseList.php @@ -366,6 +366,7 @@ class CaseList extends Model [ 'list' => ['inbox', 'draft', 'paused', 'unassigned'], 'field' => 'case_number', + 'idFilter' => 'case_number', 'name' => G::LoadTranslation('ID_MYCASE_NUMBER'), 'type' => 'integer', 'source' => 'APPLICATION', @@ -375,6 +376,7 @@ class CaseList extends Model ], [ 'list' => ['inbox', 'draft', 'paused', 'unassigned'], 'field' => 'case_title', + 'idFilter' => 'caseTitle', 'name' => G::LoadTranslation('ID_CASE_THREAD_TITLE'), 'type' => 'string', 'source' => 'APPLICATION', @@ -384,6 +386,7 @@ class CaseList extends Model ], [ 'list' => ['inbox', 'draft', 'paused', 'unassigned'], 'field' => 'process_category', + 'idFilter' => 'process_category', 'name' => G::LoadTranslation('ID_PROCESS_CATEGORY'), 'type' => 'string', 'source' => 'APPLICATION', @@ -393,6 +396,7 @@ class CaseList extends Model ], [ 'list' => ['inbox', 'draft', 'paused', 'unassigned'], 'field' => 'process_name', + 'idFilter' => 'process_name', 'name' => G::LoadTranslation('ID_PROCESS_NAME'), 'type' => 'string', 'source' => 'APPLICATION', @@ -401,7 +405,8 @@ class CaseList extends Model 'set' => true ], [ 'list' => ['inbox', 'draft', 'paused', 'unassigned'], - 'field' => 'task_title', + 'field' => 'task', + 'idFilter' => 'task', 'name' => G::LoadTranslation('ID_TASK'), 'type' => 'string', 'source' => 'APPLICATION', @@ -411,6 +416,7 @@ class CaseList extends Model ], [ 'list' => ['inbox', 'draft', 'paused', 'unassigned'], 'field' => 'send_by', + 'idFilter' => 'send_by', 'name' => G::LoadTranslation('ID_SEND_BY'), 'type' => 'string', 'source' => 'APPLICATION', @@ -420,6 +426,7 @@ class CaseList extends Model ], [ 'list' => ['inbox', 'paused', 'unassigned'], 'field' => 'due_date', + 'idFilter' => 'due_date', 'name' => G::LoadTranslation('ID_DUE_DATE'), 'type' => 'date', 'source' => 'APPLICATION', @@ -429,6 +436,7 @@ class CaseList extends Model ], [ 'list' => ['inbox', 'paused', 'unassigned'], 'field' => 'delegation_date', + 'idFilter' => 'delegation_date', 'name' => G::LoadTranslation('ID_DELEGATION_DATE'), 'type' => 'date', 'source' => 'APPLICATION', @@ -438,6 +446,7 @@ class CaseList extends Model ], [ 'list' => ['inbox', 'draft', 'paused', 'unassigned'], 'field' => 'priority', + 'idFilter' => 'priority', 'name' => G::LoadTranslation('ID_PRIORITY'), 'type' => 'string', 'source' => 'APPLICATION',