fix: disable load quote if quoteid is null
This commit is contained in:
parent
d2d22baab9
commit
c3c93d3109
@ -45,7 +45,10 @@ const loadKpReaction: IReactionEffect = calculationStore => ({
|
||||
return quote;
|
||||
},
|
||||
effect: quoteId => {
|
||||
const { lead, quote, opportunity } = calculationStore.values;
|
||||
if (!quoteId) {
|
||||
return;
|
||||
}
|
||||
const { lead, opportunity } = calculationStore.values;
|
||||
|
||||
calculationStore.setStatus('selectQuote', ElementStatus.Disabled);
|
||||
calculationStore.setStatus('btnCalculate', ElementStatus.Disabled);
|
||||
@ -229,7 +232,7 @@ const loadKpReaction: IReactionEffect = calculationStore => ({
|
||||
content: `КП ${quote?.evo_quotename || ''} загружено!`,
|
||||
});
|
||||
}
|
||||
})
|
||||
})
|
||||
.finally(() => {
|
||||
calculationStore.setStatus('selectQuote', ElementStatus.Default);
|
||||
calculationStore.setStatus('btnCalculate', ElementStatus.Default);
|
||||
|
||||
Reference in New Issue
Block a user