Added data and UI for effects targeting calculations by tag

Still need to:
- update engine to compute calculations with effects.
- Add UI for effects applied to each calculation
This commit is contained in:
Stefan Zermatten
2022-02-14 16:26:49 +02:00
parent 359f18988c
commit e0f621cc44
11 changed files with 336 additions and 83 deletions

View File

@@ -57,10 +57,14 @@ const schemaFormMixin = {
},
push({path, value, ack}){
let array = get(this.model, path);
if (!array || !array.join){
throw `${path.join('.')} is ${array}, doesn't have "join"`
if (array === undefined){
let {object, key} = resolvePath(this.model, path, this.$set);
this.$set(object, key, [value]);
} else if (!array.push){
throw `${path.join('.')} is ${array}, doesn't have "push"`
} else {
array.push(value);
}
array.push(value);
if (ack) ack();
},
pull({path, ack}){