From 48f80fad8f6a61532430973616d6a13d762b410c Mon Sep 17 00:00:00 2001 From: carlosjr Date: Sun, 13 Jun 2021 19:11:05 +0200 Subject: [PATCH 1/3] added postcode to summary + basic data translation --- modules/ticket/back/methods/ticket/summary.js | 2 +- modules/ticket/front/basic-data/step-one/locale/es.yml | 3 ++- modules/ticket/front/summary/index.js | 7 ++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/modules/ticket/back/methods/ticket/summary.js b/modules/ticket/back/methods/ticket/summary.js index 760a71e2b..037aee8b1 100644 --- a/modules/ticket/back/methods/ticket/summary.js +++ b/modules/ticket/back/methods/ticket/summary.js @@ -63,7 +63,7 @@ module.exports = Self => { }, { relation: 'address', scope: { - fields: ['street', 'city', 'provinceFk', 'phone', 'mobile'], + fields: ['street', 'city', 'provinceFk', 'phone', 'mobile', 'postalCode'], include: { relation: 'province', scope: { diff --git a/modules/ticket/front/basic-data/step-one/locale/es.yml b/modules/ticket/front/basic-data/step-one/locale/es.yml index ab804aea5..116392b89 100644 --- a/modules/ticket/front/basic-data/step-one/locale/es.yml +++ b/modules/ticket/front/basic-data/step-one/locale/es.yml @@ -2,4 +2,5 @@ No delivery zone available for this landing date: No hay una zona de reparto dis No delivery zone available for this shipping date: No hay una zona de reparto disponible para la fecha de preparación seleccionada No delivery zone available for this parameters: No hay una zona de reparto disponible con estos parámetros Deleted: Eliminado -Zone: Zona \ No newline at end of file +Zone: Zona +Edit address: Editar dirección \ No newline at end of file diff --git a/modules/ticket/front/summary/index.js b/modules/ticket/front/summary/index.js index 5887be153..440d97567 100644 --- a/modules/ticket/front/summary/index.js +++ b/modules/ticket/front/summary/index.js @@ -16,10 +16,11 @@ class Controller extends Summary { get formattedAddress() { if (!this.summary) return ''; - let address = this.summary.address; - let province = address.province ? `(${address.province.name})` : ''; + const address = this.summary.address; + const postcode = address.postalCode; + const province = address.province ? `(${address.province.name})` : ''; - return `${address.street} - ${address.city} ${province}`; + return `${address.street} - ${postcode} - ${address.city} ${province}`; } loadData() { From 5d8a9938d6693250ded1ab63230e9159ae4fc791 Mon Sep 17 00:00:00 2001 From: carlosjr Date: Sun, 13 Jun 2021 19:16:35 +0200 Subject: [PATCH 2/3] formattedAddress tests amended for postcode --- modules/ticket/front/summary/index.spec.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/ticket/front/summary/index.spec.js b/modules/ticket/front/summary/index.spec.js index e94f316de..9f836e204 100644 --- a/modules/ticket/front/summary/index.spec.js +++ b/modules/ticket/front/summary/index.spec.js @@ -27,18 +27,19 @@ describe('Ticket', () => { }); describe('formattedAddress()', () => { - it('should return a full fromatted address with city and province', () => { + it('should return the full fromatted address with city and province', () => { controller.summary = { address: { province: { name: 'Gotham' }, street: '1007 Mountain Drive', + postalCode: 46060, city: 'Gotham' } }; - expect(controller.formattedAddress).toEqual('1007 Mountain Drive - Gotham (Gotham)'); + expect(controller.formattedAddress).toEqual('1007 Mountain Drive - 46060 - Gotham (Gotham)'); }); }); }); From f0292c0b03b8293dc7cb2e3b4d5fe55dbbeb950f Mon Sep 17 00:00:00 2001 From: carlosjr Date: Sun, 13 Jun 2021 19:44:50 +0200 Subject: [PATCH 3/3] updated all fetched tags font-size to 1rem --- front/core/components/table/style.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/front/core/components/table/style.scss b/front/core/components/table/style.scss index 7da20fe82..dea26a462 100644 --- a/front/core/components/table/style.scss +++ b/front/core/components/table/style.scss @@ -102,7 +102,7 @@ vn-table { & > vn-one { overflow: hidden; text-overflow: ellipsis; - font-size: 0.75rem; + font-size: 1rem; } & > vn-one:nth-child(2) h3 {