From 3cb5c086a327ae39c79bdfa25c0e6bd0a1924b99 Mon Sep 17 00:00:00 2001 From: henry jordan Date: Mon, 18 Apr 2022 14:49:20 +0000 Subject: [PATCH 1/8] PMCORE-3975 --- .../assets/js/home/Draft/defaultMixins.js | 27 +------------------ .../assets/js/home/Inbox/defaultMixins.js | 27 +------------------ .../assets/js/home/Paused/defaultMixins.js | 27 +------------------ .../js/home/Unassigned/defaultMixins.js | 27 +------------------ 4 files changed, 4 insertions(+), 104 deletions(-) diff --git a/resources/assets/js/home/Draft/defaultMixins.js b/resources/assets/js/home/Draft/defaultMixins.js index 77160c820..bff9bea95 100644 --- a/resources/assets/js/home/Draft/defaultMixins.js +++ b/resources/assets/js/home/Draft/defaultMixins.js @@ -71,7 +71,7 @@ export default { "task" ], requestFunction(data) { - return that.getCases(data); + return that.getCasesViewMore(data); }, requestFunctionViewMore(data) { return that.getCasesViewMore(data); @@ -83,31 +83,6 @@ export default { }, methods: { - /** - * Get cases for Vue Card View - */ - getCases(data) { - let that = this, - dt, - filters = {}; - _.forIn(this.filters, function (item, key) { - filters[item.filterVar] = item.value; - }); - return new Promise((resolutionFunc, rejectionFunc) => { - api.cases - .draft(filters) - .then((response) => { - dt = that.formatDataResponse(response.data.data); - resolutionFunc({ - data: dt, - count: response.data.total, - }); - }) - .catch((e) => { - rejectionFunc(e); - }); - }); - }, /** * Get cases for Vue Card View */ diff --git a/resources/assets/js/home/Inbox/defaultMixins.js b/resources/assets/js/home/Inbox/defaultMixins.js index 48d73637e..8af1d64c1 100644 --- a/resources/assets/js/home/Inbox/defaultMixins.js +++ b/resources/assets/js/home/Inbox/defaultMixins.js @@ -74,7 +74,7 @@ export default { "send_by", ], requestFunction(data) { - return that.getCases(data); + return that.getCasesViewMore(data); }, requestFunctionViewMore(data) { return that.getCasesViewMore(data); @@ -86,31 +86,6 @@ export default { }, methods: { - /** - * Get cases for Vue Card View - */ - getCases(data) { - let that = this, - dt, - filters = {}; - _.forIn(this.filters, function (item, key) { - filters[item.filterVar] = item.value; - }); - return new Promise((resolutionFunc, rejectionFunc) => { - api.cases - .todo(filters) - .then((response) => { - dt = that.formatDataResponse(response.data.data); - resolutionFunc({ - data: dt, - count: response.data.total, - }); - }) - .catch((e) => { - rejectionFunc(e); - }); - }); - }, /** * Get cases for Vue Card View */ diff --git a/resources/assets/js/home/Paused/defaultMixins.js b/resources/assets/js/home/Paused/defaultMixins.js index c01e6b9a0..d5cdc3afd 100644 --- a/resources/assets/js/home/Paused/defaultMixins.js +++ b/resources/assets/js/home/Paused/defaultMixins.js @@ -73,7 +73,7 @@ export default { "send_by", ], requestFunction(data) { - return that.getCases(data); + return that.getCasesViewMore(data); }, requestFunctionViewMore(data) { return that.getCasesViewMore(data); @@ -85,31 +85,6 @@ export default { }, methods: { - /** - * Get cases for Vue Card View - */ - getCases(data) { - let that = this, - dt, - filters = {}; - _.forIn(this.filters, function (item, key) { - filters[item.filterVar] = item.value; - }); - return new Promise((resolutionFunc, rejectionFunc) => { - api.cases - .paused(filters) - .then((response) => { - dt = that.formatDataResponse(response.data.data); - resolutionFunc({ - data: dt, - count: response.data.total, - }); - }) - .catch((e) => { - rejectionFunc(e); - }); - }); - }, /** * Get cases for Vue Card View */ diff --git a/resources/assets/js/home/Unassigned/defaultMixins.js b/resources/assets/js/home/Unassigned/defaultMixins.js index 40e490cab..7d1a5cb68 100644 --- a/resources/assets/js/home/Unassigned/defaultMixins.js +++ b/resources/assets/js/home/Unassigned/defaultMixins.js @@ -73,7 +73,7 @@ export default { "send_by", ], requestFunction(data) { - return that.getCases(data); + return that.getCasesViewMore(data); }, requestFunctionViewMore(data) { return that.getCasesViewMore(data); @@ -85,31 +85,6 @@ export default { }, methods: { - /** - * Get cases for Vue Card View - */ - getCases(data) { - let that = this, - dt, - filters = {}; - _.forIn(this.filters, function (item, key) { - filters[item.filterVar] = item.value; - }); - return new Promise((resolutionFunc, rejectionFunc) => { - api.cases - .unassigned(filters) - .then((response) => { - dt = that.formatDataResponse(response.data.data); - resolutionFunc({ - data: dt, - count: response.data.total, - }); - }) - .catch((e) => { - rejectionFunc(e); - }); - }); - }, /** * Get cases for Vue Card View */ From a0ec1a238cc402d8d8f47c9d9c827f01b745cc6d Mon Sep 17 00:00:00 2001 From: "Paula.Quispe" Date: Mon, 18 Apr 2022 11:27:05 -0400 Subject: [PATCH 2/8] PMCORE-3695 --- .../src/ProcessMaker/BusinessModel/Cases/Search.php | 4 ++-- .../engine/src/ProcessMaker/Model/Delegation.php | 12 ++---------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/Cases/Search.php b/workflow/engine/src/ProcessMaker/BusinessModel/Cases/Search.php index 880aed728..6d435df02 100644 --- a/workflow/engine/src/ProcessMaker/BusinessModel/Cases/Search.php +++ b/workflow/engine/src/ProcessMaker/BusinessModel/Cases/Search.php @@ -91,13 +91,13 @@ class Search extends AbstractCases // Filter by user who started if ($this->getUserStartedId()) { // Get the case numbers related to this filter - $result = Delegation::casesStartedBy($this->getUserStartedId(), $this->getOffset(), $this->getLimit()); + $result = Delegation::casesStartedBy($this->getUserStartedId()); $query->specificCases($result); } // Filter by user who completed if ($this->getUserCompletedId()) { // Get the case numbers related to this filter - $result = Delegation::casesCompletedBy($this->getUserCompletedId(), $this->getOffset(), $this->getLimit()); + $result = Delegation::casesCompletedBy($this->getUserCompletedId()); $query->specificCases($result); } // Filter by task diff --git a/workflow/engine/src/ProcessMaker/Model/Delegation.php b/workflow/engine/src/ProcessMaker/Model/Delegation.php index 56fcb2fd6..de0494c45 100644 --- a/workflow/engine/src/ProcessMaker/Model/Delegation.php +++ b/workflow/engine/src/ProcessMaker/Model/Delegation.php @@ -2131,12 +2131,10 @@ class Delegation extends Model * Get cases completed by specific user * * @param int $userId - * @param int $offset - * @param int $limit * * @return array */ - public static function casesCompletedBy(int $userId, int $offset = 0, int $limit = 15) + public static function casesCompletedBy(int $userId) { // Get the case numbers related to this filter $query = Delegation::query()->select(['APP_NUMBER']); @@ -2144,8 +2142,6 @@ class Delegation extends Model $query->participated($userId); // Filter the last thread $query->lastThread(); - // Apply the limit - $query->offset($offset)->limit($limit); // Get the result $results = $query->get(); @@ -2156,12 +2152,10 @@ class Delegation extends Model * Get cases started by specific user * * @param int $userId - * @param int $offset - * @param int $limit * * @return array */ - public static function casesStartedBy(int $userId, int $offset = 0, int $limit = 15) + public static function casesStartedBy(int $userId) { // Get the case numbers related to this filter $query = Delegation::query()->select(['APP_NUMBER']); @@ -2169,8 +2163,6 @@ class Delegation extends Model $query->participated($userId); // Filter the first thread $query->caseStarted(); - // Apply the limit - $query->offset($offset)->limit($limit); // Get the result $results = $query->get(); From ddeb313ce4ffb558b880fa3e5f1e46800c5ee9c1 Mon Sep 17 00:00:00 2001 From: "Paula.Quispe" Date: Tue, 19 Apr 2022 09:36:52 -0400 Subject: [PATCH 3/8] PMCORE-805 --- .../engine/content/translations/english/processmaker.en.po | 4 ++-- workflow/engine/data/mysql/insert.sql | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/workflow/engine/content/translations/english/processmaker.en.po b/workflow/engine/content/translations/english/processmaker.en.po index 2aa2d818b..7e0b01b27 100755 --- a/workflow/engine/content/translations/english/processmaker.en.po +++ b/workflow/engine/content/translations/english/processmaker.en.po @@ -4016,8 +4016,8 @@ msgstr "Case Description" # TRANSLATION # LABEL/ID_CASE_DOES_NOT_EXIST #: LABEL/ID_CASE_DOES_NOT_EXIST -msgid "Case {CASE_NUMBER} does not exist" -msgstr "Case {CASE_NUMBER} does not exist" +msgid "Case {0} does not exist" +msgstr "Case {0} does not exist" # TRANSLATION # LABEL/ID_CASE_DOES_NOT_EXIST2 diff --git a/workflow/engine/data/mysql/insert.sql b/workflow/engine/data/mysql/insert.sql index 453774339..78ac0c827 100755 --- a/workflow/engine/data/mysql/insert.sql +++ b/workflow/engine/data/mysql/insert.sql @@ -57481,7 +57481,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE ( 'LABEL','ID_CASE_DELETED_SUCCESSFULLY','en','The Case {APP_NUMBER} was deleted successfully!','2014-01-15') , ( 'LABEL','ID_CASE_DEL_INDEX_DOES_NOT_EXIST','en','The case {0}: {1} with {2}: {3} does not exist.','2015-09-30') , ( 'LABEL','ID_CASE_DESCRIPTION','en','Case Description','2014-01-15') , -( 'LABEL','ID_CASE_DOES_NOT_EXIST','en','Case {CASE_NUMBER} does not exist','2014-01-15') , +( 'LABEL','ID_CASE_DOES_NOT_EXIST','en','Case {0} does not exist','2022-04-19') , ( 'LABEL','ID_CASE_DOES_NOT_EXIST2','en','The case with {0}: {1} does not exist.','2014-06-05') , ( 'LABEL','ID_CASE_DOES_NOT_EXISTS','en','This case does not exist','2014-01-15') , ( 'LABEL','ID_CASE_DOES_NOT_EXIST_JS','en','Case {0} does not exist','2014-01-15') , From 5769c880ac590d163d57018d509a1274d12bf3d2 Mon Sep 17 00:00:00 2001 From: henry jordan Date: Tue, 19 Apr 2022 21:56:07 +0000 Subject: [PATCH 4/8] PMCORE-3703 --- .../customCaseList/CaseListSketch.vue | 22 ++++++++++++++----- .../js/admin/settings/customCaseList/main.js | 1 - .../js/home/CustomCaseList/CustomCaseList.vue | 5 ++++- .../src/ProcessMaker/Model/CaseList.php | 2 +- 4 files changed, 22 insertions(+), 8 deletions(-) diff --git a/resources/assets/js/admin/settings/customCaseList/CaseListSketch.vue b/resources/assets/js/admin/settings/customCaseList/CaseListSketch.vue index d9c198e22..b19aff3ef 100644 --- a/resources/assets/js/admin/settings/customCaseList/CaseListSketch.vue +++ b/resources/assets/js/admin/settings/customCaseList/CaseListSketch.vue @@ -250,15 +250,27 @@ > - - + disabled + > + + + @@ -294,7 +306,6 @@