rez_core 3.1.65 → 3.1.66

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.65",
3
+ "version": "3.1.66",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -81,4 +81,7 @@ export class AttributeMaster extends BaseEntity {
81
81
 
82
82
  @Column({ name: 'appcode', nullable: true })
83
83
  appcode: string;
84
+
85
+ @Column({ name: 'is_hidden', nullable: true })
86
+ is_hidden: boolean;
84
87
  }
@@ -335,7 +335,6 @@ export class EntityDynamicService {
335
335
  let targetEntityId;
336
336
  let entityData;
337
337
 
338
-
339
338
  if (item.id) {
340
339
  // Update existing entity
341
340
  await this.updateEntity(
@@ -411,7 +410,6 @@ export class EntityDynamicService {
411
410
  ): Promise<any> {
412
411
  const organizationId = loggedInUser.organization_id;
413
412
 
414
-
415
413
  const tableName = await this.getTableName(entityType, organizationId);
416
414
  const validAttributes = await this.getAttributeCodes(
417
415
  entityType,
@@ -554,7 +552,10 @@ export class EntityDynamicService {
554
552
 
555
553
  // Convert boolean columns (1/0) into true/false
556
554
  for (const attr of validAttributes) {
557
- if (
555
+ if (attr.is_hidden) {
556
+ delete row[attr.attribute_key];
557
+ continue;
558
+ } else if (
558
559
  attr.db_datatype == 'boolean' &&
559
560
  row[attr.attribute_key] !== undefined
560
561
  ) {
@@ -606,10 +607,15 @@ export class EntityDynamicService {
606
607
  entityType: string,
607
608
  organizationId: string,
608
609
  ): Promise<
609
- { attribute_key: string; db_datatype: string; element_type: string }[]
610
+ {
611
+ attribute_key: string;
612
+ db_datatype: string;
613
+ element_type: string;
614
+ is_hidden?: boolean;
615
+ }[]
610
616
  > {
611
617
  const result = await this.dataSource.query(
612
- `SELECT attribute_key, db_datatype, element_type
618
+ `SELECT attribute_key, db_datatype, element_type, is_hidden
613
619
  FROM cr_attribute_master
614
620
  WHERE mapped_entity_type = ? AND organization_id = ?`,
615
621
  [entityType, organizationId],
@@ -625,6 +631,7 @@ export class EntityDynamicService {
625
631
  attribute_key: row.attribute_key,
626
632
  db_datatype: row.db_datatype,
627
633
  element_type: row.element_type,
634
+ is_hidden: row.is_hidden,
628
635
  }));
629
636
  }
630
637