From c9cda92fbf258336e1fc6bdb8f152fa6a509872b Mon Sep 17 00:00:00 2001 From: joan Date: Mon, 20 Sep 2021 14:32:15 +0200 Subject: [PATCH 1/7] refactor(smtp): replaced field "sender" with "receiver" --- print/core/smtp.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/print/core/smtp.js b/print/core/smtp.js index c42a080f5..5fb5c4a2c 100644 --- a/print/core/smtp.js +++ b/print/core/smtp.js @@ -25,7 +25,7 @@ module.exports = { throw err; }).finally(async() => { await db.rawSql(` - INSERT INTO vn.mail (sender, replyTo, sent, subject, body, status) + INSERT INTO vn.mail (receiver, replyTo, sent, subject, body, status) VALUES (?, ?, 1, ?, ?, ?)`, [ options.to, options.replyTo, From deb085ce9f0d1db0fa56785930c7fb536e31a849 Mon Sep 17 00:00:00 2001 From: joan Date: Tue, 21 Sep 2021 08:43:21 +0200 Subject: [PATCH 2/7] fix(bankEntity): was not sending back the data id --- front/salix/components/bank-entity/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/front/salix/components/bank-entity/index.js b/front/salix/components/bank-entity/index.js index d4ac8030a..261018017 100644 --- a/front/salix/components/bank-entity/index.js +++ b/front/salix/components/bank-entity/index.js @@ -11,6 +11,7 @@ class Controller extends Dialog { throw new Error(`The country can't be empty`); return this.$http.post(`bankEntities`, this.data) + .then(res => this.data.id = res.data.id) .then(() => super.responseHandler(response)) .then(() => this.vnApp.showSuccess(this.$t('Data saved!'))); } From 786589f214439496395fe10cbc2a98e08e4a531e Mon Sep 17 00:00:00 2001 From: joan Date: Fri, 17 Sep 2021 08:50:22 +0200 Subject: [PATCH 3/7] fix(tickets): fixed ticket duplications on ticket summary and ticket index caused by pagination Refs: 3093 --- modules/client/front/summary/index.html | 15 ++++++++++++++- modules/ticket/front/main/index.html | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/modules/client/front/summary/index.html b/modules/client/front/summary/index.html index 8a71599e1..5d113139b 100644 --- a/modules/client/front/summary/index.html +++ b/modules/client/front/summary/index.html @@ -6,7 +6,7 @@ filter="::$ctrl.ticketFilter" limit="5" data="tickets" - order="shipped DESC"> + order="shipped DESC, id">
@@ -293,6 +293,8 @@ Id Nickname + Agency + Route Packages Date State @@ -313,6 +315,17 @@ {{::ticket.nickname}} + + {{::ticket.agencyMode.name}} + + + + {{::ticket.routeFk}} + + {{::ticket.packages}} diff --git a/modules/ticket/front/main/index.html b/modules/ticket/front/main/index.html index 8e9af1e12..590d33887 100644 --- a/modules/ticket/front/main/index.html +++ b/modules/ticket/front/main/index.html @@ -2,7 +2,7 @@ vn-id="model" url="Tickets/filter" limit="20" - order="shippedDate DESC, shippedHour ASC, zoneLanding ASC"> + order="shippedDate DESC, shippedHour ASC, zoneLanding ASC, id"> Date: Mon, 19 Jul 2021 15:59:39 +0200 Subject: [PATCH 4/7] added agency and route columns to client.summary tickets --- modules/client/front/summary/index.html | 16 +++++++++++++++- modules/client/front/summary/index.js | 8 +++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/modules/client/front/summary/index.html b/modules/client/front/summary/index.html index 5d113139b..c252cf1b3 100644 --- a/modules/client/front/summary/index.html +++ b/modules/client/front/summary/index.html @@ -294,7 +294,7 @@ Id Nickname Agency - Route + Route Packages Date State @@ -326,6 +326,17 @@ {{::ticket.routeFk}} + + {{::ticket.agencyMode.name}} + + + + {{::ticket.routeFk}} + + {{::ticket.packages}} @@ -384,6 +395,9 @@ + + diff --git a/modules/client/front/summary/index.js b/modules/client/front/summary/index.js index 0f6c7e834..b1f0faf13 100644 --- a/modules/client/front/summary/index.js +++ b/modules/client/front/summary/index.js @@ -22,7 +22,13 @@ class Controller extends Summary { scope: { fields: ['id'] } - } + }, + { + relation: 'agencyMode', + scope: { + fields: ['name'] + } + }, ] }; } From 689662f9bb9830aaef0ac323ec1a0c8c9c615242 Mon Sep 17 00:00:00 2001 From: joan Date: Tue, 21 Sep 2021 12:48:51 +0200 Subject: [PATCH 5/7] fix code duplication --- modules/client/front/summary/index.html | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/modules/client/front/summary/index.html b/modules/client/front/summary/index.html index c252cf1b3..6ff742c36 100644 --- a/modules/client/front/summary/index.html +++ b/modules/client/front/summary/index.html @@ -326,17 +326,6 @@ {{::ticket.routeFk}} - - {{::ticket.agencyMode.name}} - - - - {{::ticket.routeFk}} - - {{::ticket.packages}} From 32d492efd3eccbba03ac75ded3a6692e0bd61404 Mon Sep 17 00:00:00 2001 From: joan Date: Tue, 21 Sep 2021 13:03:07 +0200 Subject: [PATCH 6/7] refactor(deliveryNote): updated report translations --- print/templates/reports/delivery-note/locale/en.yml | 2 +- print/templates/reports/delivery-note/locale/es.yml | 2 +- print/templates/reports/delivery-note/locale/fr.yml | 2 +- print/templates/reports/delivery-note/locale/pt.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/print/templates/reports/delivery-note/locale/en.yml b/print/templates/reports/delivery-note/locale/en.yml index 50e061226..8a3ff834b 100644 --- a/print/templates/reports/delivery-note/locale/en.yml +++ b/print/templates/reports/delivery-note/locale/en.yml @@ -29,7 +29,7 @@ services: amount: Amount tfoot: subtotal: Subtotal - warning: Deposit packaging will be invoiced if they have not been returned after 30 days of their delivery + warning: Deposit packaging will be invoiced if they have not been returned after 30 days of their delivery. packagings: title: Buckets and packaging theader: diff --git a/print/templates/reports/delivery-note/locale/es.yml b/print/templates/reports/delivery-note/locale/es.yml index 73c200c6b..f9c2e02f3 100644 --- a/print/templates/reports/delivery-note/locale/es.yml +++ b/print/templates/reports/delivery-note/locale/es.yml @@ -29,7 +29,7 @@ services: amount: Importe tfoot: subtotal: Subtotal - warning: Los embalajes en depósito se facturarán si no han sido devueltos pasados 30 dias de su entrega + warning: Los embalajes en depósito se facturarán si no han sido devueltos pasados 30 dias de su entrega. packagings: title: Cubos y embalajes theader: diff --git a/print/templates/reports/delivery-note/locale/fr.yml b/print/templates/reports/delivery-note/locale/fr.yml index 2aae418b3..72ca771e1 100644 --- a/print/templates/reports/delivery-note/locale/fr.yml +++ b/print/templates/reports/delivery-note/locale/fr.yml @@ -29,7 +29,7 @@ services: amount: Montant tfoot: subtotal: Total partiel - warning: Les emballages de consigne seront facturés s'ils n'ont pas été retournés après 30 jours de leur livraison + warning: Les emballages de consigne seront facturés s'ils n'ont pas été retournés après 30 jours de leur livraison. packagings: title: Bacs et emballages theader: diff --git a/print/templates/reports/delivery-note/locale/pt.yml b/print/templates/reports/delivery-note/locale/pt.yml index 0c9889ee9..e83087142 100644 --- a/print/templates/reports/delivery-note/locale/pt.yml +++ b/print/templates/reports/delivery-note/locale/pt.yml @@ -29,7 +29,7 @@ services: amount: Quantia tfoot: subtotal: Subtotal - warning: Os pacotes do armazém serão cobrados se não forem devolvidos 30 dias após a entrega + warning: As embalagens em depósito serão facturadas e cobradas se não são devolvidas 30 dias após a entrega. packagings: title: Baldes e Embalagens theader: From d41378a5327de5c71becee9bc13cf1e938bcf4ad Mon Sep 17 00:00:00 2001 From: joan Date: Tue, 21 Sep 2021 13:51:38 +0200 Subject: [PATCH 7/7] Updated unit test --- front/salix/components/bank-entity/index.spec.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/front/salix/components/bank-entity/index.spec.js b/front/salix/components/bank-entity/index.spec.js index 3c3de4c40..f93325231 100644 --- a/front/salix/components/bank-entity/index.spec.js +++ b/front/salix/components/bank-entity/index.spec.js @@ -27,12 +27,13 @@ describe('Salix Component vnNewBankEntity', () => { countryFk: 1 }; - $httpBackend.expectPOST('bankEntities', controller.data).respond(200); + $httpBackend.expectPOST('bankEntities', controller.data).respond({id: 1}); controller.responseHandler('accept'); $httpBackend.flush(); expect(controller.vnApp.showSuccess).toHaveBeenCalledWith('Data saved!'); + expect(controller.data.id).toEqual(1); }); }); });