From bbdf1becbe460d6c9a91bb8f36404be4b6195cdd Mon Sep 17 00:00:00 2001 From: Chika Date: Fri, 22 Jan 2021 15:37:45 +0300 Subject: [PATCH] selectquote validation by recalcwithoutrevision --- .../CalculationStore/Effects/actions/calculate/validate.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/client/stores/CalculationStore/Effects/actions/calculate/validate.ts b/src/client/stores/CalculationStore/Effects/actions/calculate/validate.ts index 8ee1148..a37c897 100644 --- a/src/client/stores/CalculationStore/Effects/actions/calculate/validate.ts +++ b/src/client/stores/CalculationStore/Effects/actions/calculate/validate.ts @@ -1,4 +1,3 @@ -import { toJS } from 'mobx'; import { elementsValues } from 'client/Containers/Calculation/lib/elements/values'; import { TElements } from 'core/types/Calculation/Store/elements'; import CalculationStore from '../../..'; @@ -34,6 +33,9 @@ const elementsValidations: TElements = { tbxFirstPaymentPerc: VALIDATIONS.IS_NULL, tbxFirstPaymentRub: VALIDATIONS.IS_NULL, tbxLeaseObjectCount: VALIDATIONS.LESS_OR_EQUALS_ZERO, + selectQuote: valueName => + CalculationStore.getValue('recalcWithRevision') === true && + !CalculationStore.getValue(valueName), }; const validateElement = (elementName, condition) => {