Ag Grid anpassungen
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
<ag-grid-angular
|
||||
@if (myTheme) {
|
||||
<ag-grid-angular
|
||||
style="width: 100%; height: 100%;"
|
||||
(gridReady)="onGridReady($event)"
|
||||
[gridOptions]="gridOptions!"
|
||||
[theme]="myTheme"
|
||||
/>
|
||||
}
|
||||
|
||||
<div class="floating-btn-container">
|
||||
<button mat-flat-button class="btn-create mat-elevation-z8" (click)="openCreateKey()" >Schlüssel anlegen</button>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Component, inject } from '@angular/core';
|
||||
import { AG_GRID_LOCALE_DE } from '@ag-grid-community/locale';
|
||||
import { AgGridAngular } from 'ag-grid-angular';
|
||||
import { GridOptions,GridApi, GridReadyEvent, CellEditingStoppedEvent, ICellEditorParams, FilterActionParams, FilterAction } from 'ag-grid-community';
|
||||
import { GridOptions,GridApi, GridReadyEvent, CellEditingStoppedEvent, ICellEditorParams, FilterActionParams, FilterAction, themeQuartz, Theme, ThemeDefaultParams } from 'ag-grid-community';
|
||||
import { DatePipe } from '@angular/common';
|
||||
import { ApiService } from '../../shared/api.service';
|
||||
import { IKey } from '../../model/interface/key.interface';
|
||||
@@ -20,6 +20,8 @@ import { MatTooltipModule } from '@angular/material/tooltip';
|
||||
import { SelectKeyCylinderComponent } from './create/select-key-cylinder/select-key-cylinder.component';
|
||||
import { ActivatedRoute, Route } from '@angular/router';
|
||||
import { ModuleRegistry } from 'ag-grid-community';
|
||||
import { AgGridService } from '../../shared/ag-grid/ag-grid.service';
|
||||
import { AgGridContainerComponent } from '../../shared/ag-grid/components/ag-grid-container/ag-grid-container.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-keys',
|
||||
@@ -28,12 +30,14 @@ import { ModuleRegistry } from 'ag-grid-community';
|
||||
templateUrl: './keys.component.html',
|
||||
styleUrl: './keys.component.scss'
|
||||
})
|
||||
export class KeysComponent {
|
||||
export class KeysComponent extends AgGridContainerComponent {
|
||||
private api: ApiService = inject(ApiService);
|
||||
private datePipe = inject(DatePipe);
|
||||
private toast: HotToastService = inject(HotToastService);
|
||||
private dialog: MatDialog = inject(MatDialog);
|
||||
private route: ActivatedRoute = inject(ActivatedRoute)
|
||||
private route: ActivatedRoute = inject(ActivatedRoute);
|
||||
|
||||
|
||||
|
||||
// cylinders: any[] = [];
|
||||
|
||||
@@ -97,7 +101,7 @@ export class KeysComponent {
|
||||
}
|
||||
],
|
||||
loading: true,
|
||||
rowHeight: 54,
|
||||
// rowHeight: 54,
|
||||
loadingOverlayComponent: AgLoadingComponent,
|
||||
pagination: true,
|
||||
}
|
||||
@@ -108,6 +112,7 @@ export class KeysComponent {
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
|
||||
|
||||
private setFilterToParams() {
|
||||
@@ -115,11 +120,20 @@ export class KeysComponent {
|
||||
|
||||
if (Object.keys(params).includes('handedOut')) {
|
||||
this.gridApi.setFilterModel({
|
||||
handedOut: {
|
||||
filterType: 'text',
|
||||
type: params['handedOut']
|
||||
}
|
||||
})
|
||||
handedOut: {
|
||||
filterType: 'text',
|
||||
type: params['handedOut']
|
||||
}
|
||||
})
|
||||
} if (Object.keys(params).includes('nr')) {
|
||||
console.log("SET " + params['nr'] )
|
||||
this.gridApi.setFilterModel({
|
||||
nr: {
|
||||
filterType: 'text',
|
||||
type: 'equals',
|
||||
filter: params['nr']
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user