From 15dee8bef442e17c56375e382c6c5d6ba5f19316 Mon Sep 17 00:00:00 2001 From: alexm Date: Mon, 17 Jul 2023 15:19:36 +0200 Subject: [PATCH 01/13] refs #5976 refactor: transaferSale call setDeleted --- db/changes/233001/00-setDeleted_acl.sql | 6 ++++++ .../ticket/back/methods/ticket/specs/transferSales.spec.js | 2 ++ modules/ticket/back/methods/ticket/transferSales.js | 7 ++----- 3 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 db/changes/233001/00-setDeleted_acl.sql diff --git a/db/changes/233001/00-setDeleted_acl.sql b/db/changes/233001/00-setDeleted_acl.sql new file mode 100644 index 000000000..1030965dd --- /dev/null +++ b/db/changes/233001/00-setDeleted_acl.sql @@ -0,0 +1,6 @@ +UPDATE `salix`.`ACL` + SET principalId='salesperson' + WHERE + model='Ticket' + AND property='setDeleted' + AND accessType='WRITE'; diff --git a/modules/ticket/back/methods/ticket/specs/transferSales.spec.js b/modules/ticket/back/methods/ticket/specs/transferSales.spec.js index 562688917..61c788b64 100644 --- a/modules/ticket/back/methods/ticket/specs/transferSales.spec.js +++ b/modules/ticket/back/methods/ticket/specs/transferSales.spec.js @@ -5,6 +5,8 @@ describe('sale transferSales()', () => { const userId = 1101; const activeCtx = { accessToken: {userId: userId}, + headers: {origin: ''}, + __: value => value }; const ctx = {req: activeCtx}; diff --git a/modules/ticket/back/methods/ticket/transferSales.js b/modules/ticket/back/methods/ticket/transferSales.js index 0eee50d5f..00fc02f38 100644 --- a/modules/ticket/back/methods/ticket/transferSales.js +++ b/modules/ticket/back/methods/ticket/transferSales.js @@ -96,11 +96,8 @@ module.exports = Self => { } const isTicketEmpty = await models.Ticket.isEmpty(id, myOptions); - if (isTicketEmpty) { - await originalTicket.updateAttributes({ - isDeleted: true - }, myOptions); - } + if (isTicketEmpty) + await models.Ticket.setDeleted(ctx, id, myOptions); if (tx) await tx.commit(); From f07ac89cb6ea7b68033b702a36e13b2b2ec5d32a Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 18 Jul 2023 15:01:04 +0200 Subject: [PATCH 02/13] refs #5976 add custom error --- loopback/locale/es.json | 3 ++- .../ticket/back/methods/ticket/setDeleted.js | 4 +-- .../back/methods/ticket/transferSales.js | 27 +++++++++++++++---- 3 files changed, 26 insertions(+), 8 deletions(-) diff --git a/loopback/locale/es.json b/loopback/locale/es.json index 784ff5e6e..16b0af7f5 100644 --- a/loopback/locale/es.json +++ b/loopback/locale/es.json @@ -305,5 +305,6 @@ "The renew period has not been exceeded": "El periodo de renovación no ha sido superado", "Valid priorities": "Prioridades válidas: %d", "Negative basis of tickets": "Base negativa para los tickets: {{ticketsIds}}", - "You cannot assign an alias that you are not assigned to": "No puede asignar un alias que no tenga asignado" + "You cannot assign an alias that you are not assigned to": "No puede asignar un alias que no tenga asignado", + "This ticket cannot be left empty.": "Este ticket no se puede dejar vacío. %d" } diff --git a/modules/ticket/back/methods/ticket/setDeleted.js b/modules/ticket/back/methods/ticket/setDeleted.js index 878cce056..46c0add6b 100644 --- a/modules/ticket/back/methods/ticket/setDeleted.js +++ b/modules/ticket/back/methods/ticket/setDeleted.js @@ -41,8 +41,8 @@ module.exports = Self => { const isEditable = await Self.isEditable(ctx, id, myOptions); - if (!isEditable) - throw new UserError(`The sales of this ticket can't be modified`); + throw new UserError(`The sales of this ticket can't be modified`); + // if (!isEditable) // Check if ticket has refunds const ticketRefunds = await models.TicketRefund.find({ diff --git a/modules/ticket/back/methods/ticket/transferSales.js b/modules/ticket/back/methods/ticket/transferSales.js index 00fc02f38..2e4bf023d 100644 --- a/modules/ticket/back/methods/ticket/transferSales.js +++ b/modules/ticket/back/methods/ticket/transferSales.js @@ -37,6 +37,7 @@ module.exports = Self => { const userId = ctx.req.accessToken.userId; const models = Self.app.models; const myOptions = {userId}; + const $t = ctx.req.__; // $translate let tx; if (typeof options == 'object') @@ -78,9 +79,9 @@ module.exports = Self => { const saleIds = sales.map(sale => sale.id); - const hasClaimedSales = await models.ClaimBeginning.findOne({where: {saleFk: {inq: saleIds}}}); - if (ticketId != id && hasClaimedSales) - throw new UserError(`Can't transfer claimed sales`); + // const hasClaimedSales = await models.ClaimBeginning.findOne({where: {saleFk: {inq: saleIds}}}); + // if (ticketId != id && hasClaimedSales) + // throw new UserError(`Can't transfer claimed sales`); for (const sale of sales) { const originalSale = map.get(sale.id); @@ -96,14 +97,30 @@ module.exports = Self => { } const isTicketEmpty = await models.Ticket.isEmpty(id, myOptions); - if (isTicketEmpty) - await models.Ticket.setDeleted(ctx, id, myOptions); + if (isTicketEmpty) { + try { + await models.Ticket.setDeleted(ctx, id, myOptions); + } catch (e) { + console.log('e:', e); + console.log('e.message:', e.message); + console.log('e translation:', $t(e.message, {})); + if (e.statusCode === 400) { + throw new UserError( + `This ticket cannot be left empty.`, + 'TRANSFER_SET_DELETED', + $t(e.message) + ); + } + throw e; + } + } if (tx) await tx.commit(); return {id: ticketId}; } catch (e) { if (tx) await tx.rollback(); + console.log('e.UserError:', e); throw e; } }; From 2c79056f3464b4f526a72143567f948e7e4a831f Mon Sep 17 00:00:00 2001 From: alexm Date: Wed, 19 Jul 2023 13:44:04 +0200 Subject: [PATCH 03/13] refs #5976 error extended --- loopback/locale/en.json | 3 ++- loopback/locale/es.json | 2 +- modules/route/front/roadmap/index/index.js | 2 -- modules/ticket/back/methods/ticket/setDeleted.js | 4 ++-- modules/ticket/back/methods/ticket/transferSales.js | 12 ++++-------- 5 files changed, 9 insertions(+), 14 deletions(-) diff --git a/loopback/locale/en.json b/loopback/locale/en.json index 030afbe9e..dde24ddc6 100644 --- a/loopback/locale/en.json +++ b/loopback/locale/en.json @@ -178,5 +178,6 @@ "The renew period has not been exceeded": "The renew period has not been exceeded", "You can not use the same password": "You can not use the same password", "Valid priorities": "Valid priorities: %d", - "Negative basis of tickets": "Negative basis of tickets: {{ticketsIds}}" + "Negative basis of tickets": "Negative basis of tickets: {{ticketsIds}}", + "This ticket cannot be left empty.": "This ticket cannot be left empty. %s" } diff --git a/loopback/locale/es.json b/loopback/locale/es.json index 16b0af7f5..c12b980fa 100644 --- a/loopback/locale/es.json +++ b/loopback/locale/es.json @@ -306,5 +306,5 @@ "Valid priorities": "Prioridades válidas: %d", "Negative basis of tickets": "Base negativa para los tickets: {{ticketsIds}}", "You cannot assign an alias that you are not assigned to": "No puede asignar un alias que no tenga asignado", - "This ticket cannot be left empty.": "Este ticket no se puede dejar vacío. %d" + "This ticket cannot be left empty.": "Este ticket no se puede dejar vacío. %s" } diff --git a/modules/route/front/roadmap/index/index.js b/modules/route/front/roadmap/index/index.js index 3ffc5b4b1..c5f5ef9d1 100644 --- a/modules/route/front/roadmap/index/index.js +++ b/modules/route/front/roadmap/index/index.js @@ -46,8 +46,6 @@ class Controller extends Section { } deleteRoadmaps() { - console.log(this.checked); - for (const roadmap of this.checked) { this.$http.delete(`Roadmaps/${roadmap.id}`) .then(() => this.$.model.refresh()) diff --git a/modules/ticket/back/methods/ticket/setDeleted.js b/modules/ticket/back/methods/ticket/setDeleted.js index 46c0add6b..878cce056 100644 --- a/modules/ticket/back/methods/ticket/setDeleted.js +++ b/modules/ticket/back/methods/ticket/setDeleted.js @@ -41,8 +41,8 @@ module.exports = Self => { const isEditable = await Self.isEditable(ctx, id, myOptions); - throw new UserError(`The sales of this ticket can't be modified`); - // if (!isEditable) + if (!isEditable) + throw new UserError(`The sales of this ticket can't be modified`); // Check if ticket has refunds const ticketRefunds = await models.TicketRefund.find({ diff --git a/modules/ticket/back/methods/ticket/transferSales.js b/modules/ticket/back/methods/ticket/transferSales.js index 2e4bf023d..de52e2f18 100644 --- a/modules/ticket/back/methods/ticket/transferSales.js +++ b/modules/ticket/back/methods/ticket/transferSales.js @@ -79,9 +79,9 @@ module.exports = Self => { const saleIds = sales.map(sale => sale.id); - // const hasClaimedSales = await models.ClaimBeginning.findOne({where: {saleFk: {inq: saleIds}}}); - // if (ticketId != id && hasClaimedSales) - // throw new UserError(`Can't transfer claimed sales`); + const hasClaimedSales = await models.ClaimBeginning.findOne({where: {saleFk: {inq: saleIds}}}); + if (ticketId != id && hasClaimedSales) + throw new UserError(`Can't transfer claimed sales`); for (const sale of sales) { const originalSale = map.get(sale.id); @@ -101,14 +101,11 @@ module.exports = Self => { try { await models.Ticket.setDeleted(ctx, id, myOptions); } catch (e) { - console.log('e:', e); - console.log('e.message:', e.message); - console.log('e translation:', $t(e.message, {})); if (e.statusCode === 400) { throw new UserError( `This ticket cannot be left empty.`, 'TRANSFER_SET_DELETED', - $t(e.message) + $t(e.message, ...e.translateArgs) ); } throw e; @@ -120,7 +117,6 @@ module.exports = Self => { return {id: ticketId}; } catch (e) { if (tx) await tx.rollback(); - console.log('e.UserError:', e); throw e; } }; From b188ae6f570d406cf01664dc9e98706f2ae3c1f1 Mon Sep 17 00:00:00 2001 From: alexm Date: Wed, 19 Jul 2023 14:14:35 +0200 Subject: [PATCH 04/13] refs #5976 fix: e2e --- db/changes/233001/00-setDeleted_acl.sql | 2 +- e2e/paths/05-ticket/14_create_ticket.spec.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/db/changes/233001/00-setDeleted_acl.sql b/db/changes/233001/00-setDeleted_acl.sql index 1030965dd..cdeff9522 100644 --- a/db/changes/233001/00-setDeleted_acl.sql +++ b/db/changes/233001/00-setDeleted_acl.sql @@ -1,5 +1,5 @@ UPDATE `salix`.`ACL` - SET principalId='salesperson' + SET principalId='salesPerson' WHERE model='Ticket' AND property='setDeleted' diff --git a/e2e/paths/05-ticket/14_create_ticket.spec.js b/e2e/paths/05-ticket/14_create_ticket.spec.js index 80c288a01..1f9c0c40a 100644 --- a/e2e/paths/05-ticket/14_create_ticket.spec.js +++ b/e2e/paths/05-ticket/14_create_ticket.spec.js @@ -10,7 +10,7 @@ describe('Ticket create path', () => { beforeAll(async() => { browser = await getBrowser(); page = browser.page; - await page.loginAndModule('employee', 'ticket'); + await page.loginAndModule('salesPerson', 'ticket'); }); afterAll(async() => { From 83d0a394e359a976d286b0ab6c72bdbbd1cc7033 Mon Sep 17 00:00:00 2001 From: alexm Date: Thu, 3 Aug 2023 15:59:09 +0200 Subject: [PATCH 05/13] refs #5973 refactor(item_fetched-tags): restyle empty tags --- modules/item/front/fetched-tags/index.html | 28 +++++++++++----------- modules/item/front/fetched-tags/style.scss | 14 +++++------ 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/modules/item/front/fetched-tags/index.html b/modules/item/front/fetched-tags/index.html index 472fa676b..df5936871 100644 --- a/modules/item/front/fetched-tags/index.html +++ b/modules/item/front/fetched-tags/index.html @@ -1,40 +1,40 @@ - -
+
{{::$ctrl.item.value5}}
-
{{::$ctrl.item.value6}}
-
{{::$ctrl.item.value7}}
-
{{::$ctrl.item.value8}}
-
{{::$ctrl.item.value9}}
-
{{::$ctrl.item.value10}}
- \ No newline at end of file + diff --git a/modules/item/front/fetched-tags/style.scss b/modules/item/front/fetched-tags/style.scss index 2cd7afbb2..250ca07ab 100644 --- a/modules/item/front/fetched-tags/style.scss +++ b/modules/item/front/fetched-tags/style.scss @@ -28,7 +28,7 @@ vn-fetched-tags { & > vn-horizontal { align-items: center; - + max-width: 210px; & > vn-auto { flex-wrap: wrap; @@ -43,19 +43,19 @@ vn-fetched-tags { & > .inline-tag { color: $color-font-secondary; text-align: center; - font-size: .75rem; - height: 12px; + font-size: .8rem; + height: 13px; padding: 1px; width: 64px; min-width: 64px; max-width: 64px; flex: 1; - border: 1px solid $color-spacer; - + border: 1px solid $color-font-secondary; + &.empty { - border: 1px solid $color-spacer-light; + border: 1px solid darken($color-font-secondary, 30%); } } } } -} \ No newline at end of file +} From 4191d2529d10ca3b40771801f06349b6d6cf698c Mon Sep 17 00:00:00 2001 From: alexm Date: Mon, 7 Aug 2023 07:57:38 +0200 Subject: [PATCH 06/13] refs #5712 warnFix: getById condition --- modules/worker/back/methods/worker-dms/filter.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/worker/back/methods/worker-dms/filter.js b/modules/worker/back/methods/worker-dms/filter.js index 5f55f1bd7..9d8554484 100644 --- a/modules/worker/back/methods/worker-dms/filter.js +++ b/modules/worker/back/methods/worker-dms/filter.js @@ -71,8 +71,9 @@ module.exports = Self => { 'Stored on': 'created', 'Document ID': 'id' }; + workerDocuware = - await models.Docuware.getById('hr', worker.lastName + worker.firstName, docuwareParse) ?? []; + await models.Docuware.getById('hr', worker.lastName + ' ' + worker.firstName, docuwareParse) ?? []; for (document of workerDocuware) { const defaultData = { file: 'dw' + document.id + '.png', From 26d6bbff4cb792592dc18973ca856433715acbf3 Mon Sep 17 00:00:00 2001 From: alexm Date: Mon, 7 Aug 2023 10:04:46 +0200 Subject: [PATCH 07/13] refs #5929 hotFix: add UserError --- modules/ticket/back/methods/ticket/componentUpdate.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/modules/ticket/back/methods/ticket/componentUpdate.js b/modules/ticket/back/methods/ticket/componentUpdate.js index b5ff50d59..8aad8959b 100644 --- a/modules/ticket/back/methods/ticket/componentUpdate.js +++ b/modules/ticket/back/methods/ticket/componentUpdate.js @@ -1,4 +1,5 @@ const loggable = require('vn-loopback/util/log'); +const UserError = require('vn-loopback/util/user-error'); module.exports = Self => { Self.remoteMethodCtx('componentUpdate', { @@ -112,7 +113,6 @@ module.exports = Self => { } try { - const userId = ctx.req.accessToken.userId; const models = Self.app.models; const $t = ctx.req.__; // $translate await models.Ticket.isEditableOrThrow(ctx, args.id, myOptions); @@ -127,11 +127,8 @@ module.exports = Self => { args.warehouseFk, myOptions); - if (!zoneShipped || zoneShipped.zoneFk != args.zoneFk) { - const error = `You don't have privileges to change the zone`; - - throw new UserError(error); - } + if (!zoneShipped || zoneShipped.zoneFk != args.zoneFk) + throw new UserError(`You don't have privileges to change the zone`); } if (args.isWithoutNegatives) { From abd6045bf681127d29506a62642fd863cef3039a Mon Sep 17 00:00:00 2001 From: alexm Date: Mon, 7 Aug 2023 13:52:46 +0200 Subject: [PATCH 08/13] warnFix: revert(version): remove changelog and change package.json --- CHANGELOG.md | 8 -------- db/changes/233401/.gitkeep | 0 package.json | 2 +- 3 files changed, 1 insertion(+), 9 deletions(-) delete mode 100644 db/changes/233401/.gitkeep diff --git a/CHANGELOG.md b/CHANGELOG.md index 80d8517de..6399235de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,14 +5,6 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [2334.01] - 2023-08-24 - -### Added - -### Changed - -### Fixed - ## [2332.01] - 2023-08-09 diff --git a/db/changes/233401/.gitkeep b/db/changes/233401/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/package.json b/package.json index 2aa37379e..37e39d5a5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "salix-back", - "version": "23.34.01", + "version": "23.32.01", "author": "Verdnatura Levante SL", "description": "Salix backend", "license": "GPL-3.0", From bf5b421a4312d5473082fd68c5c847303d4a2d63 Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 8 Aug 2023 08:39:13 +0200 Subject: [PATCH 09/13] refs #5976 warnFix(client_create): socialName to upperCase --- db/changes/233202/00-client_create_upper.sql | 87 ++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 db/changes/233202/00-client_create_upper.sql diff --git a/db/changes/233202/00-client_create_upper.sql b/db/changes/233202/00-client_create_upper.sql new file mode 100644 index 000000000..d5d7258a1 --- /dev/null +++ b/db/changes/233202/00-client_create_upper.sql @@ -0,0 +1,87 @@ +DELIMITER $$ +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`client_create`( + vFirstname VARCHAR(50), + vSurnames VARCHAR(50), + vFi VARCHAR(9), + vAddress TEXT, + vPostcode CHAR(5), + vCity VARCHAR(25), + vProvinceFk SMALLINT(5), + vCompanyFk SMALLINT(5), + vPhone VARCHAR(11), + vEmail VARCHAR(255), + vUserFk INT +) +BEGIN +/** + * Create new client + * + * @params vFirstname firstName + * @params vSurnames surnames + * @params vFi company code from accounting transactions + * @params vAddress address + * @params vPostcode postCode + * @params vCity city + * @params vProvinceFk province + * @params vCompanyFk company in which he has become a client + * @params vPhone telephone number + * @params vEmail email address + * @params vUserFk user id + */ + DECLARE vPayMethodFk INT; + DECLARE vDueDay INT; + DECLARE vDefaultCredit DECIMAL(10, 2); + DECLARE vIsTaxDataChecked TINYINT(1); + DECLARE vHasCoreVnl BOOLEAN; + DECLARE vMandateTypeFk INT; + + SELECT defaultPayMethodFk, + defaultDueDay, + defaultCredit, + defaultIsTaxDataChecked, + defaultHasCoreVnl, + defaultMandateTypeFk + INTO vPayMethodFk, + vDueDay, + vDefaultCredit, + vIsTaxDataChecked, + vHasCoreVnl, + vMandateTypeFk + FROM clientConfig; + + INSERT INTO `client` + SET id = vUserFk, + name = CONCAT(vFirstname, ' ', vSurnames), + street = vAddress, + fi = TRIM(vFi), + phone = vPhone, + email = vEmail, + provinceFk = vProvinceFk, + city = vCity, + postcode = vPostcode, + socialName = UPPER(CONCAT(vSurnames, ' ', vFirstname)), + payMethodFk = vPayMethodFk, + dueDay = vDueDay, + credit = vDefaultCredit, + isTaxDataChecked = vIsTaxDataChecked, + hasCoreVnl = vHasCoreVnl, + isEqualizated = FALSE + ON duplicate KEY UPDATE + payMethodFk = vPayMethodFk, + dueDay = vDueDay, + credit = vDefaultCredit, + isTaxDataChecked = vIsTaxDataChecked, + hasCoreVnl = vHasCoreVnl, + isActive = TRUE; + + INSERT INTO mandate (clientFk, companyFk, mandateTypeFk) + SELECT vUserFk, vCompanyFk, vMandateTypeFk + WHERE NOT EXISTS ( + SELECT id + FROM mandate + WHERE clientFk = vUserFk + AND companyFk = vCompanyFk + AND mandateTypeFk = vMandateTypeFk + ); +END$$ +DELIMITER ; From 61e3b71bbf7f51b22686f6e49c46b2a5a7069687 Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 8 Aug 2023 08:51:03 +0200 Subject: [PATCH 10/13] init version 233401 after revert(version) in test --- CHANGELOG.md | 9 +++++++++ db/changes/233401/.gitkeep | 0 package.json | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 db/changes/233401/.gitkeep diff --git a/CHANGELOG.md b/CHANGELOG.md index 6399235de..15fe58d7f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2334.01] - 2023-08-24 + +### Added + +### Changed + +### Fixed + + ## [2332.01] - 2023-08-09 ### Added diff --git a/db/changes/233401/.gitkeep b/db/changes/233401/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/package.json b/package.json index 37e39d5a5..2aa37379e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "salix-back", - "version": "23.32.01", + "version": "23.34.01", "author": "Verdnatura Levante SL", "description": "Salix backend", "license": "GPL-3.0", From c5e853b028651db9c94d1467e479cae317c6e91d Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 8 Aug 2023 13:35:36 +0200 Subject: [PATCH 11/13] refs #5976 correct sql folder --- db/changes/{233001 => 233401}/00-setDeleted_acl.sql | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename db/changes/{233001 => 233401}/00-setDeleted_acl.sql (100%) diff --git a/db/changes/233001/00-setDeleted_acl.sql b/db/changes/233401/00-setDeleted_acl.sql similarity index 100% rename from db/changes/233001/00-setDeleted_acl.sql rename to db/changes/233401/00-setDeleted_acl.sql From 19c09d60a237377f337be9e98483663d0962c049 Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 8 Aug 2023 15:04:21 +0200 Subject: [PATCH 12/13] refs #5986 feat(ticket_filter): add classColor column --- modules/ticket/back/methods/ticket/filter.js | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/ticket/back/methods/ticket/filter.js b/modules/ticket/back/methods/ticket/filter.js index ea77b7677..eb3da39af 100644 --- a/modules/ticket/back/methods/ticket/filter.js +++ b/modules/ticket/back/methods/ticket/filter.js @@ -248,6 +248,7 @@ module.exports = Self => { am.name AS agencyMode, am.id AS agencyModeFk, st.name AS state, + st.classColor, wk.lastName AS salesPerson, ts.stateFk AS stateFk, ts.alertLevel AS alertLevel, From ce78fc8e5dd383b3c6457fe5f78a45b21b246858 Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 8 Aug 2023 15:06:28 +0200 Subject: [PATCH 13/13] refs #5986 feat: state model add classColor properties --- modules/ticket/back/models/state.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/ticket/back/models/state.json b/modules/ticket/back/models/state.json index 9d4dd4f5d..8b7eb69c6 100644 --- a/modules/ticket/back/models/state.json +++ b/modules/ticket/back/models/state.json @@ -27,6 +27,9 @@ "code": { "type": "string", "required": false + }, + "classColor": { + "type": "string" } } }