From b848fa52f2cb4a8f3a0571ae5e8097e1eb2fb7c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20S=C3=A1nchez?= Date: Thu, 3 Sep 2020 15:11:16 +0200 Subject: [PATCH] 2385 - Replaced worker nickname --- e2e/helpers/selectors.js | 2 +- modules/claim/back/methods/claim/filter.js | 2 +- modules/claim/front/card/index.js | 2 +- modules/claim/front/descriptor/index.html | 32 +++++++++++++++---- modules/claim/front/index/index.html | 2 +- modules/client/back/methods/client/summary.js | 2 +- modules/client/front/credit/index/index.html | 11 ++++++- modules/client/front/credit/index/index.js | 2 +- modules/client/front/descriptor/index.html | 13 ++++++-- modules/client/front/dms/index/index.html | 8 ++++- modules/client/front/dms/index/index.js | 2 +- modules/client/front/sample/index/index.html | 2 +- modules/client/front/sample/index/index.js | 2 +- modules/client/front/summary/index.html | 13 ++++++-- .../invoiceOut/front/descriptor/index.html | 13 ++++++-- modules/item/back/methods/item/filter.js | 2 +- modules/item/back/methods/item/getCard.js | 2 +- modules/item/back/methods/item/getSummary.js | 2 +- modules/item/front/descriptor/index.html | 11 +++++-- modules/item/front/index/index.html | 4 +-- modules/item/front/summary/index.html | 13 ++++++-- modules/order/front/card/index.js | 2 +- modules/order/front/descriptor/index.html | 13 ++++++-- modules/route/back/methods/route/filter.js | 3 +- .../back/methods/route/specs/summary.spec.js | 2 +- modules/route/back/methods/route/summary.js | 2 +- modules/route/front/index/index.html | 2 +- modules/route/front/summary/index.html | 11 +++++-- modules/ticket/back/methods/ticket/summary.js | 2 +- modules/ticket/front/card/index.js | 2 +- modules/ticket/front/descriptor/index.html | 13 ++++++-- modules/ticket/front/descriptor/index.js | 2 +- modules/ticket/front/dms/index/index.html | 11 +++++-- modules/ticket/front/dms/index/index.js | 2 +- modules/ticket/front/summary/index.html | 13 ++++++-- .../ticket/front/tracking/index/index.html | 2 +- modules/ticket/front/tracking/index/index.js | 2 +- modules/travel/front/descriptor/locale/es.yml | 4 +-- modules/worker/front/dms/index/index.html | 9 +++++- 39 files changed, 174 insertions(+), 65 deletions(-) diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index fe93e8b41..a675b4167 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -199,7 +199,7 @@ export default { }, dms: { deleteFileButton: 'vn-client-dms-index vn-tr:nth-child(1) vn-icon-button[icon="delete"]', - firstDocWorker: 'vn-client-dms-index vn-td:nth-child(7) > span', + firstDocWorker: 'vn-client-dms-index vn-td:nth-child(8) > span', firstDocWorkerDescriptor: '.vn-popover.shown vn-worker-descriptor' }, clientContacts: { diff --git a/modules/claim/back/methods/claim/filter.js b/modules/claim/back/methods/claim/filter.js index 1caa120be..7ba89089a 100644 --- a/modules/claim/back/methods/claim/filter.js +++ b/modules/claim/back/methods/claim/filter.js @@ -106,7 +106,7 @@ module.exports = Self => { let stmt; stmt = new ParameterizedSQL( - `SELECT cl.id, c.name, cl.clientFk, cl.workerFk, u.nickName, cs.description, cl.created + `SELECT cl.id, c.name, cl.clientFk, cl.workerFk, u.name AS userName, cs.description, cl.created FROM claim cl LEFT JOIN client c ON c.id = cl.clientFk LEFT JOIN worker w ON w.id = cl.workerFk diff --git a/modules/claim/front/card/index.js b/modules/claim/front/card/index.js index 361b0e74f..747eea9e7 100644 --- a/modules/claim/front/card/index.js +++ b/modules/claim/front/card/index.js @@ -12,7 +12,7 @@ class Controller extends ModuleCard { include: { relation: 'user', scope: { - fields: ['nickname'] + fields: ['name'] } } } diff --git a/modules/claim/front/descriptor/index.html b/modules/claim/front/descriptor/index.html index 627537348..d6fb75ac5 100644 --- a/modules/claim/front/descriptor/index.html +++ b/modules/claim/front/descriptor/index.html @@ -32,20 +32,32 @@ value="{{$ctrl.claim.created | date: 'dd/MM/yyyy HH:mm'}}"> + label="Salesperson"> + + {{$ctrl.claim.client.salesPersonUser.name}} + + label="Attended by"> + + {{$ctrl.claim.worker.user.name}} + + label="Ticket"> + + {{$ctrl.claim.ticketFk}} +
@@ -89,4 +93,7 @@ - \ No newline at end of file + + + \ No newline at end of file diff --git a/modules/client/front/dms/index/index.html b/modules/client/front/dms/index/index.html index 3402074cc..f38e91134 100644 --- a/modules/client/front/dms/index/index.html +++ b/modules/client/front/dms/index/index.html @@ -53,6 +53,12 @@ {{::document.dms.description}} + + + + @@ -62,7 +68,7 @@ - {{::document.dms.worker.user.nickname | dashIfEmpty}} + {{::document.dms.worker.user.name | dashIfEmpty}} {{::document.dms.created | date:'dd/MM/yyyy HH:mm'}} diff --git a/modules/client/front/dms/index/index.js b/modules/client/front/dms/index/index.js index c65de39e4..a18f195bb 100644 --- a/modules/client/front/dms/index/index.js +++ b/modules/client/front/dms/index/index.js @@ -32,7 +32,7 @@ class Controller extends Section { include: { relation: 'user', scope: { - fields: ['nickname'] + fields: ['name'] } }, } diff --git a/modules/client/front/sample/index/index.html b/modules/client/front/sample/index/index.html index bd7fc6e4a..7bb503fa2 100644 --- a/modules/client/front/sample/index/index.html +++ b/modules/client/front/sample/index/index.html @@ -32,7 +32,7 @@ - {{::sample.worker.user.nickname}} + {{::sample.worker.user.name}} {{::sample.company.code}} diff --git a/modules/client/front/sample/index/index.js b/modules/client/front/sample/index/index.js index e93c2d2dc..132704de0 100644 --- a/modules/client/front/sample/index/index.js +++ b/modules/client/front/sample/index/index.js @@ -18,7 +18,7 @@ class Controller extends Section { include: { relation: 'user', scope: { - fields: ['nickname'] + fields: ['name'] } } } diff --git a/modules/client/front/summary/index.html b/modules/client/front/summary/index.html index 9e53d4988..ce69bf158 100644 --- a/modules/client/front/summary/index.html +++ b/modules/client/front/summary/index.html @@ -21,8 +21,12 @@ - + + + {{$ctrl.summary.salesPerson.user.name}} + @@ -197,4 +201,7 @@ - \ No newline at end of file + + + \ No newline at end of file diff --git a/modules/invoiceOut/front/descriptor/index.html b/modules/invoiceOut/front/descriptor/index.html index 093d9edf7..fe22e4dd8 100644 --- a/modules/invoiceOut/front/descriptor/index.html +++ b/modules/invoiceOut/front/descriptor/index.html @@ -37,8 +37,12 @@ value="{{$ctrl.invoiceOut.amount | currency: 'EUR': 2}}"> + label="Client"> + + {{$ctrl.invoiceOut.client.name}} + - \ No newline at end of file + + + \ No newline at end of file diff --git a/modules/item/back/methods/item/filter.js b/modules/item/back/methods/item/filter.js index a38a06713..1fefab77e 100644 --- a/modules/item/back/methods/item/filter.js +++ b/modules/item/back/methods/item/filter.js @@ -113,7 +113,7 @@ module.exports = Self => { i.isActive, t.name type, t.workerFk buyerFk, - u.nickname userNickname, + u.name userName, intr.description AS intrastat, i.stems, ori.code AS origin, diff --git a/modules/item/back/methods/item/getCard.js b/modules/item/back/methods/item/getCard.js index 9780c5601..69b5c1116 100644 --- a/modules/item/back/methods/item/getCard.js +++ b/modules/item/back/methods/item/getCard.js @@ -37,7 +37,7 @@ module.exports = Self => { include: { relation: 'user', scope: { - fields: ['nickname'] + fields: ['name'] } } } diff --git a/modules/item/back/methods/item/getSummary.js b/modules/item/back/methods/item/getSummary.js index fd52951d7..698984572 100644 --- a/modules/item/back/methods/item/getSummary.js +++ b/modules/item/back/methods/item/getSummary.js @@ -38,7 +38,7 @@ module.exports = Self => { include: { relation: 'user', scope: { - fields: ['nickname'] + fields: ['name'] } } } diff --git a/modules/item/front/descriptor/index.html b/modules/item/front/descriptor/index.html index c872d2bf2..8363a652f 100644 --- a/modules/item/front/descriptor/index.html +++ b/modules/item/front/descriptor/index.html @@ -44,8 +44,12 @@
+ label="Buyer"> + + {{$ctrl.item.itemType.worker.user.name}} + + + \ No newline at end of file diff --git a/modules/item/front/index/index.html b/modules/item/front/index/index.html index eaef0f34f..01128ed74 100644 --- a/modules/item/front/index/index.html +++ b/modules/item/front/index/index.html @@ -70,11 +70,11 @@ {{::item.intrastat}} {{::item.origin}} - + - {{::item.userNickname}} + {{::item.userName}} {{::item.density}} diff --git a/modules/item/front/summary/index.html b/modules/item/front/summary/index.html index 938005828..bf9ab9445 100644 --- a/modules/item/front/summary/index.html +++ b/modules/item/front/summary/index.html @@ -36,8 +36,12 @@ - + + + {{$ctrl.summary.item.itemType.worker.user.name}} + @@ -105,4 +109,7 @@

- \ No newline at end of file + + + \ No newline at end of file diff --git a/modules/order/front/card/index.js b/modules/order/front/card/index.js index d154b0b52..33012d0f6 100644 --- a/modules/order/front/card/index.js +++ b/modules/order/front/card/index.js @@ -37,7 +37,7 @@ class Controller extends ModuleCard { include: { relation: 'user', scope: { - fields: ['nickname'] + fields: ['name'] } } } diff --git a/modules/order/front/descriptor/index.html b/modules/order/front/descriptor/index.html index b16470bf2..e9f1684e5 100644 --- a/modules/order/front/descriptor/index.html +++ b/modules/order/front/descriptor/index.html @@ -15,8 +15,12 @@ value="{{$ctrl.$t($ctrl.order.isConfirmed ? 'Confirmed' : 'Not confirmed')}}">
+ label="Sales person"> + + {{$ctrl.order.client.salesPerson.user.name}} + - \ No newline at end of file + + + \ No newline at end of file diff --git a/modules/route/back/methods/route/filter.js b/modules/route/back/methods/route/filter.js index eeeef1dac..c96f856f0 100644 --- a/modules/route/back/methods/route/filter.js +++ b/modules/route/back/methods/route/filter.js @@ -119,7 +119,7 @@ module.exports = Self => { r.m3, r.description, am.name agencyName, - u.nickname AS workerNickname, + u.name AS workerUserName, v.numberPlate AS vehiclePlateNumber FROM route r LEFT JOIN agencyMode am ON am.id = r.agencyModeFk @@ -128,7 +128,6 @@ module.exports = Self => { LEFT JOIN account.user u ON u.id = w.userFk` ); - stmt.merge(conn.makeSuffix(filter)); let itemsIndex = stmts.push(stmt) - 1; diff --git a/modules/route/back/methods/route/specs/summary.spec.js b/modules/route/back/methods/route/specs/summary.spec.js index ba976ae94..a9516f7c5 100644 --- a/modules/route/back/methods/route/specs/summary.spec.js +++ b/modules/route/back/methods/route/specs/summary.spec.js @@ -25,7 +25,7 @@ describe('route summary()', () => { const result = await app.models.Route.summary(1); const worker = result.route.worker().user(); - expect(worker.nickname).toEqual('deliveryNick'); + expect(worker.name).toEqual('delivery'); }); it(`should return a summary object containing data from the tickets`, async() => { diff --git a/modules/route/back/methods/route/summary.js b/modules/route/back/methods/route/summary.js index 0a8710e88..52927d974 100644 --- a/modules/route/back/methods/route/summary.js +++ b/modules/route/back/methods/route/summary.js @@ -38,7 +38,7 @@ module.exports = Self => { { relation: 'user', scope: { - fields: ['id', 'nickname'] + fields: ['id', 'name'] } } ] diff --git a/modules/route/front/index/index.html b/modules/route/front/index/index.html index 7258018f1..965c17409 100644 --- a/modules/route/front/index/index.html +++ b/modules/route/front/index/index.html @@ -38,7 +38,7 @@ - {{::route.workerNickname}} + {{::route.workerUserName}}
{{::route.agencyName | dashIfEmpty}} diff --git a/modules/route/front/summary/index.html b/modules/route/front/summary/index.html index b2c9255e0..4c45d3985 100644 --- a/modules/route/front/summary/index.html +++ b/modules/route/front/summary/index.html @@ -14,8 +14,12 @@ - + + + {{$ctrl.summary.route.worker.user.name}} + @@ -106,3 +110,6 @@ + + diff --git a/modules/ticket/back/methods/ticket/summary.js b/modules/ticket/back/methods/ticket/summary.js index 79a7c24d9..434cf5624 100644 --- a/modules/ticket/back/methods/ticket/summary.js +++ b/modules/ticket/back/methods/ticket/summary.js @@ -63,7 +63,7 @@ module.exports = Self => { include: { relation: 'user', scope: { - fields: ['nickname'] + fields: ['name'] } } } diff --git a/modules/ticket/front/card/index.js b/modules/ticket/front/card/index.js index 5b3c3c405..34ec2be98 100644 --- a/modules/ticket/front/card/index.js +++ b/modules/ticket/front/card/index.js @@ -44,7 +44,7 @@ class Controller extends ModuleCard { include: { relation: 'user', scope: { - fields: ['nickname'] + fields: ['name'] } } } diff --git a/modules/ticket/front/descriptor/index.html b/modules/ticket/front/descriptor/index.html index 1ad27aac3..f5c4891c3 100644 --- a/modules/ticket/front/descriptor/index.html +++ b/modules/ticket/front/descriptor/index.html @@ -90,8 +90,12 @@ value="{{$ctrl.ticket.ticketState.state.name}}"> + label="Sales person"> + + {{$ctrl.ticket.client.salesPerson.user.name}} + - \ No newline at end of file + + + \ No newline at end of file diff --git a/modules/ticket/front/descriptor/index.js b/modules/ticket/front/descriptor/index.js index fdcd50e3c..b67474427 100644 --- a/modules/ticket/front/descriptor/index.js +++ b/modules/ticket/front/descriptor/index.js @@ -210,7 +210,7 @@ class Controller extends Descriptor { include: { relation: 'user', scope: { - fields: ['nickname'] + fields: ['name'] } } } diff --git a/modules/ticket/front/dms/index/index.html b/modules/ticket/front/dms/index/index.html index 80ddbf899..851276a6b 100644 --- a/modules/ticket/front/dms/index/index.html +++ b/modules/ticket/front/dms/index/index.html @@ -51,6 +51,12 @@ {{::document.dms.description}} + + + + @@ -60,8 +66,9 @@ - {{::document.dms.worker.user.nickname | dashIfEmpty}} - + {{::document.dms.worker.user.name | dashIfEmpty}} + + {{::document.dms.created | date:'dd/MM/yyyy HH:mm'}} diff --git a/modules/ticket/front/dms/index/index.js b/modules/ticket/front/dms/index/index.js index 2a67d6890..da6aa6b6f 100644 --- a/modules/ticket/front/dms/index/index.js +++ b/modules/ticket/front/dms/index/index.js @@ -33,7 +33,7 @@ class Controller extends Section { include: { relation: 'user', scope: { - fields: ['nickname'] + fields: ['name'] } }, } diff --git a/modules/ticket/front/summary/index.html b/modules/ticket/front/summary/index.html index 7b0e9d06d..ed269914c 100644 --- a/modules/ticket/front/summary/index.html +++ b/modules/ticket/front/summary/index.html @@ -18,8 +18,12 @@ - + + + {{$ctrl.summary.client.salesPerson.user.name}} + @@ -239,4 +243,7 @@ - \ No newline at end of file + + + diff --git a/modules/ticket/front/tracking/index/index.html b/modules/ticket/front/tracking/index/index.html index bf22bfb98..42d2197d0 100644 --- a/modules/ticket/front/tracking/index/index.html +++ b/modules/ticket/front/tracking/index/index.html @@ -25,7 +25,7 @@ - {{::tracking.worker.user.nickname | dashIfEmpty}} + {{::tracking.worker.user.name | dashIfEmpty}} {{::tracking.created | date:'dd/MM/yyyy HH:mm'}} diff --git a/modules/ticket/front/tracking/index/index.js b/modules/ticket/front/tracking/index/index.js index 5528fc1ad..38abcd8ab 100644 --- a/modules/ticket/front/tracking/index/index.js +++ b/modules/ticket/front/tracking/index/index.js @@ -13,7 +13,7 @@ class Controller extends Section { include: { relation: 'user', scope: { - fields: ['nickname'] + fields: ['name'] } } } diff --git a/modules/travel/front/descriptor/locale/es.yml b/modules/travel/front/descriptor/locale/es.yml index 1f51a0132..0ae18fdbf 100644 --- a/modules/travel/front/descriptor/locale/es.yml +++ b/modules/travel/front/descriptor/locale/es.yml @@ -1,6 +1,6 @@ Reference: Referencia -Wh. In: Warehouse entrada -Wh. Out: Warehouse salida +Wh. In: Almacén entrada +Wh. Out: Almacén salida Shipped: F. envío Landed: F. entrega Total entries: Entradas totales \ No newline at end of file diff --git a/modules/worker/front/dms/index/index.html b/modules/worker/front/dms/index/index.html index 4564dba44..d74d65bfa 100644 --- a/modules/worker/front/dms/index/index.html +++ b/modules/worker/front/dms/index/index.html @@ -18,6 +18,7 @@ Reference Description Original + File Created @@ -36,7 +37,13 @@ {{::document.description}} - + + + + +