Merge branch 'test' of https://gitea.verdnatura.es/verdnatura/salix into dev
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Joan Sanchez 2020-06-03 18:15:03 +02:00
commit e4d77017b4
3 changed files with 10 additions and 7 deletions

View File

@ -4,11 +4,11 @@ const smtp = require('../core/smtp');
const config = require('../core/config'); const config = require('../core/config');
module.exports = app => { module.exports = app => {
app.get('/api/closure/by-ticket', async function(request, response) { app.get('/api/closure/by-ticket', async function(req, res) {
}); });
app.get('/api/closure/all', async function(request, response) { app.get('/api/closure/all', async function(req, res) {
response.status(200).json({ res.status(200).json({
message: 'Task executed successfully' message: 'Task executed successfully'
}); });
@ -19,6 +19,7 @@ module.exports = app => {
t.clientFk, t.clientFk,
c.email recipient, c.email recipient,
c.isToBeMailed, c.isToBeMailed,
c.salesPersonFk,
eu.email salesPersonEmail eu.email salesPersonEmail
FROM expedition e FROM expedition e
JOIN ticket t ON t.id = e.ticketFk JOIN ticket t ON t.id = e.ticketFk
@ -53,11 +54,13 @@ module.exports = app => {
continue; continue;
} }
const args = { const reqArgs = req.args;
const args = Object.assign({
ticketId: ticket.id, ticketId: ticket.id,
recipientId: ticket.clientFk, recipientId: ticket.clientFk,
recipient: ticket.recipient recipient: ticket.recipient
}; }, reqArgs);
const email = new Email('delivery-note-link', args); const email = new Email('delivery-note-link', args);
await email.send(); await email.send();
} catch (error) { } catch (error) {

View File

@ -5,6 +5,6 @@ description: The delivery note from the order <strong>{0}</strong> is now availa
You can download it by clicking <a href="https://www.verdnatura.es/#!form=ecomerce/ticket&ticket={0}">this link</a>. You can download it by clicking <a href="https://www.verdnatura.es/#!form=ecomerce/ticket&ticket={0}">this link</a>.
copyLink: 'As an alternative, you can copy the following link in your browser:' copyLink: 'As an alternative, you can copy the following link in your browser:'
poll: If you wish, you can answer our satisfaction survey to poll: If you wish, you can answer our satisfaction survey to
   help us provide better service. Your opinion is very important for us! help us provide better service. Your opinion is very important for us!
help: Any questions that arise, do not hesitate to consult it, <strong>we are here to assist you!</strong> help: Any questions that arise, do not hesitate to consult it, <strong>we are here to assist you!</strong>
conclusion: Thanks for your attention! conclusion: Thanks for your attention!

View File

@ -4,6 +4,6 @@ dear: Dear client
description: The delivery note from the order <strong>{0}</strong> is now available. <br/> description: The delivery note from the order <strong>{0}</strong> is now available. <br/>
You can download it by clicking on the attachment of this email. You can download it by clicking on the attachment of this email.
poll: If you wish, you can answer our satisfaction survey to poll: If you wish, you can answer our satisfaction survey to
   help us provide better service. Your opinion is very important for us! help us provide better service. Your opinion is very important for us!
help: Any questions that arise, do not hesitate to consult it, <strong>we are here to assist you!</strong> help: Any questions that arise, do not hesitate to consult it, <strong>we are here to assist you!</strong>
conclusion: Thanks for your attention! conclusion: Thanks for your attention!