Edit existing Conditions
All checks were successful
E2E Testing / test (push) Successful in 1m44s

This commit is contained in:
Sebastian Böckelmann 2024-02-18 17:20:38 +01:00
parent 79eee273a0
commit c0bdbd5f40
2 changed files with 6 additions and 3 deletions

View File

@ -37,7 +37,7 @@
<ng-container matColumnDef="edit">
<th mat-header-cell *matHeaderCellDef></th>
<td mat-cell *matCellDef="let condition;">
<button mat-icon-button color="primary" *ngIf="editedCondition == undefined"><mat-icon>edit</mat-icon></button>
<button mat-icon-button color="primary" *ngIf="editedCondition == undefined" (click)="edit(condition)"><mat-icon>edit</mat-icon></button>
<button mat-icon-button color="primary" *ngIf="editedCondition === condition" (click)="finishEditing()"><mat-icon>done</mat-icon></button>
</td>
</ng-container>

View File

@ -41,8 +41,11 @@ export class ScriptaccountConditionEditorComponent implements OnInit{
this.dataSource.data = this.conditions;
}
this.addedCondition = undefined;
} else {
}
this.editedCondition = undefined;
}
edit(condition: ScriptAccountCondition) {
this.editedCondition = condition;
}
}