mods
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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(', ')},
|
||||
},
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user