diff --git a/loopback/locale/es.json b/loopback/locale/es.json index d7f9564fe4..afb6aae3dc 100644 --- a/loopback/locale/es.json +++ b/loopback/locale/es.json @@ -277,7 +277,7 @@ "Collection does not exist": "La colección no existe", "Cannot obtain exclusive lock": "No se puede obtener un bloqueo exclusivo", "Insert a date range": "Inserte un rango de fechas", - "Added observation": "{{user}} añadió esta observacion: {{text}}", + "Added observation": "{{user}} añadió esta observacion: {{text}} {defaulterUrl}", "Comment added to client": "Observación añadida al cliente {{clientFk}}", "Invalid auth code": "Código de verificación incorrecto", "Invalid or expired verification code": "Código de verificación incorrecto o expirado", @@ -354,4 +354,4 @@ "They're not your subordinate": "No es tu subordinado/a.", "No results found": "No se han encontrado resultados", "InvoiceIn is already booked": "La factura recibida está contabilizada" -} \ No newline at end of file +} diff --git a/modules/client/back/methods/defaulter/observationEmail.js b/modules/client/back/methods/defaulter/observationEmail.js index 5ac00b4ee6..5b13e82822 100644 --- a/modules/client/back/methods/defaulter/observationEmail.js +++ b/modules/client/back/methods/defaulter/observationEmail.js @@ -29,6 +29,7 @@ module.exports = Self => { const $t = ctx.req.__; // $translate const myOptions = {}; const userId = ctx.req.accessToken.userId; + const url = await Self.app.models.Url.getUrl(); if (typeof options == 'object') Object.assign(myOptions, options); @@ -38,7 +39,8 @@ module.exports = Self => { const body = $t('Added observation', { user: user.name, - text: observation + text: observation, + defaulterUrl: `${url}client/${defaulter.clientFk}/summary` }); await models.Mail.create({