reset opportunity if lead is null

This commit is contained in:
Владислав Чикалкин 2020-09-25 15:50:10 +03:00
parent 86817d4928
commit fbf8a9f757

View File

@ -9,6 +9,10 @@ const reactionEffects: IReactionEffect[] = [
return values.lead;
},
effect: async leadId => {
if (!leadId) {
calculationStore.setValue('opportunity', null);
return;
}
const lead = calculationStore.options.selectLead?.find(
x => x.leadid === leadId,
);