rez_core 4.0.45 → 4.0.46
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/dist/module/filter/service/filter.service.js +15 -12
- package/dist/module/filter/service/filter.service.js.map +1 -1
- package/dist/module/meta/service/resolver.service.js +2 -2
- package/dist/module/meta/service/resolver.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/module/filter/service/filter.service.ts +25 -18
- package/src/module/meta/service/resolver.service.ts +2 -2
- package/.vscode/extensions.json +0 -5
package/package.json
CHANGED
|
@@ -256,41 +256,45 @@ export class FilterService {
|
|
|
256
256
|
),
|
|
257
257
|
];
|
|
258
258
|
|
|
259
|
-
|
|
260
|
-
|
|
259
|
+
// 🧱 Build where clauses
|
|
260
|
+
const baseWhere = this.buildWhereClauses(baseFilters, attributeMetaMap);
|
|
261
|
+
|
|
262
|
+
// Handle TEMPLATE entity special condition
|
|
263
|
+
if (entity_type === 'TEMP' || entity_type === 'TEM') {
|
|
264
|
+
const templateTable = entityMeta?.data_source || 'frm_wf_comm_template';
|
|
261
265
|
|
|
262
|
-
// check level_id and level_type
|
|
263
|
-
// ✅ Special condition for TEMPLATE entity
|
|
264
|
-
if (entity_type === 'TEM') {
|
|
265
266
|
if (level_type === 'ORG') {
|
|
266
|
-
// ORG level → no
|
|
267
|
+
// ORG level → no additional filter
|
|
267
268
|
} else if (level_type === 'SCH') {
|
|
268
269
|
baseWhere.push({
|
|
269
270
|
query: `
|
|
270
271
|
(
|
|
271
|
-
(e.level_type = 'SCH' AND e.level_id = :
|
|
272
|
+
(e.level_type = 'SCH' AND e.level_id = :sch_level_id)
|
|
272
273
|
OR
|
|
273
274
|
(
|
|
274
|
-
e.level_type = 'ORG'
|
|
275
|
-
AND e.level_id = :
|
|
276
|
-
AND e.
|
|
277
|
-
SELECT
|
|
278
|
-
FROM
|
|
279
|
-
WHERE level_type = 'SCH' AND level_id = :
|
|
275
|
+
e.level_type = 'ORG'
|
|
276
|
+
AND e.level_id = :org_level_id
|
|
277
|
+
AND e.code NOT IN (
|
|
278
|
+
SELECT sub.code
|
|
279
|
+
FROM ${templateTable} AS sub
|
|
280
|
+
WHERE sub.level_type = 'SCH' AND sub.level_id = :sch_level_id
|
|
280
281
|
)
|
|
281
282
|
)
|
|
282
283
|
)
|
|
283
284
|
`,
|
|
284
285
|
params: {
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
}
|
|
286
|
+
sch_level_id: loggedInUser.level_id,
|
|
287
|
+
org_level_id: loggedInUser.organization_id,
|
|
288
|
+
}
|
|
288
289
|
});
|
|
289
290
|
}
|
|
290
|
-
}
|
|
291
|
+
}
|
|
291
292
|
|
|
293
|
+
// Default org/level clause — skip TEMPLATE entity
|
|
292
294
|
if (
|
|
293
|
-
entity_type
|
|
295
|
+
entity_type !== 'ORGP' &&
|
|
296
|
+
entity_type !== 'TEMP' &&
|
|
297
|
+
entity_type !== 'TEM' && // ✅ skip TEMPLATE
|
|
294
298
|
level_type &&
|
|
295
299
|
level_id &&
|
|
296
300
|
organization_id &&
|
|
@@ -305,6 +309,9 @@ if (
|
|
|
305
309
|
}
|
|
306
310
|
|
|
307
311
|
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
|
|
308
315
|
if (entity_type == "USR" || entity_type == "UPR") {
|
|
309
316
|
baseWhere.push({
|
|
310
317
|
query: 'e.is_customer is NULL',
|
|
@@ -102,8 +102,8 @@ export class ResolverService {
|
|
|
102
102
|
|
|
103
103
|
// --------UPLOAD / IMAGE --------
|
|
104
104
|
else if (
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
attr.element_type === 'upload' ||
|
|
106
|
+
attr.element_type === 'image'
|
|
107
107
|
) {
|
|
108
108
|
const mediaService = await this.getMediaDataService();
|
|
109
109
|
const uploadData = await mediaService.getMediaDownloadUrl(
|