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 11 additions and 1 deletions
Showing only changes of commit 18ff86840c - Show all commits

View File

@ -47,7 +47,7 @@
<button mat-icon-button (click)="createCondition()"><mat-icon>add</mat-icon></button>
</th>
<td mat-cell *matCellDef="let condition">
<button mat-icon-button color="warn"><mat-icon>delete</mat-icon></button>
<button mat-icon-button color="warn" (click)="deleteCondition(condition)"><mat-icon>delete</mat-icon></button>
</td>
</ng-container>

View File

@ -48,4 +48,14 @@ export class ScriptaccountConditionEditorComponent implements OnInit{
edit(condition: ScriptAccountCondition) {
this.editedCondition = condition;
}
deleteCondition(condition: ScriptAccountCondition) {
if(this.addedCondition === condition) {
this.addedCondition = undefined;
this.dataSource.data = this.conditions.concat();
} else {
this.onDeleteCondition.emit(condition);
this.dataSource.data = this.conditions.concat();
}
}
}