From 79eee273a0432588fce9718832094396144f267e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B6ckelmann?= Date: Sun, 18 Feb 2024 17:17:39 +0100 Subject: [PATCH] Fix duplicate condition and displaying min twice instead of min and max value --- .../scriptaccount-condition-editor.component.html | 2 +- .../scriptaccount-condition-editor.component.ts | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/app/editor/gamesystem-editor/scriptaccount-condition-editor/scriptaccount-condition-editor.component.html b/src/app/editor/gamesystem-editor/scriptaccount-condition-editor/scriptaccount-condition-editor.component.html index 654d45f..3c80567 100644 --- a/src/app/editor/gamesystem-editor/scriptaccount-condition-editor/scriptaccount-condition-editor.component.html +++ b/src/app/editor/gamesystem-editor/scriptaccount-condition-editor/scriptaccount-condition-editor.component.html @@ -26,7 +26,7 @@ Maximal Value - {{condition.minValue}} + {{condition.maxValue}} Maximal Value diff --git a/src/app/editor/gamesystem-editor/scriptaccount-condition-editor/scriptaccount-condition-editor.component.ts b/src/app/editor/gamesystem-editor/scriptaccount-condition-editor/scriptaccount-condition-editor.component.ts index 2277704..aa22f08 100644 --- a/src/app/editor/gamesystem-editor/scriptaccount-condition-editor/scriptaccount-condition-editor.component.ts +++ b/src/app/editor/gamesystem-editor/scriptaccount-condition-editor/scriptaccount-condition-editor.component.ts @@ -29,16 +29,15 @@ export class ScriptaccountConditionEditorComponent implements OnInit{ this.addedCondition = ScriptAccountCondition.constructScriptAccountCondition(new ScriptAccount("", ""), 0,0); this.editedCondition = this.addedCondition; this.dataSource.data = this.dataSource.data.concat(this.addedCondition!); - console.log(this.dataSource.data.length) - console.log(this.conditions.length) } finishEditing() { if(this.addedCondition != undefined) { const createdCondition = ScriptAccountCondition.constructScriptAccountCondition(this.addedCondition.scriptAccount, this.addedCondition.minValue, this.addedCondition.maxValue); if(createdCondition != undefined) { + console.log(createdCondition) this.onCreateCondition.emit(createdCondition); - this.conditions.push(createdCondition); + console.log(this.conditions) this.dataSource.data = this.conditions; } this.addedCondition = undefined;