Archive und Logging
This commit is contained in:
@@ -4,18 +4,21 @@
|
||||
<mat-dialog-content>
|
||||
<div style="display: flex; flex-direction: column; height: calc(100% - 4px);" class="gap-2">
|
||||
<div class="flex-auto">
|
||||
<ag-grid-angular
|
||||
@if(myTheme) {
|
||||
<ag-grid-angular
|
||||
style="width: 100%; height: 100%;"
|
||||
(gridReady)="onGridReady($event)"
|
||||
[gridOptions]="gridOptions!"
|
||||
[theme]="myTheme"
|
||||
/>
|
||||
}
|
||||
</div>
|
||||
|
||||
<div class="flex gap-2 items-center p-4 bg-gray-50 rounded-md shadow-sm">
|
||||
<mat-form-field class="flex-1">
|
||||
<mat-label>Email</mat-label>
|
||||
<input matInput [(ngModel)]="email" placeholder="beispiel@email.com">
|
||||
<mat-hint>Emailadresse des neuen Users eingeben</mat-hint>
|
||||
<mat-hint>Emailadresse des Benutzers eingeben</mat-hint>
|
||||
<mat-icon matPrefix class="text-gray-400 mr-2">email</mat-icon>
|
||||
</mat-form-field>
|
||||
<button matButton="elevated"
|
||||
|
||||
@@ -15,6 +15,7 @@ import { HttpErrorResponse } from '@angular/common/http';
|
||||
import { RemoveManagerPopupComponent } from '../remove-manager-popup/remove-manager-popup.component';
|
||||
import { IUser } from '../../../../model/interface/user.interface';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { AgGridContainerComponent } from '../../../../shared/ag-grid/components/ag-grid-container/ag-grid-container.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-system-manager',
|
||||
@@ -22,7 +23,7 @@ import { MatIconModule } from '@angular/material/icon';
|
||||
templateUrl: './system-manager.component.html',
|
||||
styleUrl: './system-manager.component.scss'
|
||||
})
|
||||
export class SystemManagerComponent {
|
||||
export class SystemManagerComponent extends AgGridContainerComponent {
|
||||
|
||||
gridApi!: GridApi;
|
||||
|
||||
@@ -39,10 +40,11 @@ export class SystemManagerComponent {
|
||||
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
this.gridOptions.columnDefs = [
|
||||
{ colId: 'name', field: 'firstName', headerName: 'Name', sort: 'asc', flex: 1, cellRenderer: (data: any) => data.data.firstName + ' ' + data.data.lastName, sortable: true, filter: true},
|
||||
{ colId: 'mail', field: 'username', headerName: 'E-Mail', flex: 1},
|
||||
{ colId: 'delete', headerName: '', width: 50,
|
||||
{ colId: 'delete', headerName: '', width: 50, sortable: false,
|
||||
cellRenderer: (params: any) => {
|
||||
if (this.authService.user.username == params.data.username) return '';
|
||||
return `<div class="delete icon icon-btn-xs"></div>`;
|
||||
|
||||
@@ -1,20 +1,19 @@
|
||||
import { DatePipe } from '@angular/common';
|
||||
import { Component, inject } from '@angular/core';
|
||||
import { Component, inject, LOCALE_ID } from '@angular/core';
|
||||
import { AgGridAngular } from 'ag-grid-angular';
|
||||
import { GridApi, GridOptions, GridReadyEvent, Theme, ThemeDefaultParams } from 'ag-grid-community';
|
||||
import { GridApi, GridOptions, GridReadyEvent } from 'ag-grid-community';
|
||||
import { ApiService } from '../../shared/api.service';
|
||||
import { HELPER } from '../../shared/helper.service';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatDialog, MatDialogModule } from '@angular/material/dialog';
|
||||
import { CreateSystemComponent } from './create/create.component';
|
||||
import { AgSystemManagerComponent } from '../../shared/ag-grid/components/ag-system-manager/ag-system-manager.component';
|
||||
import { AgGridService } from '../../shared/ag-grid/ag-grid.service';
|
||||
import { AgGridContainerComponent } from '../../shared/ag-grid/components/ag-grid-container/ag-grid-container.component';
|
||||
import { AgSystemManagerComponent } from '../../shared/ag-grid/components/ag-system-manager/ag-system-manager.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-system',
|
||||
imports: [AgGridAngular, MatButtonModule, MatDialogModule],
|
||||
providers: [DatePipe],
|
||||
providers: [DatePipe, { provide: LOCALE_ID, useValue: 'de-DE' }],
|
||||
templateUrl: './system.component.html',
|
||||
styleUrl: './system.component.scss'
|
||||
})
|
||||
@@ -31,6 +30,7 @@ export class SystemComponent extends AgGridContainerComponent {
|
||||
super();
|
||||
this.gridOptions.columnDefs = [
|
||||
{ colId: 'name', field: 'name', headerName: 'Name', sort: 'asc', flex: 1},
|
||||
{ colId: 'cylinderCount', field: 'cylinders', headerName: 'Zylinderanzahl', flex: 0, cellRenderer: (data: any) => data.value.length},
|
||||
{ field: 'createdAt', headerName: 'Angelegt', cellRenderer: (data: any) => data.value ? this.datePipe.transform(new Date(data.value)) : '-' },
|
||||
{ field: 'updatedAt', headerName: 'Upgedated', cellRenderer: (data: any) => data.value ? this.datePipe.transform(new Date(data.value)) : '-' },
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user