Lost Keys
This commit is contained in:
@@ -15,11 +15,13 @@ import { ArchiveComponent } from './components/archive/archive.component';
|
||||
import { AgLoadingComponent } from '../../shared/ag-grid/components/ag-loading/ag-loading.component';
|
||||
import { map, of } from 'rxjs';
|
||||
import { ICylinder } from '../../model/interface/cylinder.interface';
|
||||
import { LostKeysComponent } from './components/lost-keys/lost-keys.component';
|
||||
import { MatTooltipModule } from '@angular/material/tooltip';
|
||||
|
||||
@Component({
|
||||
selector: 'app-keys',
|
||||
standalone: true,
|
||||
imports: [AgGridAngular, MatButtonModule, MatDialogModule, MatIconModule],
|
||||
imports: [AgGridAngular, MatButtonModule, MatDialogModule, MatIconModule, MatTooltipModule],
|
||||
providers: [DatePipe],
|
||||
templateUrl: './keys.component.html',
|
||||
styleUrl: './keys.component.scss'
|
||||
@@ -37,6 +39,9 @@ export class KeysComponent {
|
||||
gridOptions: GridOptions = {
|
||||
localeText: AG_GRID_LOCALE_DE,
|
||||
rowData: [],
|
||||
rowClassRules: {
|
||||
'key-lost': (params) => {console.log(params.data); return params.data.keyLost != null},
|
||||
},
|
||||
columnDefs: [
|
||||
|
||||
{ colId: 'name', field: 'name' , headerName: 'Name', flex: 1, editable: true, sort: 'asc', filter: true },
|
||||
@@ -178,4 +183,22 @@ export class KeysComponent {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
openLostKeys() {
|
||||
this.dialog.open(LostKeysComponent, {
|
||||
maxHeight: "calc(100vh - 24px)",
|
||||
maxWidth: "calc(100vw - 24px)",
|
||||
width: "50vw",
|
||||
minWidth: "min(700px,calc(100vw - 24px))",
|
||||
height: "70vh",
|
||||
disableClose: true
|
||||
}).afterClosed().subscribe({
|
||||
next: changed => {
|
||||
console.log(changed)
|
||||
if (changed) {
|
||||
this.loadKeys();
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user