From e13f2d4ae30c524026a84e49c269bd19a2bc75bd Mon Sep 17 00:00:00 2001 From: vicent Date: Fri, 26 Nov 2021 10:06:13 +0100 Subject: [PATCH] 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 49d7c1977..c1d6b67fe 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 6329dbb1a..7d515b67c 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 6fa29e5ca..d4ab440a7 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