Skip to content

Commit 457ea1a

Browse files
committed
Added ordering_field to the response in GetTableRowsUseCase
1 parent 8ee1eb6 commit 457ea1a

File tree

5 files changed

+891
-884
lines changed

5 files changed

+891
-884
lines changed

backend/src/entities/table/application/data-structures/found-table-rows.ds.ts

Lines changed: 79 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -10,124 +10,127 @@ import { FoundActionEventDTO } from '../../../table-actions/table-action-rules-m
1010
import { CreatedTableFilterRO } from '../../../table-filters/application/response-objects/created-table-filters.ro.js';
1111

1212
export class TableSettingsInRowsDS {
13-
@ApiProperty({ isArray: true })
14-
sortable_by: Array<string>;
13+
@ApiProperty({ isArray: true })
14+
sortable_by: Array<string>;
1515

16-
@ApiProperty({ enum: QueryOrderingEnum })
17-
ordering: QueryOrderingEnum;
16+
@ApiProperty({ enum: QueryOrderingEnum })
17+
ordering: QueryOrderingEnum;
1818

19-
@ApiProperty()
20-
identity_column: string;
19+
@ApiProperty()
20+
ordering_field: string;
2121

22-
@ApiProperty({ isArray: true })
23-
list_fields: Array<string>;
22+
@ApiProperty()
23+
identity_column: string;
2424

25-
@ApiProperty()
26-
allow_csv_export: boolean;
25+
@ApiProperty({ isArray: true })
26+
list_fields: Array<string>;
2727

28-
@ApiProperty()
29-
allow_csv_import: boolean;
28+
@ApiProperty()
29+
allow_csv_export: boolean;
3030

31-
@ApiProperty()
32-
can_delete: boolean;
31+
@ApiProperty()
32+
allow_csv_import: boolean;
3333

34-
@ApiProperty()
35-
can_update: boolean;
34+
@ApiProperty()
35+
can_delete: boolean;
3636

37-
@ApiProperty()
38-
can_add: boolean;
37+
@ApiProperty()
38+
can_update: boolean;
39+
40+
@ApiProperty()
41+
can_add: boolean;
3942
}
4043
export class FoundTableRowsDs {
41-
@ApiProperty({ isArray: true })
42-
rows: Array<Record<string, unknown>>;
44+
@ApiProperty({ isArray: true })
45+
rows: Array<Record<string, unknown>>;
4346

44-
@ApiProperty({ isArray: true, type: PrimaryKeyDS })
45-
primaryColumns: Array<PrimaryKeyDS>;
47+
@ApiProperty({ isArray: true, type: PrimaryKeyDS })
48+
primaryColumns: Array<PrimaryKeyDS>;
4649

47-
@ApiProperty()
48-
pagination: RowsPaginationDS;
50+
@ApiProperty()
51+
pagination: RowsPaginationDS;
4952

50-
@ApiProperty({ isArray: true })
51-
sortable_by: Array<string>;
53+
@ApiProperty({ isArray: true })
54+
sortable_by: Array<string>;
5255

53-
@ApiProperty()
54-
ordering_field: string;
56+
@ApiProperty()
57+
ordering_field: string;
5558

56-
@ApiProperty({ enum: QueryOrderingEnum })
57-
ordering: QueryOrderingEnum;
59+
@ApiProperty({ enum: QueryOrderingEnum })
60+
ordering: QueryOrderingEnum;
5861

59-
@ApiProperty({ isArray: true })
60-
columns_view: Array<string>;
62+
@ApiProperty({ isArray: true })
63+
columns_view: Array<string>;
6164

62-
@ApiProperty({ isArray: true, type: FullTableStructureDs })
63-
structure: Array<FullTableStructureDs>;
65+
@ApiProperty({ isArray: true, type: FullTableStructureDs })
66+
structure: Array<FullTableStructureDs>;
6467

65-
@ApiProperty({ isArray: true, type: ForeignKeyDS })
66-
foreignKeys: Array<ForeignKeyDS>;
68+
@ApiProperty({ isArray: true, type: ForeignKeyDS })
69+
foreignKeys: Array<ForeignKeyDS>;
6770

68-
@ApiProperty()
69-
configured: boolean;
71+
@ApiProperty()
72+
configured: boolean;
7073

71-
@ApiProperty({ isArray: true })
72-
widgets: Array<TableWidgetEntity>;
74+
@ApiProperty({ isArray: true })
75+
widgets: Array<TableWidgetEntity>;
7376

74-
@ApiProperty()
75-
identity_column: string;
77+
@ApiProperty()
78+
identity_column: string;
7679

77-
@ApiProperty()
78-
table_permissions: TablePermissionDs;
80+
@ApiProperty()
81+
table_permissions: TablePermissionDs;
7982

80-
@ApiProperty({ isArray: true, type: FoundActionEventDTO })
81-
action_events: Array<FoundActionEventDTO>;
83+
@ApiProperty({ isArray: true, type: FoundActionEventDTO })
84+
action_events: Array<FoundActionEventDTO>;
8285

83-
@ApiProperty()
84-
large_dataset: boolean;
86+
@ApiProperty()
87+
large_dataset: boolean;
8588

86-
@ApiProperty()
87-
allow_csv_export: boolean;
89+
@ApiProperty()
90+
allow_csv_export: boolean;
8891

89-
@ApiProperty()
90-
allow_csv_import: boolean;
92+
@ApiProperty()
93+
allow_csv_import: boolean;
9194

92-
@ApiProperty()
93-
can_delete: boolean;
95+
@ApiProperty()
96+
can_delete: boolean;
9497

95-
@ApiProperty()
96-
can_update: boolean;
98+
@ApiProperty()
99+
can_update: boolean;
97100

98-
@ApiProperty()
99-
can_add: boolean;
101+
@ApiProperty()
102+
can_add: boolean;
100103

101-
@ApiProperty({ type: CreatedTableFilterRO, isArray: true })
102-
saved_filters: Array<CreatedTableFilterRO>;
104+
@ApiProperty({ type: CreatedTableFilterRO, isArray: true })
105+
saved_filters: Array<CreatedTableFilterRO>;
103106

104-
@ApiProperty({ type: TableSettingsInRowsDS })
105-
table_settings: TableSettingsInRowsDS;
107+
@ApiProperty({ type: TableSettingsInRowsDS })
108+
table_settings: TableSettingsInRowsDS;
106109
}
107110

108111
export class OrderingFiledDs {
109-
@ApiProperty()
110-
field: string;
112+
@ApiProperty()
113+
field: string;
111114

112-
@ApiProperty({ enum: QueryOrderingEnum })
113-
value: QueryOrderingEnum;
115+
@ApiProperty({ enum: QueryOrderingEnum })
116+
value: QueryOrderingEnum;
114117
}
115118

116119
export class FilteringFieldsDs {
117-
@ApiProperty({ enum: FilterCriteriaEnum })
118-
criteria: FilterCriteriaEnum;
120+
@ApiProperty({ enum: FilterCriteriaEnum })
121+
criteria: FilterCriteriaEnum;
119122

120-
@ApiProperty()
121-
field: string;
123+
@ApiProperty()
124+
field: string;
122125

123-
@ApiProperty()
124-
value: string;
126+
@ApiProperty()
127+
value: string;
125128
}
126129

127130
export class AutocompleteFieldsDs {
128-
@ApiProperty({ isArray: true })
129-
fields: Array<string>;
131+
@ApiProperty({ isArray: true })
132+
fields: Array<string>;
130133

131-
@ApiProperty()
132-
value: string;
134+
@ApiProperty()
135+
value: string;
133136
}

0 commit comments

Comments
 (0)