unlock balanceHolder

This commit is contained in:
Chika 2020-11-19 23:12:47 +03:00
parent 52266d12bd
commit 116c9cab22
2 changed files with 19 additions and 21 deletions

View File

@ -1260,25 +1260,25 @@ const reactionEffects: IReactionEffect[] = [
},
}),
// calculationStore => ({
// expression: () => {
// const { leasingPeriod } = calculationStore.values;
// return leasingPeriod;
// },
// effect: leasingPeriod => {
// if (leasingPeriod) {
// if (parseInt(leasingPeriod) < 12) {
// calculationStore.setStatus('radioBalanceHolder', Status.Disabled);
// calculationStore.setValue('balanceHolder', 100000000);
// } else {
// calculationStore.setStatus('radioBalanceHolder', Status.Default);
// }
// }
// },
// options: {
// fireImmediately: true,
// },
// }),
calculationStore => ({
expression: () => {
const { leasingPeriod } = calculationStore.values;
return leasingPeriod;
},
effect: leasingPeriod => {
if (leasingPeriod) {
if (parseInt(leasingPeriod) < 12) {
calculationStore.setStatus('radioBalanceHolder', Status.Disabled);
calculationStore.setValue('balanceHolder', 100000000);
} else {
calculationStore.setStatus('radioBalanceHolder', Status.Default);
}
}
},
options: {
fireImmediately: true,
},
}),
calculationStore => ({
expression: () => {

View File

@ -36,8 +36,6 @@ const initialStatuses: TElements<Status> = {
selectAgent: Status.Disabled,
tbxCommentLead: Status.Disabled,
btnCreateLead: Status.Disabled,
radioBalanceHolder: Status.Disabled,
};
export default initialStatuses;