From e9edf189e78a4221d2fb2cba9ea34f5e15003da4 Mon Sep 17 00:00:00 2001 From: vchikalkin Date: Mon, 5 Jun 2023 13:42:46 +0300 Subject: [PATCH] fix: insurance-table fingap row --- apps/web/config/tables/insurance-table.ts | 2 +- apps/web/process/fingap/reactions/common.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/web/config/tables/insurance-table.ts b/apps/web/config/tables/insurance-table.ts index e737deb..0e35849 100644 --- a/apps/web/config/tables/insurance-table.ts +++ b/apps/web/config/tables/insurance-table.ts @@ -57,7 +57,7 @@ export const DEFAULT_FINGAP_ROW: Insurance.RowValues = { insuranceCompany: null, insured: 100_000_000, insCost: 0, - insTerm: null, + insTerm: 100_000_000, }; export const defaultValues: Insurance.RowValues[] = [ diff --git a/apps/web/process/fingap/reactions/common.ts b/apps/web/process/fingap/reactions/common.ts index 2034536..600f3af 100644 --- a/apps/web/process/fingap/reactions/common.ts +++ b/apps/web/process/fingap/reactions/common.ts @@ -68,17 +68,17 @@ export default function reactions({ store, apolloClient, queryClient }: ProcessC .row('fingap') .setValue('insured', 100_000_000) .setValue('insCost', 0) - .setValue('insTerm', leasingPeriod < 13 ? 100_000_000 : null) .unblock('insured'); if (leasingPeriod < 13) { - $tables.insurance.row('fingap').block('insTerm'); + $tables.insurance.row('fingap').block('insTerm').setValue('insTerm', 100_000_000); } else { $tables.insurance.row('fingap').unblock('insTerm'); } }, { equals: comparer.shallow, + fireImmediately: true, } );