added translation

This commit is contained in:
Joan Sanchez 2020-02-04 12:28:01 +01:00
parent 5b0bb5dc73
commit 494b14bab4
4 changed files with 9 additions and 4 deletions

View File

@ -63,5 +63,6 @@
"MESSAGE_CHANGED_PAYMETHOD": "I have changed the pay method for client [{{clientName}} (#{{clientId}})]({{{url}}})",
"MESSAGE_CLAIM_ITEM_REGULARIZE": "I sent *{{quantity}}* units of [{{concept}} (#{{itemId}})]({{{itemUrl}}}) to {{nickname}} coming from ticket id [#{{ticketId}}]({{{ticketUrl}}})",
"Customs agent is required for a non UEE member": "Customs agent is required for a non UEE member",
"Incoterms is required for a non UEE member": "Incoterms is required for a non UEE member"
"Incoterms is required for a non UEE member": "Incoterms is required for a non UEE member",
"Client checked as validated despite of duplication": "Client checked as validated despite of duplication from client id {{clientId}}"
}

View File

@ -124,5 +124,6 @@
"MESSAGE_BOUGHT_UNITS": "Se ha comprado {{quantity}} unidades de {{concept}} (#{{itemId}}) para el ticket id [#{{ticketId}}]({{{url}}})",
"MESSAGE_INSURANCE_CHANGE": "He cambiado el crédito asegurado del cliente [{{clientName}} (#{{clientId}})]({{{url}}}) a *{{credit}} €*",
"MESSAGE_CHANGED_PAYMETHOD": "He cambiado la forma de pago del cliente [{{clientName}} (#{{clientId}})]({{{url}}})",
"MESSAGE_CLAIM_ITEM_REGULARIZE": "Envio *{{quantity}}* unidades de [{{concept}} (#{{itemId}})]({{{itemUrl}}}) a {{nickname}} provenientes del ticket id [#{{ticketId}}]({{{ticketUrl}}})"
"MESSAGE_CLAIM_ITEM_REGULARIZE": "Envio *{{quantity}}* unidades de [{{concept}} (#{{itemId}})]({{{itemUrl}}}) a {{nickname}} provenientes del ticket id [#{{ticketId}}]({{{ticketUrl}}})",
"Client checked as validated despite of duplication": "Cliente comprobado a pesar de que existe el cliente id {{clientId}}"
}

View File

@ -99,6 +99,7 @@ module.exports = Self => {
const args = ctx.args;
const userId = ctx.req.accessToken.userId;
const isSalesAssistant = await models.Account.hasRole(userId, 'salesAssistant');
const $t = ctx.req.__;
const client = await models.Client.findById(clientId);
@ -106,13 +107,16 @@ module.exports = Self => {
throw new UserError(`You can't make changes on a client with verified data`);
if (args.despiteOfClient) {
const translatedDescription = $t(`Client checked as validated despite of duplication`, {
clientId: args.despiteOfClient
});
const logRecord = {
originFk: clientId,
userFk: userId,
action: 'update',
changedModel: 'Client',
changedModelId: clientId,
description: `Cliente comprobado a pesar de que existe el cliente id ${args.despiteOfClient}`
description: translatedDescription
};
await models.ClientLog.create(logRecord);

View File

@ -44,7 +44,6 @@ export default class Controller extends Component {
else if (equalizatedHasChanged)
return this.onAcceptEt();
return this.$q.resolve();
}