process/agents: dealerPerson & dealerBroker relations
This commit is contained in:
parent
b01008a7c4
commit
3668714b6a
@ -66,10 +66,10 @@ const defaultStatuses: CalculationStatuses = {
|
||||
selectDealer: 'Default',
|
||||
selectDealerPerson: 'Default',
|
||||
selectDealerRewardCondition: 'Default',
|
||||
tbxDealerRewardSumm: 'Default',
|
||||
tbxDealerRewardSumm: 'Disabled',
|
||||
selectDealerBroker: 'Default',
|
||||
selectDealerBrokerRewardCondition: 'Default',
|
||||
tbxDealerBrokerRewardSumm: 'Default',
|
||||
tbxDealerBrokerRewardSumm: 'Disabled',
|
||||
selectIndAgentRewardCondition: 'Default',
|
||||
tbxIndAgentRewardSumm: 'Default',
|
||||
selectCalcDoubleAgentRewardCondition: 'Default',
|
||||
|
||||
@ -53,6 +53,7 @@ export default function commonReactions(store: RootStore, apolloClient: ApolloCl
|
||||
async (dealerId) => {
|
||||
if (!dealerId) {
|
||||
$calculation.resetElement('selectDealerPerson');
|
||||
$calculation.resetElement('selectDealerBroker');
|
||||
|
||||
return;
|
||||
}
|
||||
@ -89,8 +90,6 @@ export default function commonReactions(store: RootStore, apolloClient: ApolloCl
|
||||
() => $calculation.getElementValue('selectDealerPerson'),
|
||||
async (dealerPersonId) => {
|
||||
if (!dealerPersonId) {
|
||||
$calculation.resetElement('selectDealerBroker');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@ -193,6 +192,7 @@ export default function commonReactions(store: RootStore, apolloClient: ApolloCl
|
||||
});
|
||||
|
||||
$calculation.setElementValue('tbxDealerRewardSumm', evo_reward_condition?.evo_reward_summ);
|
||||
$calculation.unblockElement('tbxDealerRewardSumm');
|
||||
}
|
||||
);
|
||||
|
||||
@ -249,6 +249,26 @@ export default function commonReactions(store: RootStore, apolloClient: ApolloCl
|
||||
'tbxDealerBrokerRewardSumm',
|
||||
evo_reward_condition?.evo_reward_summ
|
||||
);
|
||||
|
||||
$calculation.unblockElement('tbxDealerBrokerRewardSumm');
|
||||
}
|
||||
);
|
||||
|
||||
reaction(
|
||||
() => $calculation.getElementValue('selectDealerRewardCondition'),
|
||||
(dealerRewardConditionId) => {
|
||||
if (dealerRewardConditionId) {
|
||||
$calculation.resetElementValue('selectDealerBroker');
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
reaction(
|
||||
() => $calculation.getElementValue('selectDealerBrokerRewardCondition'),
|
||||
(dealerBrokerRewardConditionId) => {
|
||||
if (dealerBrokerRewardConditionId) {
|
||||
$calculation.resetElementValue('selectDealerPerson');
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user