Api umgebaut

This commit is contained in:
Bastian Wagner
2026-02-18 13:56:29 +01:00
parent 40e3ac187e
commit dd59a62e96
8 changed files with 78 additions and 63 deletions

View File

@@ -79,7 +79,7 @@ export class AgKeyActionsComponent implements ICellRendererAngularComp {
})
).subscribe({
next: () => {
this.setData();
this.api.refreshKeys();
},
error: () => {
this.params.api.setGridOption("loading", false);
@@ -99,6 +99,7 @@ export class AgKeyActionsComponent implements ICellRendererAngularComp {
if (n != null) {
this.key.handedOut = n;
this.params.api.refreshCells();
this.api.refreshKeys();
}
}
})
@@ -111,24 +112,17 @@ export class AgKeyActionsComponent implements ICellRendererAngularComp {
maxWidth: '100vw',
maxHeight: '100vh'
}).afterClosed().subscribe({
next: n => {
next: async n => {
if (n != null) {
if (n == "") {
n = null;
}
this.key.keyLost = n;
this.params.api.refreshCells();
this.api.updateKey(this.key).subscribe();
this.setData();
await this.api.updateKey(this.key).subscribe();
this.api.refreshKeys();
}
}
})
}
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);
}
}