selectRegion & selectRegionRegistration
This commit is contained in:
parent
415bc4357c
commit
9b8757cc9e
@ -45,16 +45,6 @@ const CUSTOM_CONDITIONS: TElements<
|
||||
}
|
||||
return false;
|
||||
},
|
||||
selectObjectRegionRegistration: calculationStore => {
|
||||
const objectRegistration = calculationStore.getValue('objectRegistration');
|
||||
if (objectRegistration === 100000001) {
|
||||
const objectRegionRegistration = calculationStore.getValue(
|
||||
'objectRegionRegistration',
|
||||
);
|
||||
return CONDITIONS.IS_NULL(objectRegionRegistration);
|
||||
}
|
||||
return false;
|
||||
},
|
||||
};
|
||||
|
||||
const elementsValidations: TElements<any> = {
|
||||
@ -88,8 +78,7 @@ const elementsValidations: TElements<any> = {
|
||||
selectQuote: CUSTOM_CONDITIONS.selectQuote,
|
||||
tbxVehicleTaxInYear: CUSTOM_CONDITIONS.tbxVehicleTaxInYear,
|
||||
radioTypePTS: CUSTOM_CONDITIONS.radioTypePTS,
|
||||
selectObjectRegionRegistration:
|
||||
CUSTOM_CONDITIONS.selectObjectRegionRegistration,
|
||||
selectObjectRegionRegistration: CONDITIONS.IS_NULL,
|
||||
};
|
||||
|
||||
export default function (this: ICalculationStore) {
|
||||
|
||||
@ -14,10 +14,10 @@ import { get } from 'lodash';
|
||||
const v: TElements<any> = {
|
||||
tbxVehicleTaxInYear: { value: 0, validator: value => value === 0 },
|
||||
radioTypePTS: { value: null, validator: value => value === null },
|
||||
selectObjectRegionRegistration: {
|
||||
value: null,
|
||||
validator: value => value === null,
|
||||
},
|
||||
// selectObjectRegionRegistration: {
|
||||
// value: null,
|
||||
// validator: value => value === null,
|
||||
// },
|
||||
};
|
||||
|
||||
const gibddReactions: IReactionEffect[] = [
|
||||
@ -355,19 +355,22 @@ const gibddReactions: IReactionEffect[] = [
|
||||
typePTS,
|
||||
}) => {
|
||||
calculationStore.setFilter('selectRegistration', options =>
|
||||
options.filter(
|
||||
x =>
|
||||
options.filter(x => {
|
||||
return (
|
||||
x.evo_whom_register === objectRegistration &&
|
||||
x.evo_pts_type &&
|
||||
x.evo_pts_type.includes(typePTS) &&
|
||||
(typePTS
|
||||
? x.evo_pts_type &&
|
||||
x.evo_pts_type.filter(x => x > 0).includes(typePTS)
|
||||
: true) &&
|
||||
x.evo_gibdd_region ===
|
||||
(objectRegionRegistration.evo_regionid === regionRegistration) &&
|
||||
(x.accountid
|
||||
? objectRegionRegistration.accounts
|
||||
.map(x => x.accountid)
|
||||
.includes(x.evo_accountid)
|
||||
: true),
|
||||
),
|
||||
: true)
|
||||
);
|
||||
}),
|
||||
);
|
||||
},
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user