reset insuranceCompany only after trailer
This commit is contained in:
parent
f7877f6892
commit
2905a0bcf2
@ -786,10 +786,11 @@ export default [
|
||||
const { leaseObjectCategory } = calculationStore.values;
|
||||
return leaseObjectCategory;
|
||||
},
|
||||
effect: leaseObjectCategory => {
|
||||
const isTrailer = leaseObjectCategory === 100000004;
|
||||
effect: (nextLeaseObjectCategory, prevLeaseObjectCategory) => {
|
||||
const nextIsTrailer = nextLeaseObjectCategory === 100000004;
|
||||
const prevIsTrailer = prevLeaseObjectCategory === 100000004;
|
||||
|
||||
if (isTrailer) {
|
||||
if (nextIsTrailer) {
|
||||
const otherInsuranceCompany = calculationStore.tables.tableInsurance.options?.insuranceCompany?.find(
|
||||
x => x.name?.includes('ПРОЧИЕ'),
|
||||
);
|
||||
@ -825,7 +826,7 @@ export default [
|
||||
)({
|
||||
insuranceCompany: {
|
||||
filter: insuranceOsagoDefaultFilter,
|
||||
value: null,
|
||||
value: prevIsTrailer ? null : undefined,
|
||||
status: ElementStatus.Default,
|
||||
},
|
||||
insCost: {
|
||||
|
||||
Reference in New Issue
Block a user