mods
Some checks failed
Run Unit-Tests / test_frontend (push) Has been cancelled
Run Unit-Tests / test_backend (push) Has been cancelled

This commit is contained in:
Bastian Wagner
2026-02-16 13:07:31 +01:00
parent 9ea2229f5a
commit b4826cab2c
10 changed files with 65 additions and 20 deletions

View File

@@ -28,12 +28,12 @@
<button matButton [mat-dialog-close]="null">Abbrechen</button>
@if(key.keyLost != null) {
<button matButton="elevated" (click)="closeFound()">
<button matButton="elevated" (click)="closeFound()" class="btn-primary">
<mat-icon>report</mat-icon>
Als gefunden melden
</button>
} @else {
<button matButton="elevated" (click)="closeWithData()">
<button matButton="elevated" (click)="closeWithData()" class="btn-warning">
<mat-icon>report_problem</mat-icon>
Als verloren melden
</button>

View File

@@ -47,9 +47,7 @@ export class KeysComponent {
valueFormatter: (data: any) => { return data; },
cellRenderer: (data: any) => {return data.value?.map((m: ICylinder) => m.name).join(', ')},
tooltipValueGetter: (data: any) => data.value?.map((m: ICylinder) => m.name).join(','),
onCellDoubleClicked(event) {
},
onCellDoubleClicked(event) {},
cellEditorPopup: true,
filterValueGetter: (params: any) => {return params.data.cylinder?.map((m: ICylinder) => m.name).join(', ')},
},

View File

@@ -79,10 +79,7 @@ export class AgDeleteKeyComponent implements ICellRendererAngularComp {
})
).subscribe({
next: () => {
let data = this.params.api.getGridOption("rowData");
data = data?.filter(d => d.id != this.key.id);
this.params.api.setGridOption("rowData", data);
this.params.api.setGridOption("loading", false);
this.setData();
},
error: () => {
this.params.api.setGridOption("loading", false);
@@ -122,8 +119,16 @@ export class AgDeleteKeyComponent implements ICellRendererAngularComp {
this.key.keyLost = n;
this.params.api.refreshCells();
this.api.updateKey(this.key).subscribe();
this.setData();
}
}
})
}
private setData() {
let data = this.params.api.getGridOption("rowData");
data = data?.filter(d => d.id != this.key.id);
this.params.api.setGridOption("rowData", data);
this.params.api.setGridOption("loading", false);
}
}