From 6a828ce82bbfede81ffc3d651caae17e42ecb5f5 Mon Sep 17 00:00:00 2001 From: vchikalkin Date: Thu, 1 Jun 2023 16:14:42 +0300 Subject: [PATCH] process/configurator: fix tbxIRR_Perc reset --- apps/web/process/configurator/reactions/values.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/web/process/configurator/reactions/values.ts b/apps/web/process/configurator/reactions/values.ts index 009d81b..0b42a8c 100644 --- a/apps/web/process/configurator/reactions/values.ts +++ b/apps/web/process/configurator/reactions/values.ts @@ -42,13 +42,14 @@ export default function valuesReactions({ store, apolloClient }: ProcessContext) disposableReaction( () => $process.has('LoadKP'), - () => $calculation.element('selectTarif').getValue(), + () => $calculation.$values.getValue('tarif'), async (tarifId) => { if (!tarifId) { $calculation.element('tbxIRR_Perc').resetValue(); return; } + const { data: { evo_tarif }, } = await apolloClient.query({ @@ -64,6 +65,9 @@ export default function valuesReactions({ store, apolloClient }: ProcessContext) } else { $calculation.element('tbxIRR_Perc').resetValue(); } + }, + { + delay: 20, } );