|
|
@ -10,10 +10,7 @@ import { logArrayInColumnInfoForm } from 'src/app/helperFunctions/logArrayInColu
|
|
|
|
import { MatTableDataSource } from '@angular/material/table';
|
|
|
|
import { MatTableDataSource } from '@angular/material/table';
|
|
|
|
import { MatPaginator } from '@angular/material/paginator';
|
|
|
|
import { MatPaginator } from '@angular/material/paginator';
|
|
|
|
import { MatSort } from '@angular/material/sort';
|
|
|
|
import { MatSort } from '@angular/material/sort';
|
|
|
|
import {
|
|
|
|
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
|
|
|
|
MatDialog,
|
|
|
|
|
|
|
|
MatDialogRef,
|
|
|
|
|
|
|
|
} from '@angular/material/dialog';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
@Component({
|
|
|
|
selector: 'app-bikes',
|
|
|
|
selector: 'app-bikes',
|
|
|
@ -32,7 +29,14 @@ export class BikesComponent {
|
|
|
|
type?: string;
|
|
|
|
type?: string;
|
|
|
|
link?: (row: any) => string;
|
|
|
|
link?: (row: any) => string;
|
|
|
|
}[] = [
|
|
|
|
}[] = [
|
|
|
|
{ name: 'name', header: 'Name', sticky: true, link: (row: any) => {return "/bike/" + row.id}},
|
|
|
|
{
|
|
|
|
|
|
|
|
name: 'name',
|
|
|
|
|
|
|
|
header: 'Name',
|
|
|
|
|
|
|
|
sticky: true,
|
|
|
|
|
|
|
|
link: (row: any) => {
|
|
|
|
|
|
|
|
return '/bike/' + row.id;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
{ name: 'id', header: 'ID', readonly: true },
|
|
|
|
{ name: 'id', header: 'ID', readonly: true },
|
|
|
|
{ name: 'group', header: 'Gruppe' },
|
|
|
|
{ name: 'group', header: 'Gruppe' },
|
|
|
|
{ name: 'modelName', header: 'Modell' },
|
|
|
|
{ name: 'modelName', header: 'Modell' },
|
|
|
@ -140,9 +144,7 @@ export class BikesComponent {
|
|
|
|
private bikesService: BikesService,
|
|
|
|
private bikesService: BikesService,
|
|
|
|
private schemaService: SchemaService,
|
|
|
|
private schemaService: SchemaService,
|
|
|
|
public dialog: MatDialog
|
|
|
|
public dialog: MatDialog
|
|
|
|
) {
|
|
|
|
) {}
|
|
|
|
console.log(this.columnInfo[0].link({id: 66}));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ngAfterViewInit() {
|
|
|
|
ngAfterViewInit() {
|
|
|
|
this.addColumnPropertiesFromGQLSchemaToColumnInfo();
|
|
|
|
this.addColumnPropertiesFromGQLSchemaToColumnInfo();
|
|
|
@ -285,7 +287,7 @@ export class BikesComponent {
|
|
|
|
|
|
|
|
|
|
|
|
addNewObject() {
|
|
|
|
addNewObject() {
|
|
|
|
this.paginator.firstPage();
|
|
|
|
this.paginator.firstPage();
|
|
|
|
this.setFilter({...this.filter, includesString: ""});
|
|
|
|
this.setFilter({ ...this.filter, includesString: '' });
|
|
|
|
this.resetSorting();
|
|
|
|
this.resetSorting();
|
|
|
|
this.data.data = [
|
|
|
|
this.data.data = [
|
|
|
|
{ newObject: true, id: this.getNewId() },
|
|
|
|
{ newObject: true, id: this.getNewId() },
|
|
|
@ -383,7 +385,7 @@ export class BikesComponent {
|
|
|
|
|
|
|
|
|
|
|
|
showOnlyUnsavedElements(value: boolean) {
|
|
|
|
showOnlyUnsavedElements(value: boolean) {
|
|
|
|
this.filter.onlyUnsaved = value;
|
|
|
|
this.filter.onlyUnsaved = value;
|
|
|
|
this.filter.includesString = "";
|
|
|
|
this.filter.includesString = '';
|
|
|
|
this.applyFilter();
|
|
|
|
this.applyFilter();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|