Added point buy to computation engine

This commit is contained in:
Stefan Zermatten
2022-08-19 14:03:12 +02:00
parent 28307e26c3
commit c6ca8c1fa4
14 changed files with 443 additions and 209 deletions

View File

@@ -6,7 +6,7 @@
@change="(value, ack) => $emit('change', {path: ['calculation'], value, ack})"
>
<template
v-if="model.value !== undefined || model.value !== null"
v-if="showValue"
#value
>
{{ model.value }}
@@ -28,8 +28,20 @@ export default {
type: Object,
default: () => ({}),
},
hideValue: {
type: Boolean,
},
},
computed: {
showValue() {
const value = this.model.value;
if (
this.hideValue ||
(value === undefined || value === null) ||
value == this.model.calculation
) return false;
return true;
},
errorList(){
if (this.model.parseError){
return [this.model.parseError, ...this.model.errors];