process/configurator: fix tbxIRR_Perc reset

This commit is contained in:
vchikalkin 2023-06-01 16:14:42 +03:00
parent 074de953c9
commit 6a828ce82b

View File

@ -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,
}
);