rez_core 2.2.124 → 2.2.125
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -194,16 +194,16 @@ export class FilterService {
|
|
|
194
194
|
|
|
195
195
|
// layout preference query
|
|
196
196
|
const layoutPreference = await this.dataSource.query(
|
|
197
|
-
`SELECT
|
|
197
|
+
`SELECT mapped_json
|
|
198
198
|
FROM cr_entity_layout_pref
|
|
199
|
-
WHERE user_id = ? AND mapped_entity_type = ? AND mapped_level_id = ? AND mapped_level_type =
|
|
199
|
+
WHERE user_id = ? AND mapped_entity_type = ? AND mapped_level_id = ? AND mapped_level_type = ? AND type = 'layout'`,
|
|
200
200
|
[user_id, entity_type, level_id, level_type],
|
|
201
201
|
);
|
|
202
202
|
|
|
203
203
|
console.log('found layoutPreference', layoutPreference);
|
|
204
204
|
|
|
205
205
|
// Extract layout preference
|
|
206
|
-
const layout = layoutPreference?.[0]?.
|
|
206
|
+
const layout = layoutPreference?.[0]?.mapped_json?.quick_tab || {};
|
|
207
207
|
|
|
208
208
|
let showList = layout?.show_list?.map((val) => val.toLowerCase()) || [];
|
|
209
209
|
|
|
@@ -366,10 +366,10 @@ export class FilterService {
|
|
|
366
366
|
// });
|
|
367
367
|
// }
|
|
368
368
|
|
|
369
|
-
if (layoutPreference && layoutPreference[0]?.
|
|
370
|
-
if (Array.isArray(layoutPreference[0]?.
|
|
369
|
+
if (layoutPreference && layoutPreference[0]?.mapped_json?.sorting) {
|
|
370
|
+
if (Array.isArray(layoutPreference[0]?.mapped_json?.sorting?.tabs)) {
|
|
371
371
|
let preferenceTabArray =
|
|
372
|
-
layoutPreference[0]?.
|
|
372
|
+
layoutPreference[0]?.mapped_json?.sorting?.tabs;
|
|
373
373
|
let tabFilter = preferenceTabArray.find(
|
|
374
374
|
(tabData) => tabData.tab_name === tabs?.value,
|
|
375
375
|
);
|
|
@@ -381,10 +381,10 @@ export class FilterService {
|
|
|
381
381
|
);
|
|
382
382
|
});
|
|
383
383
|
} else if (
|
|
384
|
-
Array.isArray(layoutPreference[0]?.
|
|
384
|
+
Array.isArray(layoutPreference[0]?.mapped_json?.sorting?.sortby)
|
|
385
385
|
) {
|
|
386
386
|
// Optional sorting
|
|
387
|
-
layoutPreference[0]?.
|
|
387
|
+
layoutPreference[0]?.mapped_json?.sorting?.sortby?.forEach(
|
|
388
388
|
({ column, order }) => {
|
|
389
389
|
qb.addOrderBy(
|
|
390
390
|
`e.${column}`,
|