effects: leaseObject*
This commit is contained in:
parent
6eb64b6bfc
commit
420f9bdb57
@ -1837,6 +1837,39 @@ const reactionEffects: IReactionEffect[] = [
|
||||
}
|
||||
},
|
||||
}),
|
||||
|
||||
calculationStore => ({
|
||||
expression: () => {
|
||||
const { leaseObjectUsed } = calculationStore.values;
|
||||
return leaseObjectUsed;
|
||||
},
|
||||
effect: leaseObjectUsed => {
|
||||
if (leaseObjectUsed === true) {
|
||||
calculationStore.setValue('deliveryTime', 100000000);
|
||||
calculationStore.setStatus('radioDeliveryTime', Status.Disabled);
|
||||
} else {
|
||||
calculationStore.setStatus('radioDeliveryTime', Status.Default);
|
||||
}
|
||||
},
|
||||
}),
|
||||
|
||||
calculationStore => ({
|
||||
expression: () => {
|
||||
const { leaseObjectCategory } = calculationStore.values;
|
||||
return leaseObjectCategory;
|
||||
},
|
||||
effect: leaseObjectCategory => {
|
||||
if (
|
||||
leaseObjectCategory === 100000001 ||
|
||||
leaseObjectCategory === 100000001
|
||||
) {
|
||||
calculationStore.setValue('withTrailer', null);
|
||||
calculationStore.setStatus('selectWithTrailer', Status.Disabled);
|
||||
} else {
|
||||
calculationStore.setStatus('selectWithTrailer', Status.Default);
|
||||
}
|
||||
},
|
||||
}),
|
||||
];
|
||||
|
||||
export default reactionEffects;
|
||||
|
||||
Reference in New Issue
Block a user