process/leasingWithoutKasko: добавили warning

This commit is contained in:
Chika 2022-10-27 11:53:57 +03:00
parent 7daff3ccce
commit 9ec32586f2

View File

@ -894,6 +894,28 @@ const reactionEffects: IReactionEffect[] = [
},
}),
calculationStore => ({
expression: () => {
return {
options: calculationStore.getOptions(
'selectLeasingWithoutKasko',
undefined,
true,
),
value: calculationStore.getValue('leasingWithoutKasko'),
};
},
effect: (nextValues, prevValues) => {
if (prevValues.value && !nextValues.value) {
openNotification({
type: 'warning',
message: 'Внимание',
description: 'Лизинг без КАСКО был сброшен',
});
}
},
}),
calculationStore => ({
expression: () => {
const { leasingPeriod, leaseObjectType } = calculationStore.values;