fix send email
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Alex Moreno 2022-10-28 09:21:28 +02:00
parent e9731c4ac0
commit 9170c22d6f
3 changed files with 4 additions and 12 deletions

View File

@ -25,7 +25,6 @@ module.exports = Self => {
});
Self.sendCheckingPresence = async(ctx, recipientId, message, options) => {
console.log(ctx, recipientId, message, options);
if (!recipientId) return false;
const myOptions = {};
@ -39,10 +38,7 @@ module.exports = Self => {
const recipient = await models.Account.findById(recipientId, null, myOptions);
// Prevent sending messages to yourself
console.log('llega');
console.log(recipientId, userId);
if (recipientId == userId) return false;
console.log('llega2');
if (!recipient)
throw new Error(`Could not send message "${message}" to worker id ${recipientId} from user ${userId}`);

View File

@ -66,20 +66,16 @@ module.exports = Self => {
}
}
});
console.log(claim);
const message = $t('Claim pickup order sent', {
claimId: args.id,
clientName: claim.client.name,
clientName: claim.client().name,
claimUrl: `${origin}/#!/claim/${args.id}/summary`,
});
console.log(claim.client());
const salesPersonId = claim.client().salesPersonFk;
if (claim.client().salesPersonFk)
console.log(await models.Chat.sendCheckingPresence(ctx, 25, message));
console.log(claim.client().salesPersonFk);
if (salesPersonId)
await models.Chat.sendCheckingPresence(ctx, salesPersonId, message);
await models.ClaimLog.create({
originFk: args.id,

View File

@ -13,7 +13,7 @@ module.exports = {
if (!this.ticket)
throw new Error('Something went wrong');
console.log();
this.instructions = this.$t('description.instructions', [this.id, this.ticket.id]);
},
methods: {