From 8d0fc78b3818facc2b23ffae7e8e50272ebc5bf0 Mon Sep 17 00:00:00 2001 From: Chika Date: Thu, 10 Nov 2022 17:30:52 +0300 Subject: [PATCH] =?UTF-8?q?=D0=B1=D0=BB=D0=BE=D0=BA=D0=B8=D1=80=D1=83?= =?UTF-8?q?=D0=B5=D0=BC=20=D1=84=D0=B8=D0=BD=D0=B3=D0=B0=D0=BF=20=D0=B5?= =?UTF-8?q?=D1=81=D0=BB=D0=B8=20=D0=B2=D1=8B=D0=B1=D1=80=D0=B0=D0=BD=20?= =?UTF-8?q?=D0=BB=D0=B8=D0=B7=D0=B8=D0=BD=D0=B3=20=D0=B1=D0=B5=D0=B7=20?= =?UTF-8?q?=D0=BA=D0=B0=D1=81=D0=BA=D0=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Effects/reactions/otherReactions.ts | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/client/stores/CalculationStore/Effects/reactions/otherReactions.ts b/src/client/stores/CalculationStore/Effects/reactions/otherReactions.ts index 1c62666..d15789d 100644 --- a/src/client/stores/CalculationStore/Effects/reactions/otherReactions.ts +++ b/src/client/stores/CalculationStore/Effects/reactions/otherReactions.ts @@ -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;