diff --git a/apps/web/config/default-options.ts b/apps/web/config/default-options.ts index 1f383dc..15f6026 100644 --- a/apps/web/config/default-options.ts +++ b/apps/web/config/default-options.ts @@ -193,6 +193,10 @@ export const radioCalcType = [ label: 'Суммы', value: 100_000_001, }, + { + label: 'PI', + value: 100_000_099, + }, ]; export const selectRequirementTelematic = [ diff --git a/apps/web/process/configurator/reactions/filters.ts b/apps/web/process/configurator/reactions/filters.ts index ad567ee..5b708d9 100644 --- a/apps/web/process/configurator/reactions/filters.ts +++ b/apps/web/process/configurator/reactions/filters.ts @@ -302,8 +302,10 @@ export default function reactions({ store, apolloClient, user }: ProcessContext) reaction( () => $calculation.element('selectProduct').getValue(), async (productId) => { + const IRRCalcTypeOptions = radioCalcType.filter((x) => x.value === 100_000_000); + if (!productId) { - $calculation.element('radioCalcType').resetOptions(); + $calculation.element('radioCalcType').setOptions(IRRCalcTypeOptions); return; } @@ -323,8 +325,11 @@ export default function reactions({ store, apolloClient, user }: ProcessContext) ); $calculation.element('radioCalcType').setOptions(filteredCalcTypeOptions); } else { - $calculation.element('radioCalcType').resetOptions(); + $calculation.element('radioCalcType').setOptions(IRRCalcTypeOptions); } + }, + { + fireImmediately: true, } );