[2] fix: recalc disabled agents fields
This commit is contained in:
parent
aaa8cadc02
commit
e6289b7174
@ -113,6 +113,9 @@ export function common({ store, apolloClient }: ProcessContext) {
|
||||
'tbxMileage',
|
||||
'tbxParmentsDecreasePercent',
|
||||
'tbxVIN',
|
||||
// 'radioLastPaymentRule',
|
||||
// 'tbxLastPaymentPerc',
|
||||
// 'tbxLastPaymentRub',
|
||||
];
|
||||
reaction(
|
||||
() => $calculation.element('cbxRecalcWithRevision').getValue(),
|
||||
@ -130,17 +133,12 @@ export function common({ store, apolloClient }: ProcessContext) {
|
||||
);
|
||||
|
||||
const agents: Elements[] = [
|
||||
'selectCalcBroker',
|
||||
'selectCalcBrokerRewardCondition',
|
||||
'selectCalcDoubleAgent',
|
||||
'selectCalcDoubleAgentRewardCondition',
|
||||
'selectCalcFinDepartment',
|
||||
'selectDealerBroker',
|
||||
'selectDealerBrokerRewardCondition',
|
||||
'selectDealerPerson',
|
||||
'selectDealerRewardCondition',
|
||||
'selectFinDepartmentRewardCondtion',
|
||||
'selectIndAgent',
|
||||
'selectIndAgentRewardCondition',
|
||||
'tbxCalcBrokerRewardSum',
|
||||
'tbxCalcDoubleAgentRewardSumm',
|
||||
@ -153,7 +151,7 @@ export function common({ store, apolloClient }: ProcessContext) {
|
||||
reaction(
|
||||
() => $calculation.$values.getValues(['firstPaymentPerc', 'recalcWithRevision']),
|
||||
({ firstPaymentPerc, recalcWithRevision }) => {
|
||||
if (firstPaymentPerc === 0 || recalcWithRevision === true) {
|
||||
if (firstPaymentPerc === 0 && recalcWithRevision === true) {
|
||||
agents.forEach((elementName) =>
|
||||
$calculation.$status.overrideStatus(elementName, 'Disabled')
|
||||
);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user