From a5c3ba3926d414662d59a4d99d7055d3c269ec0d Mon Sep 17 00:00:00 2001 From: joan Date: Wed, 19 May 2021 10:26:58 +0200 Subject: [PATCH 1/5] 2921 - Changed the ticket url of rocket notifications --- modules/claim/back/methods/claim/regularizeClaim.js | 2 +- modules/ticket/back/methods/ticket/componentUpdate.js | 2 +- modules/ticket/back/methods/ticket/deleteStowaway.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/claim/back/methods/claim/regularizeClaim.js b/modules/claim/back/methods/claim/regularizeClaim.js index 99d9055b2..16ef1adfe 100644 --- a/modules/claim/back/methods/claim/regularizeClaim.js +++ b/modules/claim/back/methods/claim/regularizeClaim.js @@ -62,7 +62,7 @@ module.exports = Self => { itemId: sale.itemFk, ticketId: sale.ticketFk, nickname: nickname, - ticketUrl: `${origin}/#!/ticket/${sale.ticketFk}/summary`, + ticketUrl: `${origin}/#!/ticket/${sale.ticketFk}/sale`, itemUrl: `${origin}/#!/item/${sale.itemFk}/summary` }); await models.Chat.sendCheckingPresence(ctx, salesPerson.id, message); diff --git a/modules/ticket/back/methods/ticket/componentUpdate.js b/modules/ticket/back/methods/ticket/componentUpdate.js index c4d1baed1..44e85c093 100644 --- a/modules/ticket/back/methods/ticket/componentUpdate.js +++ b/modules/ticket/back/methods/ticket/componentUpdate.js @@ -221,7 +221,7 @@ module.exports = Self => { const message = $t('Changed this data from the ticket', { ticketId: args.id, - ticketUrl: `${origin}/#!/ticket/${args.id}/summary`, + ticketUrl: `${origin}/#!/ticket/${args.id}/sale`, changes: changesMade }); await models.Chat.sendCheckingPresence(ctx, salesPersonId, message, myOptions); diff --git a/modules/ticket/back/methods/ticket/deleteStowaway.js b/modules/ticket/back/methods/ticket/deleteStowaway.js index 5f51b08a4..b86cdc464 100644 --- a/modules/ticket/back/methods/ticket/deleteStowaway.js +++ b/modules/ticket/back/methods/ticket/deleteStowaway.js @@ -77,7 +77,7 @@ module.exports = Self => { const origin = ctx.req.headers.origin; const message = $t('This ticket is not an stowaway anymore', { ticketId: stowawayFk, - ticketUrl: `${origin}/#!/ticket/${stowawayFk}/summary` + ticketUrl: `${origin}/#!/ticket/${stowawayFk}/sale` }); await models.Chat.sendCheckingPresence(ctx, salesPerson.id, message); } From df073cce2ff1af05cc8afa0c6f27adaeb6c2c383 Mon Sep 17 00:00:00 2001 From: jgallego Date: Wed, 19 May 2021 17:04:13 +0200 Subject: [PATCH 2/5] refactor tod usa get sales --- modules/ticket/back/methods/ticket/summary.js | 16 +--------------- modules/ticket/front/summary/index.html | 11 +++++------ 2 files changed, 6 insertions(+), 21 deletions(-) diff --git a/modules/ticket/back/methods/ticket/summary.js b/modules/ticket/back/methods/ticket/summary.js index 08de35482..760a71e2b 100644 --- a/modules/ticket/back/methods/ticket/summary.js +++ b/modules/ticket/back/methods/ticket/summary.js @@ -22,7 +22,7 @@ module.exports = Self => { Self.summary = async ticketFk => { let models = Self.app.models; let summaryObj = await getTicketData(Self, ticketFk); - summaryObj.sales = await getSales(models.Sale, ticketFk); + summaryObj.sales = await models.Ticket.getSales(ticketFk); summaryObj.packagings = await models.TicketPackaging.find({ where: {ticketFk: ticketFk}, include: [{relation: 'packaging', @@ -102,20 +102,6 @@ module.exports = Self => { return await Self.findOne(filter); } - async function getSales(Sale, ticketFk) { - let filter = { - where: { - ticketFk: ticketFk - }, - order: 'concept', - include: [ - {relation: 'item'}, - {relation: 'claimBeginning'} - ] - }; - return await Sale.find(filter); - } - async function getRequests(Self, ticketFk) { let filter = { where: { diff --git a/modules/ticket/front/summary/index.html b/modules/ticket/front/summary/index.html index 6c25f2665..1441024ba 100644 --- a/modules/ticket/front/summary/index.html +++ b/modules/ticket/front/summary/index.html @@ -120,6 +120,7 @@ Item + Available Quantity Description Price @@ -137,12 +138,6 @@ vn-tooltip="{{::$ctrl.$t('Claim')}}: {{::sale.claimBeginning.claimFk}}"> - - @@ -152,6 +147,10 @@ {{sale.itemFk | zeroFill:6}} + + {{::sale.available}} + + {{::sale.quantity}} {{::sale.item.name}} From b7bcb4bd176875fd1ea0c116d4f0fa20a8f1a2cd Mon Sep 17 00:00:00 2001 From: jgallego Date: Wed, 19 May 2021 19:15:47 +0200 Subject: [PATCH 3/5] selectores --- e2e/helpers/selectors.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index 69425a1b7..143196d18 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -461,8 +461,8 @@ export default { itemDescriptorPopover: '.vn-popover.shown vn-item-descriptor', itemDescriptorPopoverItemDiaryButton: 'vn-item-descriptor a[href="#!/item/2/diary?warehouseFk=5&lineFk=16"]', 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)', + firstSaleQuantity: 'vn-ticket-summary [name="sales"] vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(4)', + firstSaleDiscount: 'vn-ticket-summary [name="sales"] vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(7)', 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', descriptorTicketId: 'vn-ticket-descriptor > vn-descriptor-content > div > div.body > div.top > div' From b7049122fe27b65087b6bcbe030f185392ab10ef Mon Sep 17 00:00:00 2001 From: joan Date: Thu, 20 May 2021 10:28:37 +0200 Subject: [PATCH 4/5] Url fix --- modules/client/back/models/credit-insurance.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/client/back/models/credit-insurance.js b/modules/client/back/models/credit-insurance.js index 2a02ce41f..a2e8091e1 100644 --- a/modules/client/back/models/credit-insurance.js +++ b/modules/client/back/models/credit-insurance.js @@ -58,7 +58,7 @@ module.exports = function(Self) { const httpRequest = httpCtx.req.http.req; const $t = httpRequest.__; const origin = httpRequest.headers.origin; - const fullPath = `${origin}/#!/client/${client.id}`; + const fullPath = `${origin}/#!/client/${client.id}/credit-insurance/index`; const message = $t('MESSAGE_INSURANCE_CHANGE', { clientId: client.id, clientName: client.name, From 95073183e904a711cb4961dcdcada8fd3c3a5daa Mon Sep 17 00:00:00 2001 From: joan Date: Fri, 21 May 2021 14:19:39 +0200 Subject: [PATCH 5/5] Email rollback --- print/templates/reports/claim-pickup-order/locale/es.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/print/templates/reports/claim-pickup-order/locale/es.yml b/print/templates/reports/claim-pickup-order/locale/es.yml index b4e8a825c..28bfa73a9 100644 --- a/print/templates/reports/claim-pickup-order/locale/es.yml +++ b/print/templates/reports/claim-pickup-order/locale/es.yml @@ -12,4 +12,4 @@ claim: Reclamación {0} sections: agency: description: 'Para agilizar su recogida, por favor, póngase en contacto con la oficina - de integrados.
Tlf: 96 166 77 88 - Ana Gómez (Ext. 2113) (agomez@integra2.com)' + de integrados.
Tlf: 96 166 77 88 - Ana Gómez (Ext. 2113) (agomezf@integra2.com)'