блокируем фингап если выбран лизинг без каско
This commit is contained in:
parent
6adebcd014
commit
8d0fc78b38
@ -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 => ({
|
calculationStore => ({
|
||||||
expression: () => {
|
expression: () => {
|
||||||
const { leasingPeriod, leaseObjectType } = calculationStore.values;
|
const { leasingPeriod, leaseObjectType } = calculationStore.values;
|
||||||
|
|||||||
Reference in New Issue
Block a user