From 9ec32586f2c0c74df32064e65bc5760ff97a0d64 Mon Sep 17 00:00:00 2001 From: Chika Date: Thu, 27 Oct 2022 11:53:57 +0300 Subject: [PATCH] =?UTF-8?q?process/leasingWithoutKasko:=20=D0=B4=D0=BE?= =?UTF-8?q?=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=D0=B8=20warning?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Effects/reactions/otherReactions.ts | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/client/stores/CalculationStore/Effects/reactions/otherReactions.ts b/src/client/stores/CalculationStore/Effects/reactions/otherReactions.ts index ba5532a..1c62666 100644 --- a/src/client/stores/CalculationStore/Effects/reactions/otherReactions.ts +++ b/src/client/stores/CalculationStore/Effects/reactions/otherReactions.ts @@ -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;