From 430aaa641c2c48e7a50948dd144c3c2d4f160348 Mon Sep 17 00:00:00 2001 From: vchikalkin Date: Thu, 13 Apr 2023 19:26:09 +0300 Subject: [PATCH] process/gibdd: supplierFinancing --- apps/web/process/gibdd/reactions.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/web/process/gibdd/reactions.ts b/apps/web/process/gibdd/reactions.ts index 3541dae..c65bdf6 100644 --- a/apps/web/process/gibdd/reactions.ts +++ b/apps/web/process/gibdd/reactions.ts @@ -19,8 +19,8 @@ export function common({ store, apolloClient, queryClient }: ProcessContext) { const { $calculation, $process } = store; reaction( - () => $calculation.element('selectLeaseObjectType').getValue(), - async (leaseObjectTypeId) => { + () => $calculation.$values.getValues(['leaseObjectType', 'supplierFinancing']), + async ({ leaseObjectType: leaseObjectTypeId, supplierFinancing }) => { if (!leaseObjectTypeId) { $calculation.element('radioObjectRegistration').resetValue().unblock(); @@ -34,8 +34,9 @@ export function common({ store, apolloClient, queryClient }: ProcessContext) { }); if ( - evo_leasingobject_type?.evo_id && - ['6', '9', '10', '11'].includes(evo_leasingobject_type.evo_id) + supplierFinancing || + (evo_leasingobject_type?.evo_id && + ['6', '9', '10', '11'].includes(evo_leasingobject_type.evo_id)) ) { $calculation.element('radioObjectRegistration').setValue(100_000_000).block(); } else {