firstPaymentPerc single reaction

This commit is contained in:
Chika 2021-02-02 15:38:43 +03:00
parent 6269d2a741
commit 3bff7ca53e

View File

@ -430,6 +430,23 @@ export default [
},
}),
calculationStore => ({
expression: () => {
const { firstPaymentPerc } = calculationStore.values;
return firstPaymentPerc;
},
effect: firstPaymentPerc => {
calculationStore.setTableRow(
'tablePayments',
0,
)({
paymentRelation: {
value: firstPaymentPerc,
},
});
},
}),
(calculationStore, calculationProcess) => ({
expression: () => {
const {
@ -438,7 +455,6 @@ export default [
parmentsDecreasePercent,
seasonType,
highSeasonStart: highSeasonStartId,
firstPaymentPerc,
lastPaymentPerc,
} = calculationStore.values;
@ -452,7 +468,6 @@ export default [
parmentsDecreasePercent,
seasonType,
highSeasonStart: parseInt(highSeasonStart?.name || '2'),
firstPaymentPerc,
lastPaymentPerc,
};
},
@ -460,13 +475,14 @@ export default [
if (calculationProcess.process === Process.LoadKp) {
return;
}
const { firstPaymentPerc } = calculationStore.values;
const {
leasingPeriod,
graphType,
parmentsDecreasePercent,
seasonType,
highSeasonStart,
firstPaymentPerc,
lastPaymentPerc,
} = nextParams;