From 0b5ef35d222123a86394cd46a910b213f05b6c2a Mon Sep 17 00:00:00 2001 From: sergiodt Date: Mon, 25 Nov 2024 16:16:47 +0100 Subject: [PATCH 1/2] feat: refs #8213 refs#8213 picker ItemShelvingSale --- back/methods/collection/getTickets.js | 8 ++++++-- modules/ticket/back/models/saleGroup.json | 7 ++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/back/methods/collection/getTickets.js b/back/methods/collection/getTickets.js index 3c2f6cb2d..677c9e444 100644 --- a/back/methods/collection/getTickets.js +++ b/back/methods/collection/getTickets.js @@ -63,7 +63,8 @@ module.exports = Self => { p.pickingOrder pickingOrder, iss.id itemShelvingSaleFk, iss.isPicked, - iss.itemShelvingFk + iss.itemShelvingFk, + st.code stateCode FROM ticketCollection tc LEFT JOIN collection c ON c.id = tc.collectionFk JOIN sale s ON s.ticketFk = tc.ticketFk @@ -77,6 +78,7 @@ module.exports = Self => { LEFT JOIN parking p ON p.id = sh.parkingFk LEFT JOIN itemColor ic ON ic.itemFk = s.itemFk LEFT JOIN origin o ON o.id = i.originFk + LEFT JOIN state st ON st.id = sg.stateFk WHERE tc.collectionFk = ? GROUP BY s.id, ish.id, p.code, p2.code UNION ALL @@ -104,7 +106,8 @@ module.exports = Self => { p.pickingOrder, iss.id itemShelvingSaleFk, iss.isPicked, - iss.itemShelvingFk + iss.itemShelvingFk, + st.code stateCode FROM sectorCollection sc JOIN sectorCollectionSaleGroup ss ON ss.sectorCollectionFk = sc.id JOIN saleGroup sg ON sg.id = ss.saleGroupFk @@ -118,6 +121,7 @@ module.exports = Self => { LEFT JOIN parking p ON p.id = sh.parkingFk LEFT JOIN itemColor ic ON ic.itemFk = s.itemFk LEFT JOIN origin o ON o.id = i.originFk + LEFT JOIN state st ON st.id = sg.stateFk WHERE sc.id = ? AND sgd.saleGroupFk GROUP BY s.id, ish.id, p.code, p2.code`, [id, id], myOptions); diff --git a/modules/ticket/back/models/saleGroup.json b/modules/ticket/back/models/saleGroup.json index aa78b4167..5f432b514 100644 --- a/modules/ticket/back/models/saleGroup.json +++ b/modules/ticket/back/models/saleGroup.json @@ -29,6 +29,11 @@ "type": "belongsTo", "model": "Parking", "foreignKey": "parkingFk" + }, + "state": { + "type": "belongsTo", + "model": "State", + "foreignKey": "stateFk" } } -} +} \ No newline at end of file From f6941928cd0a074fdbd87431f967df4535fba6f9 Mon Sep 17 00:00:00 2001 From: sergiodt Date: Mon, 25 Nov 2024 16:20:25 +0100 Subject: [PATCH 2/2] feat: refs #8213 refs#8213 picker ItemShelvingSale --- db/versions/11362-limeLilium/00-firstScript.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 db/versions/11362-limeLilium/00-firstScript.sql diff --git a/db/versions/11362-limeLilium/00-firstScript.sql b/db/versions/11362-limeLilium/00-firstScript.sql new file mode 100644 index 000000000..4a7c5b742 --- /dev/null +++ b/db/versions/11362-limeLilium/00-firstScript.sql @@ -0,0 +1,4 @@ + + +INSERT INTO salix.ACL (model, property, accessType, permission, principalType, principalId) +VALUES('SaleGroup', 'find', 'READ', 'ALLOW', 'ROLE', 'production'); \ No newline at end of file