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) => {
|
Self.sendCheckingPresence = async(ctx, recipientId, message, options) => {
|
||||||
console.log(ctx, recipientId, message, options);
|
|
||||||
if (!recipientId) return false;
|
if (!recipientId) return false;
|
||||||
|
|
||||||
const myOptions = {};
|
const myOptions = {};
|
||||||
|
@ -39,10 +38,7 @@ module.exports = Self => {
|
||||||
const recipient = await models.Account.findById(recipientId, null, myOptions);
|
const recipient = await models.Account.findById(recipientId, null, myOptions);
|
||||||
|
|
||||||
// Prevent sending messages to yourself
|
// Prevent sending messages to yourself
|
||||||
console.log('llega');
|
|
||||||
console.log(recipientId, userId);
|
|
||||||
if (recipientId == userId) return false;
|
if (recipientId == userId) return false;
|
||||||
console.log('llega2');
|
|
||||||
|
|
||||||
if (!recipient)
|
if (!recipient)
|
||||||
throw new Error(`Could not send message "${message}" to worker id ${recipientId} from user ${userId}`);
|
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', {
|
const message = $t('Claim pickup order sent', {
|
||||||
claimId: args.id,
|
claimId: args.id,
|
||||||
clientName: claim.client.name,
|
clientName: claim.client().name,
|
||||||
claimUrl: `${origin}/#!/claim/${args.id}/summary`,
|
claimUrl: `${origin}/#!/claim/${args.id}/summary`,
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log(claim.client());
|
|
||||||
const salesPersonId = claim.client().salesPersonFk;
|
const salesPersonId = claim.client().salesPersonFk;
|
||||||
if (claim.client().salesPersonFk)
|
if (salesPersonId)
|
||||||
console.log(await models.Chat.sendCheckingPresence(ctx, 25, message));
|
await models.Chat.sendCheckingPresence(ctx, salesPersonId, message);
|
||||||
|
|
||||||
console.log(claim.client().salesPersonFk);
|
|
||||||
|
|
||||||
await models.ClaimLog.create({
|
await models.ClaimLog.create({
|
||||||
originFk: args.id,
|
originFk: args.id,
|
||||||
|
|
|
@ -13,7 +13,7 @@ module.exports = {
|
||||||
|
|
||||||
if (!this.ticket)
|
if (!this.ticket)
|
||||||
throw new Error('Something went wrong');
|
throw new Error('Something went wrong');
|
||||||
console.log();
|
|
||||||
this.instructions = this.$t('description.instructions', [this.id, this.ticket.id]);
|
this.instructions = this.$t('description.instructions', [this.id, this.ticket.id]);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
Loading…
Reference in New Issue