rez_core 7.1.52 → 7.1.53

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": "7.1.52",
3
+ "version": "7.1.53",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -3,16 +3,16 @@ import * as moment from 'moment';
3
3
  import { ListMasterService } from 'src/module/listmaster/service/list-master.service';
4
4
  import { ModuleRef } from '@nestjs/core';
5
5
  import { AttributeMasterRepository } from '../../meta/meta/repository/attribute-master.repository';
6
+ import { EntityDataService } from './entity-data.service';
6
7
 
7
8
  @Injectable()
8
9
  export class ResolverService {
9
10
  private mediaDataService: any;
10
11
 
11
12
  constructor(
12
- @Inject('ListMasterService')
13
- private readonly listMasterService: ListMasterService,
14
13
  private readonly moduleRef: ModuleRef,
15
14
  private readonly attributeMasterRepo: AttributeMasterRepository,
15
+ private readonly entityDataService: EntityDataService
16
16
  ) {
17
17
  }
18
18
 
@@ -48,12 +48,13 @@ export class ResolverService {
48
48
  if (attr.ds_category) {
49
49
  const params = {}; // you can pass any additional filters here
50
50
  let options: any = [];
51
- options = await this.listMasterService.getDropDownData(
51
+ options = await this.entityDataService.getDropDownData(
52
52
  attr.mapped_entity_type,
53
53
  attr.attribute_key,
54
- loggedInUser,
55
- params,
54
+ 'ALL',
56
55
  Array.isArray(codeValue) ? codeValue : [codeValue],
56
+ true,
57
+ loggedInUser,
57
58
  );
58
59
 
59
60
  const item = options.find(
@@ -309,63 +309,6 @@ export class ListMasterService extends EntityServiceImpl {
309
309
  );
310
310
  }
311
311
 
312
- async getDropDownData(
313
- entity_type: string,
314
- attribute_key: string,
315
- loggedInUser: UserData,
316
- body: Record<string, any>,
317
- values?: any[],
318
- inactiveIdsArray?: any[],
319
- ) {
320
- try {
321
- // Extract inactiveIds from body
322
- const { ...params } = body;
323
-
324
- // Fetch Attribute Master to get data source configuration
325
- const attributeMaster =
326
- await this.attributeMasterService.findByMappedEntityTypeAndAttributeKey(
327
- entity_type,
328
- attribute_key,
329
- loggedInUser,
330
- );
331
-
332
- if (!attributeMaster) {
333
- throw new BadRequestException(
334
- `Attribute '${attribute_key}' not found for entity '${entity_type}'`,
335
- );
336
- }
337
-
338
- // Extract data source configuration from AttributeMaster
339
- const {
340
- ds_category, // ENT_LIST | LM | CAPI | CK | EXTAPI
341
- ds_entitytype, // Entity type or list code
342
- ds_filtercode, // Additional filter code
343
- ds_appcode, // Target app code
344
- } = attributeMaster;
345
-
346
- if (!ds_category) {
347
- throw new BadRequestException(
348
- `Data source category not configured for attribute '${attribute_key}'`,
349
- );
350
- }
351
-
352
- return this.processDropdown(
353
- ds_category,
354
- ds_entitytype,
355
- ds_appcode,
356
- ds_filtercode,
357
- params,
358
- loggedInUser,
359
- values,
360
- inactiveIdsArray,
361
- );
362
- } catch (error) {
363
- // TODO: Return blank array on error instead of throwing
364
- console.error('❌ Error in getDropDownData:', error.message);
365
- return [];
366
- }
367
- }
368
-
369
312
  /**
370
313
  * Process dropdown data locally (SELF APP)
371
314
  */