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