Remove batch editing components

urls
Max Ehrlicher-Schmidt 4 years ago
parent 3f592cfbf6
commit 875c80d6fe

@ -1,4 +1,4 @@
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core';
import { ActivatedRoute } from '@angular/router'; import { ActivatedRoute } from '@angular/router';
import { deepen } from 'src/app/helperFunctions/deepenObject'; import { deepen } from 'src/app/helperFunctions/deepenObject';
import { flatten } from 'src/app/helperFunctions/flattenObject'; import { flatten } from 'src/app/helperFunctions/flattenObject';
@ -32,7 +32,7 @@ interface ReferenceTableInfo {
templateUrl: './data-page.component.html', templateUrl: './data-page.component.html',
styleUrls: ['./data-page.component.scss'], styleUrls: ['./data-page.component.scss'],
}) })
export class DataPageComponent implements OnInit { export class DataPageComponent implements OnInit, OnDestroy {
@Input() @Input()
propertiesInfo: Array<any> = []; propertiesInfo: Array<any> = [];
@ -89,6 +89,10 @@ export class DataPageComponent implements OnInit {
}, this.relockingIntervalDuration); }, this.relockingIntervalDuration);
} }
ngOnDestroy() {
clearInterval(this.relockingInterval);
}
addPropertiesFromGQLSchemaToObject(infoObject: any) { addPropertiesFromGQLSchemaToObject(infoObject: any) {
for (const prop of infoObject) { for (const prop of infoObject) {
if (prop.type === 'Group') { if (prop.type === 'Group') {

@ -3,7 +3,7 @@
{{ headline }} {{ headline }}
</h1> </h1>
<div class="table-control"> <div class="table-control">
<button <!--<button
mat-raised-button mat-raised-button
color="primary" color="primary"
class="table-control-button" class="table-control-button"
@ -11,7 +11,7 @@
i18n i18n
> >
Alle ausgewählten Fahrräder bearbeiten Alle ausgewählten Fahrräder bearbeiten
</button> </button>-->
<button <button
mat-raised-button mat-raised-button
class="table-control-button" class="table-control-button"

@ -41,6 +41,9 @@
min-width: 50px !important; min-width: 50px !important;
} }
} }
.mat-header-cell:first-child {
padding-left: 1.5em;
}
::ng-deep.mat-form-field { ::ng-deep.mat-form-field {
width: 100%; width: 100%;
} }

@ -51,7 +51,7 @@ export class TableComponent {
@ViewChild(MatPaginator) paginator: MatPaginator; @ViewChild(MatPaginator) paginator: MatPaginator;
@ViewChild(MatSort) sort: MatSort; @ViewChild(MatSort) sort: MatSort;
additionalColumnsFront: string[] = ['select']; additionalColumnsFront: string[] = [];
additionalColumnsBack: string[] = ['buttons']; additionalColumnsBack: string[] = ['buttons'];
displayedColumns: string[] = []; displayedColumns: string[] = [];
@ -109,8 +109,8 @@ export class TableComponent {
this.columnInfo.forEach((column) => this.columnInfo.forEach((column) =>
this.displayedColumns.push(column.dataPath) this.displayedColumns.push(column.dataPath)
); );
this.displayedColumns.unshift(this.additionalColumnsFront[0]); this.displayedColumns.unshift(...this.additionalColumnsFront);
this.displayedColumns.push(this.additionalColumnsBack[0]); this.displayedColumns.push(...this.additionalColumnsBack);
this.dataService.loadingRowIds.subscribe((rowIds) => { this.dataService.loadingRowIds.subscribe((rowIds) => {
this.loadingRowIds = rowIds; this.loadingRowIds = rowIds;

Loading…
Cancel
Save