selectquote validation by recalcwithoutrevision

This commit is contained in:
Chika 2021-01-22 15:37:45 +03:00
parent 7a53c152a0
commit bbdf1becbe

View File

@ -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<any> = {
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) => {