Typescript all the parser things

This commit is contained in:
Thaum Rystra
2024-02-20 23:21:12 +02:00
parent 3ea492ee78
commit ac15512bc5
86 changed files with 926 additions and 718 deletions

View File

@@ -114,13 +114,13 @@ export default {
min(row) {
return row.min ? row.min && row.min.value : this.model.min && this.model.min.value;
},
dragSlider(row, value) {
async dragSlider(row, value) {
const currentSpent = this.model.spent;
let newSpent = currentSpent - row.spent;
const costFunction = EJSON.clone(row.cost || this.model.cost);
if (!costFunction?.parseNode) return;
if (costFunction) costFunction.parseLevel = 'reduce';
resolveCalculationNode(costFunction, costFunction.parseNode, { value });
await resolveCalculationNode(costFunction, costFunction.parseNode, { value });
if (Number.isFinite(costFunction.value)) {
newSpent += costFunction.value;
if (this.useEstimate) this.estimatedCost = newSpent;