This commit is contained in:
Bastian Wagner
2024-12-27 20:57:37 +01:00
parent 5194298fa6
commit 5363d0880f
33 changed files with 640 additions and 50 deletions

View File

@@ -0,0 +1,55 @@
import { Component, inject } from '@angular/core';
import { MatDialog, MatDialogModule } from '@angular/material/dialog';
import { MatTooltipModule } from '@angular/material/tooltip';
import { HotToastService } from '@ngxpert/hot-toast';
import { ICellRendererAngularComp } from 'ag-grid-angular';
import { ICellRendererParams } from 'ag-grid-community';
import { ApiService } from '../../../api.service';
import { SystemManagerComponent } from '../../../../modules/system/components/system-manager/system-manager.component';
@Component({
selector: 'app-ag-system-manager',
standalone: true,
imports: [MatDialogModule, MatTooltipModule],
templateUrl: './ag-system-manager.component.html',
styleUrl: './ag-system-manager.component.scss'
})
export class AgSystemManagerComponent implements ICellRendererAngularComp {
private api: ApiService = inject(ApiService);
private dialog: MatDialog = inject(MatDialog);
private toast = inject(HotToastService);
params!: ICellRendererParams<any, any, any>;
system: any;
agInit(params: ICellRendererParams<any, any, any>): void {
this.params = params;
this.system = params.data;
}
refresh(params: ICellRendererParams<any, any, any>): boolean {
return false;
}
openManager() {
const ref = this.dialog.open(SystemManagerComponent, {
data: this.system,
autoFocus: false,
maxHeight: "calc(100vh - 24px)",
maxWidth: "calc(100vw - 24px)",
width: "50vw",
minWidth: "300px",
height: "70vh",
disableClose: true
})
// ref.afterClosed().subscribe({
// next: n => {
// if (n) {
// this.deleteThisKey();
// }
// }
// })
}
}