process/gibdd: add selectRegionRegistration filter
This commit is contained in:
parent
fe614b2529
commit
074de953c9
@ -377,6 +377,24 @@ export function common({ store, apolloClient, queryClient }: ProcessContext) {
|
||||
}
|
||||
);
|
||||
|
||||
reaction(
|
||||
() => $calculation.$values.getValues(['objectRegistration']),
|
||||
async ({ objectRegistration }) => {
|
||||
const {
|
||||
data: { evo_regions },
|
||||
} = await apolloClient.query({
|
||||
query: CRMTypes.GetRegionsDocument,
|
||||
});
|
||||
|
||||
if (objectRegistration === 100_000_001) {
|
||||
const regions = evo_regions?.filter((x) => x?.evo_businessunit_evolution === true);
|
||||
$calculation.element('selectRegionRegistration').setOptions(normalizeOptions(regions));
|
||||
} else {
|
||||
$calculation.element('selectRegionRegistration').setOptions(normalizeOptions(evo_regions));
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
const { getData } = helper({ apolloClient });
|
||||
|
||||
reaction(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user