rez_core 5.0.33 → 5.0.34

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": "5.0.33",
3
+ "version": "5.0.34",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -5,13 +5,14 @@ import { EntityMaster } from '../entity/entity-master.entity';
5
5
  import { EntityMasterRepository } from '../repository/entity-master.repository';
6
6
  import { ListMasterService } from 'src/module/listmaster/service/list-master.service';
7
7
  import { SavedFilterRepositoryService } from 'src/module/filter/repository/saved-filter.repository';
8
+ import { AttributeMasterRepository } from '../repository/attribute-master.repository';
8
9
 
9
10
  @Injectable()
10
11
  export class EntityMasterService {
11
12
  constructor(
12
13
  @InjectRepository(EntityMaster)
13
14
  private entityMasterRepository: Repository<EntityMaster>,
14
-
15
+ private attributeMasterRepo: AttributeMasterRepository,
15
16
  private entityMasterRepo: EntityMasterRepository,
16
17
  private readonly dataSource: DataSource,
17
18
  @Inject('ListMasterService')
@@ -92,13 +93,8 @@ export class EntityMasterService {
92
93
  }
93
94
 
94
95
  // Step 2: Get attribute_master (instead of entity_table_column)
95
- const attributes = await this.dataSource.query(
96
- `SELECT *
97
- FROM frm_entity_attribute
98
- WHERE mapped_entity_type = $1
99
- AND organization_id = $2 `,
100
- [entityMasterData.mapped_entity_type, loggedInUser.organization_id],
101
- );
96
+
97
+ const attributes = await this.attributeMasterRepo.findAttributesByMappedEntityType(entityMasterData.mapped_entity_type, loggedInUser);
102
98
 
103
99
  // Step 3: Attach column_list from attribute_master
104
100
  entityMasterData['attribute_list'] = attributes;