Merge branch 'development'

This commit is contained in:
Chika 2022-11-10 17:37:52 +03:00
commit 988e293fbb

View File

@ -916,6 +916,32 @@ const reactionEffects: IReactionEffect[] = [
},
}),
calculationStore => ({
expression: () => {
return calculationStore.getValue('leasingWithoutKasko');
},
effect: leasingWithoutKasko => {
if (leasingWithoutKasko) {
calculationStore.setTableRow('tableInsurance', rows =>
rows.findIndex(x => x?.key === 'finGAP'),
)({
insuranceCompany: {
value: null,
status: ElementStatus.Disabled,
},
});
} else {
calculationStore.setTableRow('tableInsurance', rows =>
rows.findIndex(x => x?.key === 'finGAP'),
)({
insuranceCompany: {
status: ElementStatus.Default,
},
});
}
},
}),
calculationStore => ({
expression: () => {
const { leasingPeriod, leaseObjectType } = calculationStore.values;