effect: calcDoubleAgentRewardCondition
This commit is contained in:
parent
7e5b126de8
commit
a341d3fd47
@ -474,6 +474,38 @@ const reactionEffects: IReactionEffect[] = [
|
||||
},
|
||||
}),
|
||||
|
||||
calculationStore => ({
|
||||
expression: () => {
|
||||
const { calcDoubleAgentRewardCondition } = calculationStore.values;
|
||||
return calcDoubleAgentRewardCondition;
|
||||
},
|
||||
effect: calcDoubleAgentRewardConditionId => {
|
||||
if (!calcDoubleAgentRewardConditionId) {
|
||||
calculationStore.setValue('calcDoubleAgentRewardSumm', null);
|
||||
calculationStore.setStatus(
|
||||
'tbxCalcDoubleAgentRewardSumm',
|
||||
Status.Disabled,
|
||||
);
|
||||
} else {
|
||||
const calcDoubleAgentRewardCondition = calculationStore.options.selectCalcDoubleAgentRewardCondition?.find(
|
||||
x => x.evo_reward_conditionid === calcDoubleAgentRewardConditionId,
|
||||
);
|
||||
if (calcDoubleAgentRewardCondition) {
|
||||
if (calcDoubleAgentRewardCondition.evo_reward_summ) {
|
||||
calculationStore.setValue(
|
||||
'calcDoubleAgentRewardSumm',
|
||||
calcDoubleAgentRewardCondition.evo_reward_summ,
|
||||
);
|
||||
calculationStore.setStatus(
|
||||
'tbxCalcDoubleAgentRewardSumm',
|
||||
Status.Default,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
}),
|
||||
|
||||
calculationStore => ({
|
||||
expression: () => {
|
||||
const { channel } = calculationStore.values;
|
||||
|
||||
Reference in New Issue
Block a user