18 lines
499 B
TypeScript
18 lines
499 B
TypeScript
import type { ProcessContext } from '../types';
|
|
import { reaction } from 'mobx';
|
|
|
|
export function common({ store }: ProcessContext) {
|
|
const { $calculation } = store;
|
|
|
|
reaction(
|
|
() => $calculation.element('radioBalanceHolder').getValue(),
|
|
(balanceHolder) => {
|
|
if (balanceHolder === 100_000_001) {
|
|
$calculation.element('cbxLastPaymentRedemption').setValue(true).block();
|
|
} else {
|
|
$calculation.element('cbxLastPaymentRedemption').unblock();
|
|
}
|
|
}
|
|
);
|
|
}
|