load regionRegistration from kp too
This commit is contained in:
parent
cf872ec1ba
commit
c61d5ded7f
@ -14,4 +14,5 @@ evo_max_mass
|
||||
evo_seats
|
||||
evo_year
|
||||
offerprintformapi
|
||||
evo_regionid
|
||||
`;
|
||||
|
||||
@ -405,6 +405,9 @@ const gibddReactions: IReactionEffect[] = [
|
||||
ElementStatus.Default,
|
||||
);
|
||||
|
||||
let evo_regionid = calculationStore.getOption('selectQuote')
|
||||
?.evo_regionid;
|
||||
|
||||
if (objectRegistration === 100000001) {
|
||||
calculationStore.setFilter('selectRegionRegistration', options =>
|
||||
options.filter(x => x.evo_businessunit_evolution === true),
|
||||
@ -420,20 +423,18 @@ const gibddReactions: IReactionEffect[] = [
|
||||
'selectRegionRegistration',
|
||||
ElementStatus.Disabled,
|
||||
);
|
||||
const targetObjectRegistration = calculationStore.getOption(
|
||||
const targetRegionRegistration = calculationStore.getOption(
|
||||
'selectRegionRegistration',
|
||||
{
|
||||
evo_fias_id: evo_region_fias_id,
|
||||
},
|
||||
);
|
||||
if (targetObjectRegistration) {
|
||||
calculationStore.setValue(
|
||||
'regionRegistration',
|
||||
targetObjectRegistration.evo_regionid,
|
||||
);
|
||||
if (targetRegionRegistration) {
|
||||
evo_regionid = targetRegionRegistration.evo_regionid;
|
||||
}
|
||||
}
|
||||
}
|
||||
calculationStore.setValue('regionRegistration', evo_regionid);
|
||||
},
|
||||
}),
|
||||
];
|
||||
|
||||
@ -59,6 +59,7 @@ const loadKpReaction: IReactionEffect = calculationStore => ({
|
||||
calcType,
|
||||
indAgent,
|
||||
INNForCalc,
|
||||
regionRegistration,
|
||||
} = calculationStore.values;
|
||||
|
||||
calculationStore.setStatus('selectQuote', ElementStatus.Disabled);
|
||||
@ -89,9 +90,6 @@ const loadKpReaction: IReactionEffect = calculationStore => ({
|
||||
),
|
||||
);
|
||||
|
||||
let regionRegistration = quote.evo_regionid,
|
||||
townRegistration = quote.evo_townid;
|
||||
|
||||
const {
|
||||
entities: options,
|
||||
}: IGetCRMEntitiesResponse & {
|
||||
@ -113,7 +111,7 @@ const loadKpReaction: IReactionEffect = calculationStore => ({
|
||||
findepartment_accountid:
|
||||
quote.evo_fin_department_accountid || NIL,
|
||||
evo_gps_brandid: quote.evo_gps_brandid || NIL,
|
||||
evo_regionid: regionRegistration || NIL,
|
||||
evo_regionid: quote.evo_regionid || NIL,
|
||||
},
|
||||
toOptions: [
|
||||
'selectModel',
|
||||
@ -294,14 +292,13 @@ const loadKpReaction: IReactionEffect = calculationStore => ({
|
||||
recalcWithRevision,
|
||||
leaseObjectCount,
|
||||
clientRisk,
|
||||
regionRegistration,
|
||||
townRegistration,
|
||||
calcType,
|
||||
totalPayments: evo_sumpay_withnds,
|
||||
indAgent,
|
||||
requirementTelematic,
|
||||
vehicleTaxInYear,
|
||||
INNForCalc,
|
||||
regionRegistration,
|
||||
});
|
||||
|
||||
message.success({
|
||||
|
||||
@ -92,6 +92,7 @@ const mapKPtoValues: TValues<string> = {
|
||||
objectCategoryTax: 'evo_category_tr',
|
||||
objectTypeTax: 'evo_vehicle_type_tax',
|
||||
typePTS: 'evo_pts_type',
|
||||
townRegistration: 'evo_townid',
|
||||
};
|
||||
|
||||
export function getKpPropName(valueName: ValuesNames) {
|
||||
|
||||
Reference in New Issue
Block a user