From 92b916580e2d59382f57b055ba53af41638d5368 Mon Sep 17 00:00:00 2001 From: alex Date: Tue, 26 Oct 2021 10:20:35 +0200 Subject: [PATCH 01/39] feat(description): concat bank with tickets --- modules/client/front/balance/create/index.js | 4 +++- modules/client/front/balance/create/index.spec.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/client/front/balance/create/index.js b/modules/client/front/balance/create/index.js index e78a9c1b2..5b5866732 100644 --- a/modules/client/front/balance/create/index.js +++ b/modules/client/front/balance/create/index.js @@ -45,6 +45,7 @@ class Controller extends Dialog { set description(value) { this.receipt.description = value; + this.originalDescription = value; } get description() { @@ -60,7 +61,8 @@ class Controller extends Dialog { if (value) { const accountingType = value.accountingType; - this.receipt.description = accountingType && accountingType.receiptDescription; + this.receipt.description = + `${accountingType && accountingType.receiptDescription}, ${this.originalDescription}`; } } diff --git a/modules/client/front/balance/create/index.spec.js b/modules/client/front/balance/create/index.spec.js index bd0607a79..3aade58c6 100644 --- a/modules/client/front/balance/create/index.spec.js +++ b/modules/client/front/balance/create/index.spec.js @@ -36,7 +36,7 @@ describe('Client', () => { } }; - expect(controller.receipt.description).toEqual('Cash'); + expect(controller.receipt.description).toContain('Cash'); }); }); From 21686b4a9222cc8d10a59adc6e484840119ddab6 Mon Sep 17 00:00:00 2001 From: alex Date: Wed, 27 Oct 2021 09:55:35 +0200 Subject: [PATCH 02/39] feat(test): modify jest test --- modules/client/front/balance/create/index.spec.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/client/front/balance/create/index.spec.js b/modules/client/front/balance/create/index.spec.js index 3aade58c6..a2e3e2015 100644 --- a/modules/client/front/balance/create/index.spec.js +++ b/modules/client/front/balance/create/index.spec.js @@ -27,6 +27,7 @@ describe('Client', () => { describe('bankSelection() setter', () => { it('should set the receipt description property', () => { + controller.originalDescription = 'Albaran: 1, 2'; controller.bankSelection = { id: 1, bank: 'Cash', @@ -36,7 +37,7 @@ describe('Client', () => { } }; - expect(controller.receipt.description).toContain('Cash'); + expect(controller.receipt.description).toEqual('Cash, Albaran: 1, 2'); }); }); From 13aa96d6a8d651c8d58a5b229b5cb07eb166859a Mon Sep 17 00:00:00 2001 From: carlosjr Date: Thu, 28 Oct 2021 13:30:07 +0200 Subject: [PATCH 03/39] test(payout): e2e path updated for ticket payout --- e2e/helpers/selectors.js | 3 +++ e2e/paths/05-ticket/18_index_payout.spec.js | 10 ++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index 4b5629c3c..08a21f838 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -1,3 +1,4 @@ +/* eslint max-len: ["error", { "ignoreStrings": true }]*/ export default { globalItems: { @@ -273,6 +274,7 @@ export default { deliveredAmount: '.vn-dialog vn-input-number[ng-model="$ctrl.deliveredAmount"]', refundAmount: '.vn-dialog vn-input-number[ng-model="$ctrl.amountToReturn"]', saveButton: '.vn-dialog.shown [response="accept"]', + anyBalanceLine: 'vn-client-balance-index vn-tbody > vn-tr', firstLineBalance: 'vn-client-balance-index vn-tbody > vn-tr:nth-child(1) > vn-td:nth-child(8)', firstLineReference: 'vn-client-balance-index vn-tbody > vn-tr:nth-child(1) > vn-td-editable', firstLineReferenceInput: 'vn-client-balance-index vn-tbody > vn-tr:nth-child(1) > vn-td-editable > div > field > vn-textfield' @@ -470,6 +472,7 @@ export default { firstTicketCheckbox: 'vn-ticket-index vn-tbody > a:nth-child(1) > vn-td:nth-child(1) > vn-check', secondTicketCheckbox: 'vn-ticket-index vn-tbody > a:nth-child(2) > vn-td:nth-child(1) > vn-check', thirdTicketCheckbox: 'vn-ticket-index vn-tbody > a:nth-child(3) > vn-td:nth-child(1) > vn-check', + fifthTicketCheckbox: 'vn-ticket-index vn-tbody > a:nth-child(5) > vn-td:nth-child(1) > vn-check', sixthTicketCheckbox: 'vn-ticket-index vn-tbody > a:nth-child(6) > vn-td:nth-child(1) > vn-check', payoutButton: 'vn-ticket-index vn-button[icon="icon-recovery"]', payoutCompany: '.vn-dialog vn-autocomplete[ng-model="$ctrl.companyFk"]', diff --git a/e2e/paths/05-ticket/18_index_payout.spec.js b/e2e/paths/05-ticket/18_index_payout.spec.js index 343ec1f43..c3325360a 100644 --- a/e2e/paths/05-ticket/18_index_payout.spec.js +++ b/e2e/paths/05-ticket/18_index_payout.spec.js @@ -21,8 +21,8 @@ describe('Ticket index payout path', () => { it('should check the second ticket from a client and 1 of another', async() => { await page.waitToClick(selectors.globalItems.searchButton); - await page.waitToClick(selectors.ticketsIndex.secondTicketCheckbox); await page.waitToClick(selectors.ticketsIndex.thirdTicketCheckbox); + await page.waitToClick(selectors.ticketsIndex.fifthTicketCheckbox); await page.waitToClick(selectors.ticketsIndex.payoutButton); const message = await page.waitForSnackbar(); @@ -58,9 +58,11 @@ describe('Ticket index payout path', () => { await page.selectModule('client'); await page.accessToSearchResult('1101'); await page.accessToSection('client.card.balance.index'); - await page.waitForSelector('vn-client-balance-index vn-tbody > vn-tr'); - let result = await page.countElement('vn-client-balance-index vn-tbody > vn-tr'); + await page.waitForSelector(selectors.clientBalance.anyBalanceLine); + const count = await page.countElement(selectors.clientBalance.anyBalanceLine); + const reference = await page.waitToGetProperty(selectors.clientBalance.firstLineReference, 'innerText'); - expect(result).toEqual(4); + expect(count).toEqual(4); + expect(reference).toContain('Cash, Albaran: 7, 8Payment'); }); }); From 3f73084c7d746e22beda2e3d29ea5f6ce94228fc Mon Sep 17 00:00:00 2001 From: joan Date: Fri, 29 Oct 2021 11:42:03 +0200 Subject: [PATCH 04/39] Changed report translations --- print/templates/email/osticket-report/locale/es.yml | 3 ++- print/templates/email/osticket-report/osticket-report.html | 6 ++++++ print/templates/reports/claim-pickup-order/locale/es.yml | 4 ++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/print/templates/email/osticket-report/locale/es.yml b/print/templates/email/osticket-report/locale/es.yml index c231aa138..46c38a91c 100644 --- a/print/templates/email/osticket-report/locale/es.yml +++ b/print/templates/email/osticket-report/locale/es.yml @@ -10,4 +10,5 @@ closed: Cerrado ticketSubject: Asunto ticketDescription: Descripción resolution: Resolución -grafanaLink: "Puedes ver la gráfica desde el siguiente enlace:" \ No newline at end of file +grafanaLink: "Puedes ver la gráfica desde el siguiente enlace:" +redmineLink: "Desde el siguiente enlace puedes ver el resumen semanal de tareas de refactor:" \ No newline at end of file diff --git a/print/templates/email/osticket-report/osticket-report.html b/print/templates/email/osticket-report/osticket-report.html index 431ee2631..76973c8e1 100644 --- a/print/templates/email/osticket-report/osticket-report.html +++ b/print/templates/email/osticket-report/osticket-report.html @@ -33,6 +33,12 @@ https://grafana.verdnatura.es/d/2kaHDi9Mk/osticket?orgId=1&from={{startedTime}}&to={{endedTime}} +

+ diff --git a/print/templates/reports/claim-pickup-order/locale/es.yml b/print/templates/reports/claim-pickup-order/locale/es.yml index 28bfa73a9..385a54917 100644 --- a/print/templates/reports/claim-pickup-order/locale/es.yml +++ b/print/templates/reports/claim-pickup-order/locale/es.yml @@ -11,5 +11,5 @@ clientSignature: Firma del cliente claim: Reclamación {0} sections: agency: - description: 'Para agilizar su recogida, por favor, póngase en contacto con la oficina - de integrados.
Tlf: 96 166 77 88 - Ana Gómez (Ext. 2113) (agomezf@integra2.com)' + description: 'Para agilizar su recogida, por favor, póngase en contacto con la oficina + de Logista Parcel.
Tlf: 96 166 77 88 - Ana Gómez (Ext. 2113) (atcsalidas.i2valencia@integra2.es)' From b2dd9e607618818dee53fe2700ba76743e1bc4c4 Mon Sep 17 00:00:00 2001 From: alex Date: Tue, 2 Nov 2021 07:55:35 +0100 Subject: [PATCH 05/39] feat(zone): filter calendar --- .../back/methods/zone/getEventsFiltered.js | 21 +++++++++++++ modules/zone/back/models/zone.js | 1 + modules/zone/front/events/index.js | 30 +++++++++---------- 3 files changed, 37 insertions(+), 15 deletions(-) create mode 100644 modules/zone/back/methods/zone/getEventsFiltered.js diff --git a/modules/zone/back/methods/zone/getEventsFiltered.js b/modules/zone/back/methods/zone/getEventsFiltered.js new file mode 100644 index 000000000..ea339d88f --- /dev/null +++ b/modules/zone/back/methods/zone/getEventsFiltered.js @@ -0,0 +1,21 @@ +module.exports = Self => { + Self.remoteMethodCtx('getEventsFiltered', { + description: 'Get events filtered for zone and date', + accessType: 'READ', + returns: { + type: 'object', + root: true + }, + http: { + path: `/getEventsFiltered`, + verb: 'GET' + } + }); + + Self.getEventsFiltered = async(zoneFk, started, ended) => { + query = `CALL vn.zone_getEventsFiltered(?,?,?)`; + const [events, exclusions] = await Self.rawSql(query, [zoneFk, started, ended]); + console.log(events); + return {events, exclusions}; + }; +}; diff --git a/modules/zone/back/models/zone.js b/modules/zone/back/models/zone.js index 0b1b9d106..9771c958b 100644 --- a/modules/zone/back/models/zone.js +++ b/modules/zone/back/models/zone.js @@ -2,6 +2,7 @@ module.exports = Self => { require('../methods/zone/clone')(Self); require('../methods/zone/getLeaves')(Self); require('../methods/zone/getEvents')(Self); + require('../methods/zone/getEventsFiltered')(Self); require('../methods/zone/toggleIsIncluded')(Self); require('../methods/zone/getUpcomingDeliveries')(Self); require('../methods/zone/deleteZone')(Self); diff --git a/modules/zone/front/events/index.js b/modules/zone/front/events/index.js index 29b534c0c..e10c1c6f1 100644 --- a/modules/zone/front/events/index.js +++ b/modules/zone/front/events/index.js @@ -12,22 +12,22 @@ class Controller extends Section { this.refresh(); } - get path() { - return `Zones/${this.$params.id}/events`; - } - - get exclusionsPath() { - return `Zones/${this.$params.id}/exclusions`; - } - refresh() { - let data = {}; - this.$q.all([ - this.$http.get(this.path) - .then(res => data.events = res.data), - this.$http.get(this.exclusionsPath) - .then(res => data.exclusions = res.data) - ]).finally(() => { + this.$.data = null; + let params = { + ended: '2022-01-31', + started: '2021-10-01', + zoneFk: 10 + }; + let ended = '2022-01-31'; + let started = '2021-10-01'; + let zoneFk = 10; + // let filter = encodeURIComponent(JSON.stringify(params)); + let path = `Zones/getEventsFiltered?zoneFk=${zoneFk}&started=${started}&ended=${ended}`; + console.log(path); + this.$http.get(path).then(res => { + console.log(res.data); + let data = res.data; this.$.data = data; }); } From b01298ed17acc33a1ab4b591739191968add0dee Mon Sep 17 00:00:00 2001 From: alex Date: Tue, 2 Nov 2021 08:25:43 +0100 Subject: [PATCH 06/39] feat(entry_descriptor): add supplier button --- modules/entry/front/descriptor/index.html | 9 ++++++++- modules/entry/front/descriptor/locale/es.yml | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/entry/front/descriptor/index.html b/modules/entry/front/descriptor/index.html index 8955b3ee9..04bef0024 100644 --- a/modules/entry/front/descriptor/index.html +++ b/modules/entry/front/descriptor/index.html @@ -34,13 +34,20 @@