From 1353a0987d80e3f3f7a27b867d5b323d96b4881a Mon Sep 17 00:00:00 2001 From: joan Date: Mon, 4 Jan 2021 09:22:32 +0100 Subject: [PATCH 1/2] 2700 - Closure by multiple agencies --- print/methods/closure.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/print/methods/closure.js b/print/methods/closure.js index 1df9564bd..2a7ac19fb 100644 --- a/print/methods/closure.js +++ b/print/methods/closure.js @@ -73,7 +73,7 @@ module.exports = app => { } }); - app.get('/api/closure/by-agency', async function(req, res) { + app.get('/api/closure/by-agency', async function(req, res, next) { try { const reqArgs = req.args; if (!reqArgs.agencyModeId) @@ -89,6 +89,7 @@ module.exports = app => { message: 'Task executed successfully' }); + const agenciesId = reqArgs.agencyModeId.split(','); const tickets = await db.rawSql(` SELECT t.id @@ -97,12 +98,12 @@ module.exports = app => { JOIN ticketState ts ON ts.ticketFk = t.id JOIN alertLevel al ON al.alertLevel = ts.alertLevel WHERE al.code = 'PACKED' - AND t.agencyModeFk = :agencyModeId + AND t.agencyModeFk IN(:agencyModeId) AND t.warehouseFk = :warehouseId AND DATE(t.shipped) BETWEEN DATE_ADD(:to, INTERVAL -2 DAY) AND :to AND t.refFk IS NULL GROUP BY e.ticketFk`, { - agencyModeId: reqArgs.agencyModeId, + agencyModeId: agenciesId, warehouseId: reqArgs.warehouseId, to: reqArgs.to }); @@ -114,7 +115,7 @@ module.exports = app => { } }); - app.get('/api/closure/by-route', async function(req, res) { + app.get('/api/closure/by-route', async function(req, res, next) { try { const reqArgs = req.args; if (!reqArgs.routeId) From 9aca59e47a8727b531b533953349d8f2e50f9295 Mon Sep 17 00:00:00 2001 From: joan Date: Mon, 4 Jan 2021 14:16:12 +0100 Subject: [PATCH 2/2] CSS height fix --- front/salix/components/upload-photo/style.scss | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/front/salix/components/upload-photo/style.scss b/front/salix/components/upload-photo/style.scss index 9f69b3964..609364a2c 100644 --- a/front/salix/components/upload-photo/style.scss +++ b/front/salix/components/upload-photo/style.scss @@ -17,9 +17,7 @@ & > div > img[ng-src] { width: 256px; height: 256px; - display: block; - height: 100%; - width: 100%; + display: block } }