issue-15 #21

Merged
sebastian merged 60 commits from issue-15 into main 2024-03-22 08:46:49 +01:00
2 changed files with 3 additions and 4 deletions
Showing only changes of commit 79eee273a0 - Show all commits

View File

@ -26,7 +26,7 @@
<ng-container matColumnDef="maxValue">
<th mat-header-cell *matHeaderCellDef>Maximal Value</th>
<td mat-cell *matCellDef="let condition">
<span *ngIf="condition !== editedCondition && condition !== addedCondition">{{condition.minValue}}</span>
<span *ngIf="condition !== editedCondition && condition !== addedCondition">{{condition.maxValue}}</span>
<mat-form-field appearance="fill" class="long-form" *ngIf=" condition === editedCondition">
<mat-label>Maximal Value</mat-label>
<input matInput [(ngModel)]="editedCondition!.maxValue">

View File

@ -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;