From ba55dc7b370ea56bed5f21a0f16487379373187e Mon Sep 17 00:00:00 2001 From: Chika Date: Fri, 18 Nov 2022 16:04:44 +0300 Subject: [PATCH] fix prev commit --- .../Effects/reactions/tablesReactions.ts | 23 +++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/src/client/stores/CalculationStore/Effects/reactions/tablesReactions.ts b/src/client/stores/CalculationStore/Effects/reactions/tablesReactions.ts index b7e24bb..91f1adf 100644 --- a/src/client/stores/CalculationStore/Effects/reactions/tablesReactions.ts +++ b/src/client/stores/CalculationStore/Effects/reactions/tablesReactions.ts @@ -881,10 +881,25 @@ export default [ )({ insuranceCompany: { filter: leasingWithoutKasko - ? pipe( - insuranceOsagoDefaultFilter, - options => options.evo_evokasko_access === true, - ) + ? options => + options.filter( + pipe( + x => { + if ( + x.evo_type_ins_policy && + x.evo_type_ins_policy.includes(100000001) + ) { + return x; + } + }, + + x => { + if (x?.evo_evokasko_access === true) { + return x; + } + }, + ), + ) : insuranceOsagoDefaultFilter, value: isTrailer ? null : undefined, status: ElementStatus.Default,