From bb0745532be6af321b4fa781076e552ef5207622 Mon Sep 17 00:00:00 2001 From: alex Date: Tue, 2 Nov 2021 11:24:52 +0100 Subject: [PATCH 1/2] fix(claim): salesPersonFk where add officeBoss --- modules/claim/front/search-panel/index.html | 2 +- modules/item/front/request-search-panel/index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/claim/front/search-panel/index.html b/modules/claim/front/search-panel/index.html index b6ac71989..6efd6603b 100644 --- a/modules/claim/front/search-panel/index.html +++ b/modules/claim/front/search-panel/index.html @@ -28,7 +28,7 @@ url="Workers/activeWithRole" search-function="{firstName: $search}" value-field="id" - where="{role: 'salesPerson'}" + where="{role: {inq: ['salesPerson', 'officeBoss']}}" label="Salesperson"> {{firstName}} {{name}} diff --git a/modules/item/front/request-search-panel/index.html b/modules/item/front/request-search-panel/index.html index 299c08d51..8c9d04b64 100644 --- a/modules/item/front/request-search-panel/index.html +++ b/modules/item/front/request-search-panel/index.html @@ -20,7 +20,7 @@ url="Workers/activeWithRole" search-function="{firstName: $search}" value-field="id" - wwhere="{role: {inq: ['logistic', 'buyer']}}" + where="{role: {inq: ['logistic', 'buyer']}}" label="Atender"> {{nickname}} From 7dc95b8cbfbdbb688683403847904c72874fcbde Mon Sep 17 00:00:00 2001 From: joan Date: Mon, 8 Nov 2021 12:50:13 +0100 Subject: [PATCH 2/2] Group first --- modules/order/back/methods/order/filter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/order/back/methods/order/filter.js b/modules/order/back/methods/order/filter.js index bd987dd5b..ddbaba5bd 100644 --- a/modules/order/back/methods/order/filter.js +++ b/modules/order/back/methods/order/filter.js @@ -172,11 +172,11 @@ module.exports = Self => { LEFT JOIN zoneEstimatedDelivery zed ON zed.zoneFk = t.zoneFk`); stmt.merge(conn.makeWhere(filter.where)); + stmt.merge(`GROUP BY id`); stmt.merge(conn.makePagination(filter)); stmts.push(stmt); stmt = new ParameterizedSQL(`SELECT * FROM tmp.filter`); - stmt.merge(`GROUP BY id`); stmt.merge(conn.makeOrderBy(filter.order)); const ordersIndex = stmts.push(stmt) - 1;