partial fix release/4710

This commit is contained in:
vchikalkin 2024-09-12 16:50:38 +03:00
parent 6aad2d3aa2
commit 549bd901da

View File

@ -207,6 +207,7 @@ export function common({ store, apolloClient }: ProcessContext) {
}
);
// объединить со строчкой 308
debouncedReaction(
() => $calculation.$values.getValues(['leaseObjectCategory', 'leasingWithoutKasko']),
async ({ leaseObjectCategory, leasingWithoutKasko }) => {
@ -304,6 +305,7 @@ export function common({ store, apolloClient }: ProcessContext) {
}
);
// объединить со строчкой 210
reaction(
() => $calculation.$values.getValues(['leaseObjectType', 'maxSpeed']),
async ({ leaseObjectType: leaseObjectTypeId, maxSpeed }) => {
@ -351,7 +353,16 @@ export function common({ store, apolloClient }: ProcessContext) {
$tables.insurance.row('osago').column('insured').setValue(100_000_000).block();
$tables.insurance.row('osago').column('insCost').setValue(0).block();
} else {
$tables.insurance.row('osago').column('insuranceCompany').unblock();
const defaultOsagoOptions = accounts?.filter((x) =>
x?.evo_type_ins_policy?.includes(100_000_001)
);
$tables.insurance
.row('osago')
.column('insuranceCompany')
.setOptions(normalizeOptions(defaultOsagoOptions))
.unblock();
$tables.insurance.row('osago').column('insured').unblock();
$tables.insurance.row('osago').column('insCost').unblock();
}