Move amount
check in bonus amount decorator to postConstruct
This commit is contained in:
parent
502fa99f5d
commit
9fa5ec971a
1 changed files with 1 additions and 3 deletions
|
@ -69,14 +69,12 @@ export const bonusAmountDecorator: Decorator<
|
|||
BaseBonusAmountFeature,
|
||||
GenericBonusAmountFeature
|
||||
> = {
|
||||
preConstruct(feature) {
|
||||
postConstruct(feature) {
|
||||
if (feature.amount === undefined) {
|
||||
console.error(
|
||||
`Decorated feature ${feature.id} does not contain the required 'amount' property"`
|
||||
);
|
||||
}
|
||||
},
|
||||
postConstruct(feature) {
|
||||
processComputable(feature, "bonusAmount");
|
||||
if (feature.totalAmount === undefined) {
|
||||
feature.totalAmount = computed(() =>
|
||||
|
|
Loading…
Reference in a new issue