fix regions pt.2
This commit is contained in:
parent
0e337a498a
commit
40932ae489
@ -404,6 +404,28 @@ export function common({ store, apolloClient, queryClient }: ProcessContext) {
|
||||
}
|
||||
);
|
||||
|
||||
reaction(
|
||||
() => $calculation.$values.getValues(['lead', 'opportunity', 'objectRegistration']),
|
||||
async ({ lead, objectRegistration, opportunity }) => {
|
||||
const { account } = await getData({ lead, opportunity, quote: null });
|
||||
|
||||
if (objectRegistration === 100_000_000 && account.evo_regionid) {
|
||||
$calculation.element('selectRegionRegistration').setValue(account.evo_regionid).block();
|
||||
} else {
|
||||
$calculation.element('selectRegionRegistration').unblock();
|
||||
}
|
||||
|
||||
if (objectRegistration === 100_000_000 && account.evo_townid) {
|
||||
$calculation.element('selectTownRegistration').setValue(account.evo_townid).block();
|
||||
} else {
|
||||
$calculation.element('selectTownRegistration').unblock();
|
||||
}
|
||||
},
|
||||
{
|
||||
delay: 50,
|
||||
}
|
||||
);
|
||||
|
||||
reaction(
|
||||
() => $calculation.element('radioObjectRegistration').getValue(),
|
||||
(objectRegistration) => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user