process/insurance: fix insuranceCompany options reactions

This commit is contained in:
vchikalkin 2023-04-12 17:34:34 +03:00
parent e5b0d7a746
commit 9d53867178

View File

@ -115,7 +115,7 @@ export function common({ store, apolloClient }: ProcessContext) {
}
);
reaction(
debouncedReaction(
() => $calculation.$values.getValues(['leasingPeriod', 'leasingWithoutKasko']),
async ({ leasingPeriod, leasingWithoutKasko }) => {
const {
@ -170,11 +170,13 @@ export function common({ store, apolloClient }: ProcessContext) {
}
},
{
delay: 1,
fireImmediately: true,
wait: 100,
}
);
reaction(
debouncedReaction(
() => $calculation.$values.getValues(['leaseObjectCategory', 'leasingWithoutKasko']),
async ({ leaseObjectCategory, leasingWithoutKasko }) => {
const {
@ -222,6 +224,10 @@ export function common({ store, apolloClient }: ProcessContext) {
.setOptions(normalizeOptions(defaultOsagoOptions));
}
}
},
{
delay: 1,
wait: 100,
}
);