From d693d40912d3486a3787618aaaad8a3d6c07fee7 Mon Sep 17 00:00:00 2001 From: Chika Date: Mon, 5 Sep 2022 14:31:27 +0300 Subject: [PATCH] =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD?= =?UTF-8?q?=D0=B4=D1=80=20=D0=A1=D0=B5=D0=BC=D0=BA=D0=B8=D0=BD,=20[05.09.2?= =?UTF-8?q?022=2014:30]=20=D1=82.=D0=B5.=20=D0=B2=D0=B5=D1=80=D0=B8=D1=84?= =?UTF-8?q?=D0=B8=D0=BA=D0=B0=D1=86=D0=B8=D1=8F=20=D0=BF=D1=80=D0=BE=D0=B2?= =?UTF-8?q?=D0=BE=D0=B4=D0=B8=D1=82=D1=81=D1=8F=20=D1=82=D0=BE=D0=BB=D1=8C?= =?UTF-8?q?=D0=BA=D0=BE=20=D0=B2=20=D1=81=D0=BB=D1=83=D1=87=D0=B0=D0=B5=20?= =?UTF-8?q?=D0=BD=D0=B0=D0=BB=D0=B8=D1=87=D0=B8=D1=8F=20=D0=B7=D0=BD=D0=B0?= =?UTF-8?q?=D1=87=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=B2=20=D0=BF=D0=BE=D0=BB?= =?UTF-8?q?=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Александр Семкин, [05.09.2022 14:30] т.е. я могу сделать расчет и без VIN --- src/client/process/used-pl/reactions.ts | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/client/process/used-pl/reactions.ts b/src/client/process/used-pl/reactions.ts index 462b881..834cc53 100644 --- a/src/client/process/used-pl/reactions.ts +++ b/src/client/process/used-pl/reactions.ts @@ -354,13 +354,15 @@ export default function ($calculation: ICalculationStore) { }; }, ({ vin }) => { - if ($calculation.getValue('leaseObjectCategory')) { - $calculation.setValidation( - 'tbxVIN', - vin.length === 17 && vinRegex.test(vin), - ); - } else { - $calculation.setValidation('tbxVIN', vinRegex.test(vin)); + if (vin) { + if ($calculation.getValue('leaseObjectCategory')) { + $calculation.setValidation( + 'tbxVIN', + vin.length === 17 && vinRegex.test(vin), + ); + } else { + $calculation.setValidation('tbxVIN', vinRegex.test(vin)); + } } }, );