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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rez_core",
3
- "version": "4.0.45",
3
+ "version": "4.0.46",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -256,41 +256,45 @@ export class FilterService {
256
256
  ),
257
257
  ];
258
258
 
259
- // Build where clauses
260
- const baseWhere = this.buildWhereClauses(baseFilters, attributeMetaMap);
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 extra filter
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 = :school_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 = :org_id
276
- AND e.template_code NOT IN (
277
- SELECT template_code
278
- FROM frm_wf_comm_template
279
- WHERE level_type = 'SCH' AND level_id = :school_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
- school_id: level_id,
286
- org_id: organization_id,
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 != 'ORGP' &&
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
- (attr.element_type === 'upload' || attr.element_type === 'image') &&
106
- typeof resolvedEntityData[field] !== 'object'
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(
@@ -1,5 +0,0 @@
1
- {
2
- "recommendations": [
3
- "dbaeumer.vscode-eslint"
4
- ]
5
- }