8144-devToTest_2444 #3137

Merged
alexm merged 90 commits from 8144-devToTest_2444 into test 2024-10-22 06:07:15 +00:00
1 changed files with 5 additions and 7 deletions
Showing only changes of commit eea09a9d4a - Show all commits

View File

@ -85,13 +85,11 @@ module.exports = Self => {
const updatedClaim = await claim.updateAttributes(args, myOptions); const updatedClaim = await claim.updateAttributes(args, myOptions);
const salesPerson = claim.client().salesPersonUser(); const salesPerson = claim.client().salesPersonUser();
if (salesPerson) { if (salesPerson && args.claimStateFk) {
if (args.claimStateFk) { const newState = await models.ClaimState.findById(args.claimStateFk, null, myOptions);
const newState = await models.ClaimState.findById(args.claimStateFk, null, myOptions); await notifyStateChange(ctx, salesPerson.id, claim, newState.description);
await notifyStateChange(ctx, salesPerson.id, claim, newState.description); if (newState.code == 'canceled')
if (newState.code == 'canceled') await notifyStateChange(ctx, claim.workerFk, claim, newState.description);
await notifyStateChange(ctx, claim.workerFk, claim, newState.description);
}
} }
if (tx) await tx.commit(); if (tx) await tx.commit();