From 74b27778ab9fb75808269e8916095b0e4b312491 Mon Sep 17 00:00:00 2001 From: Bernat Exposito Domenech Date: Fri, 27 Mar 2020 11:10:20 +0100 Subject: [PATCH] add phones in ticket summary --- e2e/helpers/selectors.js | 2 +- modules/ticket/back/methods/ticket/summary.js | 4 +-- modules/ticket/front/summary/index.html | 29 ++++++++++++++----- modules/ticket/front/summary/locale/es.yml | 4 +++ 4 files changed, 28 insertions(+), 11 deletions(-) create mode 100644 modules/ticket/front/summary/locale/es.yml diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index 5469c09df3..34869cc878 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -359,7 +359,7 @@ export default { popoverDiaryButton: '.vn-popover.shown vn-item-descriptor vn-icon[icon="icon-transaction"]', firstSaleQuantity: 'vn-ticket-summary [name="sales"] vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(3)', firstSaleDiscount: 'vn-ticket-summary [name="sales"] vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(6)', - invoiceOutRef: 'vn-ticket-summary > vn-card > vn-horizontal > vn-one:nth-child(1) > vn-label-value:nth-child(6) > section > span', + invoiceOutRef: 'vn-ticket-summary > vn-card > vn-horizontal > vn-one:nth-child(1) > vn-label-value:nth-child(7) > section > span', setOk: 'vn-ticket-summary vn-button[label="SET OK"] > button' }, ticketsIndex: { diff --git a/modules/ticket/back/methods/ticket/summary.js b/modules/ticket/back/methods/ticket/summary.js index d1037f251e..b0a612bf38 100644 --- a/modules/ticket/back/methods/ticket/summary.js +++ b/modules/ticket/back/methods/ticket/summary.js @@ -55,7 +55,7 @@ module.exports = Self => { { relation: 'client', scope: { - fields: ['salesPersonFk', 'name'], + fields: ['salesPersonFk', 'name', 'phone', 'mobile'], include: { relation: 'salesPerson', scope: { @@ -73,7 +73,7 @@ module.exports = Self => { { relation: 'address', scope: { - fields: ['street', 'city', 'provinceFk', 'phone'], + fields: ['street', 'city', 'provinceFk', 'phone', 'mobile'], include: { relation: 'province', scope: { diff --git a/modules/ticket/front/summary/index.html b/modules/ticket/front/summary/index.html index decb010239..be5ff6d920 100644 --- a/modules/ticket/front/summary/index.html +++ b/modules/ticket/front/summary/index.html @@ -30,6 +30,13 @@ + + + {{$ctrl.summary.routeFk}} + + @@ -41,22 +48,28 @@ - - - {{$ctrl.summary.routeFk}} - - - + + + + + +