rez_core 3.1.2 → 3.1.4
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
|
@@ -90,6 +90,8 @@ export class FilterService {
|
|
|
90
90
|
...savedFilters,
|
|
91
91
|
].filter((f) => f.filter_value !== '');
|
|
92
92
|
|
|
93
|
+
console.log(allFilters, 'ALL FILTERS');
|
|
94
|
+
|
|
93
95
|
// 🔹 Step 2: Group filters by filter_entity_type
|
|
94
96
|
const grouped = allFilters.reduce(
|
|
95
97
|
(acc, f) => {
|
|
@@ -100,6 +102,7 @@ export class FilterService {
|
|
|
100
102
|
{} as Record<string, any[]>,
|
|
101
103
|
);
|
|
102
104
|
|
|
105
|
+
console.log(grouped, 'GROUPED FILTERS');
|
|
103
106
|
// 🔹 Step 3: Handle sub-entities first
|
|
104
107
|
let intersectionIds: number[] | null = null;
|
|
105
108
|
for (const [subEntityType, filters] of Object.entries(grouped)) {
|
|
@@ -117,6 +120,8 @@ export class FilterService {
|
|
|
117
120
|
|
|
118
121
|
const subResult = await this.applyFilter(subDto);
|
|
119
122
|
|
|
123
|
+
console.log(subResult, 'SUB RESULT');
|
|
124
|
+
|
|
120
125
|
// ✅ new way (fetch source entity IDs via relation mapping)
|
|
121
126
|
const subEntityIds = subResult.data.entity_list.map((row) => row.id);
|
|
122
127
|
|
|
@@ -135,6 +140,8 @@ export class FilterService {
|
|
|
135
140
|
dto.loggedInUser.organization_id,
|
|
136
141
|
);
|
|
137
142
|
|
|
143
|
+
console.log(relatedIds, 'RELATED IDS');
|
|
144
|
+
|
|
138
145
|
// keep intersection
|
|
139
146
|
intersectionIds =
|
|
140
147
|
intersectionIds === null
|
|
@@ -230,11 +237,9 @@ export class FilterService {
|
|
|
230
237
|
);
|
|
231
238
|
|
|
232
239
|
// Get and parse saved filters
|
|
233
|
-
console.log('IN FILTER SERVICE', savedFilterCode);
|
|
234
240
|
const savedFilters = await this.getSavedFilters(
|
|
235
241
|
savedFilterCode ?? undefined,
|
|
236
242
|
);
|
|
237
|
-
console.log('SAVED FILTERS', savedFilters);
|
|
238
243
|
const savedFiltersNormalized = savedFilters.map((f) => ({
|
|
239
244
|
filter_attribute: f.filter_attribute,
|
|
240
245
|
filter_operator: f.filter_operator,
|