Skip to content

Commit f1c7b42

Browse files
table settings: remove unused list ordering vars
1 parent 9c016c9 commit f1c7b42

File tree

2 files changed

+1
-24
lines changed

2 files changed

+1
-24
lines changed

frontend/src/app/components/dashboard/db-table-view/db-table-settings/db-table-settings.component.spec.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,16 +79,12 @@ describe('DbTableSettingsComponent', () => {
7979
icon: '',
8080
search_fields: [],
8181
excluded_fields: [],
82-
list_fields: [],
8382
// identification_fields: [],
8483
// list_per_page: null,
85-
ordering: TableOrdering.Ascending,
86-
ordering_field: '',
8784
identity_column: '',
8885
readonly_fields: [],
8986
sortable_by: [],
9087
autocomplete_columns: ['FirstName'],
91-
columns_view: [],
9288
sensitive_fields: [],
9389
connection_id: '63f804e4-8588-4957-8d7f-655e2309fef7',
9490
allow_csv_export: true,

frontend/src/app/components/dashboard/db-table-view/db-table-settings/db-table-settings.component.ts

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';
21
import { Component, OnInit } from '@angular/core';
3-
import { TableField, TableOrdering, TableSettings } from 'src/app/models/table';
2+
import { TableField, TableSettings } from 'src/app/models/table';
43

54
import { AlertComponent } from '../../../ui-components/alert/alert.component';
65
import { Angulartics2 } from 'angulartics2';
@@ -61,9 +60,7 @@ export class DbTableSettingsComponent implements OnInit {
6160
public loading: boolean = true;
6261
public fields: string[];
6362
public fields_to_exclude: string[];
64-
// public orderChanged: boolean = false;
6563
public iconChanged: boolean = false;
66-
public listFieldsOrder: string[];
6764
public tableSettingsInitial: TableSettings = {
6865
connection_id: '',
6966
table_name: '',
@@ -140,13 +137,9 @@ export class DbTableSettingsComponent implements OnInit {
140137
if (Object.keys(res).length !== 0) {
141138
this.isSettingsExist = true
142139
this.tableSettings = res;
143-
this.listFieldsOrder = [...res.list_fields];
144140
} else {
145141
this.tableSettings = this.tableSettingsInitial;
146142
};
147-
if (Object.keys(res).length === 0 || (res?.list_fields && !res.list_fields.length)) {
148-
this.listFieldsOrder = [...this.fields];
149-
};
150143
this.title.setTitle(`${res.display_name || this.displayTableName} - Table settings | ${this._company.companyTabTitle || 'Rocketadmin'}`);
151144
}
152145
);
@@ -157,18 +150,6 @@ export class DbTableSettingsComponent implements OnInit {
157150
this.iconChanged = true;
158151
}
159152

160-
// drop(event: CdkDragDrop<string[]>) {
161-
// // moveItemInArray(this.listFieldsOrder, event.previousIndex, event.currentIndex);
162-
// // this.tableSettings.list_fields = [...this.listFieldsOrder];
163-
// // this.orderChanged = true;
164-
// }
165-
166-
// resetColumnsOrder() {
167-
// // this.tableSettings.list_fields = [];
168-
// this.listFieldsOrder = [...this.fields];
169-
// // this.orderChanged = true;
170-
// }
171-
172153
updateSettings() {
173154
this.submitting = true;
174155
this.tableSettings.connection_id = this.connectionID;

0 commit comments

Comments
 (0)