fix radioCalcType
This commit is contained in:
parent
501c818119
commit
e20e8457e7
@ -193,6 +193,10 @@ export const radioCalcType = [
|
||||
label: 'Суммы',
|
||||
value: 100_000_001,
|
||||
},
|
||||
{
|
||||
label: 'PI',
|
||||
value: 100_000_099,
|
||||
},
|
||||
];
|
||||
|
||||
export const selectRequirementTelematic = [
|
||||
|
||||
@ -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,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user