fix send email
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
e9731c4ac0
commit
9170c22d6f
|
@ -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}`);
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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: {
|
||||
|
|
Loading…
Reference in New Issue