rez_core 3.1.13 → 3.1.15

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rez_core",
3
- "version": "3.1.13",
3
+ "version": "3.1.15",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -48,6 +48,8 @@ export class FilterController {
48
48
  sortby,
49
49
  } = body;
50
50
 
51
+
52
+
51
53
  return this.filterService.applyFilterWrapper({
52
54
  entity_type,
53
55
  quickFilter,
@@ -9,6 +9,7 @@ export interface FilterCondition {
9
9
  filter_attribute_name?: string; // NEW - main/sub entity type (e.g. LEAD, CONTACT, ORG)
10
10
  filter_attribute_data_type?: string;
11
11
  filter_entity_name?: string;
12
+ datasource_list?: string; // NEW - for attributes from different datasource
12
13
  }
13
14
 
14
15
  export interface TabsConfig {
@@ -80,6 +80,8 @@ export class FilterService {
80
80
  attributeFilter = [],
81
81
  } = dto;
82
82
 
83
+ console.log(dto,"APPLY FILTER WRAPPER DTO");
84
+
83
85
  // 🔹 Step 1: Collect all filters (from body + savedFilter)
84
86
  const savedFilters = await this.getSavedFilters(
85
87
  savedFilterCode ?? undefined,
@@ -90,6 +92,8 @@ export class FilterService {
90
92
  ...savedFilters,
91
93
  ].filter((f) => f.filter_value !== '');
92
94
 
95
+ console.log(allFilters,"STEP 1: ALL FILTERS");
96
+
93
97
  // 🔹 Step 2: Group filters by filter_entity_type
94
98
  const grouped = allFilters.reduce(
95
99
  (acc, f) => {
@@ -100,6 +104,8 @@ export class FilterService {
100
104
  {} as Record<string, any[]>,
101
105
  );
102
106
 
107
+ console.log(grouped,"STEP 2: GROUPED FILTERS BY ENTITY TYPE");
108
+
103
109
  // 🔹 Step 3: Handle sub-entities first
104
110
  let intersectionIds: number[] | null = null;
105
111
  for (const [subEntityType, filters] of Object.entries(grouped)) {
@@ -150,6 +156,8 @@ export class FilterService {
150
156
  }
151
157
  }
152
158
 
159
+ console.log(intersectionIds,"STEP 3: INTERSECTION IDS FOR MAIN ENTITY");
160
+
153
161
  // 🔹 Step 4: Call applyFilter for main entity
154
162
  const mainFilters = grouped[entity_type] || [];
155
163
  const mainDto: FilterRequestDto = {
@@ -253,6 +261,8 @@ export class FilterService {
253
261
  ),
254
262
  ];
255
263
 
264
+ console.log(baseFilters,"STEP 1B: BASE FILTERS FOR MAIN ENTITY");
265
+
256
266
  // Build where clauses
257
267
  const baseWhere = this.buildWhereClauses(baseFilters, attributeMetaMap);
258
268