From e13f2d4ae30c524026a84e49c269bd19a2bc75bd Mon Sep 17 00:00:00 2001 From: vicent Date: Fri, 26 Nov 2021 10:06:13 +0100 Subject: [PATCH 1/3] feat(route_ticket): add column province and change order other columns --- .../back/methods/route/getSuggestedTickets.js | 8 +++++++- modules/route/front/tickets/index.html | 16 +++++++++++----- modules/route/front/tickets/locale/es.yml | 3 ++- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/modules/route/back/methods/route/getSuggestedTickets.js b/modules/route/back/methods/route/getSuggestedTickets.js index 49d7c1977e..c1d6b67fe9 100644 --- a/modules/route/back/methods/route/getSuggestedTickets.js +++ b/modules/route/back/methods/route/getSuggestedTickets.js @@ -55,7 +55,13 @@ module.exports = Self => { { relation: 'address', scope: { - fields: ['id', 'street', 'postalCode', 'city'], + fields: ['street', 'city', 'provinceFk', 'phone', 'nickname', 'postalCode'], + include: { + relation: 'province', + scope: { + fields: ['name'] + } + } } }, ] diff --git a/modules/route/front/tickets/index.html b/modules/route/front/tickets/index.html index 6329dbb1a0..7d515b67cf 100644 --- a/modules/route/front/tickets/index.html +++ b/modules/route/front/tickets/index.html @@ -142,10 +142,15 @@ Ticket Client - Packages - Warehouse - Postcode + Province + + + Population + + + PC Address + Warehouse @@ -165,10 +170,11 @@ {{::ticket.nickname}} - {{::ticket.packages}} - {{::ticket.warehouse.name}} + {{::ticket.address.province.name}} + {{::ticket.address.city}} {{::ticket.address.postalCode}} {{::ticket.address.street}} + {{::ticket.warehouse.name}} diff --git a/modules/route/front/tickets/locale/es.yml b/modules/route/front/tickets/locale/es.yml index 6fa29e5ca5..d4ab440a71 100644 --- a/modules/route/front/tickets/locale/es.yml +++ b/modules/route/front/tickets/locale/es.yml @@ -10,4 +10,5 @@ Ticket not found: No se ha encontrado el ticket The selected ticket is not suitable for this route: El ticket seleccionado no es apto para esta ruta PC: CP The route's vehicle doesn't have a departing warehouse: El vehículo de la ruta no tiene un almacén de salida -The route doesn't have a vehicle: La ruta no tiene un vehículo \ No newline at end of file +The route doesn't have a vehicle: La ruta no tiene un vehículo +Population: Población \ No newline at end of file From d1add9ef84fe828a5c1b0558099072aa0c609d1d Mon Sep 17 00:00:00 2001 From: vicent Date: Fri, 26 Nov 2021 13:16:44 +0100 Subject: [PATCH 2/3] sql changes --- .../10390-constitution/00-department.sql | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 db/changes/10390-constitution/00-department.sql diff --git a/db/changes/10390-constitution/00-department.sql b/db/changes/10390-constitution/00-department.sql new file mode 100644 index 0000000000..e882296ad3 --- /dev/null +++ b/db/changes/10390-constitution/00-department.sql @@ -0,0 +1,33 @@ +UPDATE vn.department + SET notificationEmail='direccioncomercial@verdnatura.es' + WHERE id=96; +UPDATE vn.department + SET notificationEmail='direccioncomercial@verdnatura.es' + WHERE id=95; +UPDATE vn.department + SET notificationEmail='direccioncomercial@verdnatura.es' + WHERE id=115; +UPDATE vn.department + SET notificationEmail='direccioncomercial@verdnatura.es' + WHERE id=123; +UPDATE vn.department + SET notificationEmail='direccioncomercial@verdnatura.es' + WHERE id=94; +UPDATE vn.department + SET notificationEmail='direccioncomercial@verdnatura.es' + WHERE id=101; +UPDATE vn.department + SET notificationEmail='direccioncomercial@verdnatura.es' + WHERE id=80; +UPDATE vn.department + SET notificationEmail='direccioncomercial@verdnatura.es' + WHERE id=125; +UPDATE vn.department + SET notificationEmail='direccioncomercial@verdnatura.es' + WHERE id=98; +UPDATE vn.department + SET notificationEmail='direccioncomercial@verdnatura.es' + WHERE id=92; +UPDATE vn.department + SET notificationEmail='' + WHERE id=43; \ No newline at end of file From 442bf1940e01d5c601141c69a900427bd0f2b670 Mon Sep 17 00:00:00 2001 From: vicent Date: Fri, 26 Nov 2021 13:28:12 +0100 Subject: [PATCH 3/3] delete last commit, uploaed by error --- .../10390-constitution/00-department.sql | 33 ------------------- 1 file changed, 33 deletions(-) delete mode 100644 db/changes/10390-constitution/00-department.sql diff --git a/db/changes/10390-constitution/00-department.sql b/db/changes/10390-constitution/00-department.sql deleted file mode 100644 index e882296ad3..0000000000 --- a/db/changes/10390-constitution/00-department.sql +++ /dev/null @@ -1,33 +0,0 @@ -UPDATE vn.department - SET notificationEmail='direccioncomercial@verdnatura.es' - WHERE id=96; -UPDATE vn.department - SET notificationEmail='direccioncomercial@verdnatura.es' - WHERE id=95; -UPDATE vn.department - SET notificationEmail='direccioncomercial@verdnatura.es' - WHERE id=115; -UPDATE vn.department - SET notificationEmail='direccioncomercial@verdnatura.es' - WHERE id=123; -UPDATE vn.department - SET notificationEmail='direccioncomercial@verdnatura.es' - WHERE id=94; -UPDATE vn.department - SET notificationEmail='direccioncomercial@verdnatura.es' - WHERE id=101; -UPDATE vn.department - SET notificationEmail='direccioncomercial@verdnatura.es' - WHERE id=80; -UPDATE vn.department - SET notificationEmail='direccioncomercial@verdnatura.es' - WHERE id=125; -UPDATE vn.department - SET notificationEmail='direccioncomercial@verdnatura.es' - WHERE id=98; -UPDATE vn.department - SET notificationEmail='direccioncomercial@verdnatura.es' - WHERE id=92; -UPDATE vn.department - SET notificationEmail='' - WHERE id=43; \ No newline at end of file