rez_core 2.1.112 → 2.1.114

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,8 +1,8 @@
1
1
  {
2
2
  "name": "rez_core",
3
- "version": "2.1.112",
3
+ "version": "2.1.114",
4
4
  "description": "",
5
- "author": "",
5
+ "author": "",
6
6
  "private": false,
7
7
  "license": "UNLICENSED",
8
8
  "scripts": {
@@ -13,6 +13,7 @@ import { FilterModule } from './module/filter/filter.module';
13
13
  import { AuthModule } from './module/auth/auth.module';
14
14
  import { LeadModule } from './module/lead/lead.module';
15
15
  import { LayoutPreferenceModule } from './module/layout_preference/layout_preference.module';
16
+ import { WorkflowModule } from './module/workflow/workflow.module';
16
17
  import { ResolverModule } from './module/resolver/resolver.module';
17
18
 
18
19
  @Global()
@@ -34,6 +35,7 @@ export class CoreModule {
34
35
  AuthModule,
35
36
  LeadModule,
36
37
  LayoutPreferenceModule,
38
+ WorkflowModule,
37
39
  ResolverModule,
38
40
  ];
39
41
 
@@ -48,6 +50,7 @@ export class CoreModule {
48
50
  FilterModule,
49
51
  LeadModule,
50
52
  LayoutPreferenceModule,
53
+ WorkflowModule,
51
54
  ResolverModule,
52
55
  ];
53
56
 
@@ -167,7 +167,7 @@ export class MasterService {
167
167
 
168
168
  const attributes =
169
169
  await this.attributeMasterService.findAttributesByMappedEntityType(
170
- entityMasterData?.mapped_entity_type,
170
+ entityMasterData.mapped_entity_type,
171
171
  loggedInUser.organization_id,
172
172
  );
173
173
 
@@ -4,7 +4,7 @@ import { ResolverController } from './controller/resolver.controller';
4
4
  import { EntityModule } from '../meta/entity.module';
5
5
 
6
6
  @Module({
7
- imports: [EntityModule],
7
+ imports: [],
8
8
  controllers: [ResolverController],
9
9
  providers: [ResolverService],
10
10
  exports: [ResolverService],
@@ -4,10 +4,8 @@ import { UserData } from 'src/module/user/entity/user.entity';
4
4
  import { EntityServiceImpl } from 'src/module/meta/service/entity-service-impl.service';
5
5
 
6
6
  @Injectable()
7
- export class ResolverService extends EntityServiceImpl {
8
- constructor(private readonly dataSource: DataSource) {
9
- super();
10
- }
7
+ export class ResolverService {
8
+ constructor(private readonly dataSource: DataSource) {}
11
9
 
12
10
  async getResolvedData(
13
11
  loggedInUser: UserData,
@@ -29,24 +27,35 @@ export class ResolverService extends EntityServiceImpl {
29
27
 
30
28
  // -------- ENTITY data_source_type --------
31
29
  if (attr.data_source_type === 'entity') {
30
+ const [entityDef] = await this.dataSource.query(
31
+ `SELECT * FROM cr_entity_master WHERE mapped_entity_type = ? AND organization_id = ?`,
32
+ [attr.datasource_list, loggedInUser.organization_id],
33
+ );
34
+
35
+ if (!entityDef) {
36
+ // fallback or skip if no mapping found
37
+ resolvedEntityData[field] = codeValue;
38
+ continue;
39
+ }
40
+
41
+ const tableName = entityDef.db_table_name;
42
+
32
43
  if (Array.isArray(codeValue)) {
33
44
  const resolvedValues: string[] = [];
34
45
 
35
46
  for (const code of codeValue) {
36
- const item = await super.getEntityData(
37
- attr.datasource_list,
38
- code,
39
- loggedInUser,
47
+ const [item] = await this.dataSource.query(
48
+ `SELECT * FROM ${tableName} WHERE code = ? AND organization_id = ?`,
49
+ [code, loggedInUser.organization_id],
40
50
  );
41
51
  resolvedValues.push(item?.[attr.data_source_attribute] ?? code);
42
52
  }
43
53
 
44
54
  resolvedEntityData[field] = resolvedValues;
45
55
  } else {
46
- const item = await super.getEntityData(
47
- attr.datasource_list,
48
- codeValue,
49
- loggedInUser,
56
+ const [item] = await this.dataSource.query(
57
+ `SELECT * FROM ${tableName} WHERE code = ? AND organization_id = ?`,
58
+ [codeValue, loggedInUser.organization_id],
50
59
  );
51
60
  resolvedEntityData[field] =
52
61
  item?.[attr.data_source_attribute] ?? codeValue;
@@ -0,0 +1,23 @@
1
+ # DB_HOST: "13.234.25.234"
2
+ DB_HOST: 'localhost'
3
+ DB_PORT: '3306'
4
+ DB_USER: 'root'
5
+ DB_PASS: 'root'
6
+ DB_NAME: 'eth_core'
7
+ MASTER_KEY: '0QZ2eRJv5oVILYnyBlC+FbSGVQiWKReh'
8
+ MASTER_IV: 'heuUQf5uPVtkotrFAOKUVw=='
9
+ SECRET_KEY: '1hard_to_guess_secret7890a'
10
+ CLIENT_ID: '324529881356-596sc8ksrb9lg01i7sktofqqqf0fv2ug.apps.googleusercontent.com'
11
+ CLIENT_SECRET: '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'
12
+ CALLBACK_URL: 'http://localhost:3000/auth/google/callback'
13
+ OTP_EXPIRY: '10'
14
+ OTP_LENGTH: '6'
15
+ VERIFY_OTP: 'false'
16
+ DEFAULT_OTP: '123456'
17
+ TOKEN_EXPIRY: 1
18
+ AWS:
19
+ S3:
20
+ AWS_ACCESS_KEY_ID: 'AKIAYYKIBDDSQF3KILGE'
21
+ AWS_SECRET_KEY: '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'
22
+ AWS_REGION: 'ap-south-1'
23
+ BUCKET_NAME: 'testether'