rez_core 2.2.152 → 2.2.154

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.
Files changed (38) hide show
  1. package/dist/constant/global.constant.d.ts +9 -9
  2. package/dist/constant/global.constant.js +9 -9
  3. package/dist/constant/global.constant.js.map +1 -1
  4. package/dist/module/meta/entity/entity-master.entity.d.ts +1 -0
  5. package/dist/module/meta/entity/entity-master.entity.js +4 -0
  6. package/dist/module/meta/entity/entity-master.entity.js.map +1 -1
  7. package/dist/module/meta/entity.module.js +2 -0
  8. package/dist/module/meta/entity.module.js.map +1 -1
  9. package/dist/module/meta/service/common.service.d.ts +4 -0
  10. package/dist/module/meta/service/common.service.js +25 -0
  11. package/dist/module/meta/service/common.service.js.map +1 -0
  12. package/dist/module/workflow/repository/action-data.repository.js +1 -1
  13. package/dist/module/workflow/repository/action-data.repository.js.map +1 -1
  14. package/dist/module/workflow/service/action.service.js +10 -10
  15. package/dist/module/workflow/service/populate-workflow.service.js +6 -6
  16. package/dist/module/workflow/service/populate-workflow.service.js.map +1 -1
  17. package/dist/module/workflow/service/stage-group.service.js +1 -1
  18. package/dist/module/workflow/service/stage.service.js +2 -2
  19. package/dist/module/workflow/service/stage.service.js.map +1 -1
  20. package/dist/module/workflow/service/task.service.js +1 -1
  21. package/dist/module/workflow/service/task.service.js.map +1 -1
  22. package/dist/module/workflow/service/workflow-meta.service.js +2 -2
  23. package/dist/module/workflow/service/workflow.service.js +1 -1
  24. package/dist/tsconfig.build.tsbuildinfo +1 -1
  25. package/package.json +1 -1
  26. package/src/constant/global.constant.ts +9 -9
  27. package/src/module/meta/entity/entity-master.entity.ts +3 -0
  28. package/src/module/meta/entity.module.ts +2 -0
  29. package/src/module/meta/service/common.service.ts +9 -0
  30. package/src/module/workflow/repository/action-data.repository.ts +1 -1
  31. package/src/module/workflow/service/action.service.ts +10 -10
  32. package/src/module/workflow/service/populate-workflow.service.ts +9 -9
  33. package/src/module/workflow/service/stage-group.service.ts +1 -1
  34. package/src/module/workflow/service/stage.service.ts +2 -2
  35. package/src/module/workflow/service/task.service.ts +1 -1
  36. package/src/module/workflow/service/workflow-meta.service.ts +2 -2
  37. package/src/module/workflow/service/workflow.service.ts +1 -1
  38. package/.vscode/extensions.json +0 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rez_core",
3
- "version": "2.2.152",
3
+ "version": "2.2.154",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -7,8 +7,8 @@ export const ENTITYTYPE_ENTITYTABLECOLUMN = 'ETC';
7
7
  export const ENTITYTYPE_PREFERENCEMASTER = 'PRM';
8
8
  export const ENTITYTYPE_VIEWMASTER = 'VMS';
9
9
  export const ENTITYTYPE_MEDIA = 'MDA';
10
- export const ENTITYTYPE_LISTMASTER = 'LMS';
11
- export const ENTITYTYPE_LISTMASTERITEMS = 'LMI';
10
+ export const ENTITYTYPE_LISTMASTER = 'LIMS';
11
+ export const ENTITYTYPE_LISTMASTERITEMS = 'LIMI';
12
12
  export const ENTITYTYPE_SECTIONMASTER = 'SEC';
13
13
  export const ENTITYTYPE_FIELDMASTER = 'FLD';
14
14
  export const ENTITYTYPE_USRROLMAP = 'URM';
@@ -43,18 +43,18 @@ export const DISPLAY_REPORT = 'REPORT';
43
43
 
44
44
  //WorkFlow Type
45
45
  export const WORKFLOW = 'WRFW';
46
- export const ACTION = 'ACTN';
47
- export const STAGE = 'STG';
48
- export const STAGE_GROUP = 'STGP';
49
- export const ACTION_CATEGORY = 'ACTC';
50
- export const STAGE_ACTION_MAPPING = 'STGM';
46
+ export const ACTION = 'WFA';
47
+ export const STAGE = 'WFS';
48
+ export const STAGE_GROUP = 'WFSG';
49
+ export const ACTION_CATEGORY = 'WFAC';
50
+ export const STAGE_ACTION_MAPPING = 'WFSA';
51
51
  export const COMM_TEMPLATE = 'TEM';
52
- export const ACTION_TEMPLATE_MAPPING = 'ATMP';
52
+ export const ACTION_TEMPLATE_MAPPING = 'WFAT';
53
53
  export const WORKFLOW_DATA = 'WFDT';
54
54
  export const STAGE_MOVEMENT_DATA = 'STMV';
55
55
 
56
56
  export const ENTITY_MODIFICATION = 'ENMD';
57
- export const ACTION_RESOURCES_MAPPING = 'ARMS';
57
+ export const ACTION_RESOURCES_MAPPING = 'WFAR';
58
58
 
59
59
  // Form Status
60
60
  export const FORM_STATUS_TO_BE_SENT = 'TO_BE_SENT';
@@ -66,4 +66,7 @@ export class EntityMaster extends BaseEntity {
66
66
 
67
67
  @Column({ name: 'code_entry', nullable: true, length: 20 })
68
68
  code_entry: string;
69
+
70
+ @Column({ name: 'applicable_level', nullable: true, length: 20 })
71
+ applicable_level: string;
69
72
  }
@@ -55,6 +55,7 @@ import { EntityRelationData } from './entity/entity-relation-data.entity';
55
55
  import { EntityRelationService } from './service/entity-relation.service';
56
56
  import { EntityRelationDataService } from './service/entity-realation-data.service';
57
57
  import { EntityRelationController } from './controller/entity-relation.controller';
58
+ import { CommonService } from './service/common.service';
58
59
 
59
60
  @Module({
60
61
  imports: [
@@ -79,6 +80,7 @@ import { EntityRelationController } from './controller/entity-relation.controlle
79
80
  EntityMasterService,
80
81
  EntityServiceImpl,
81
82
  EntityDynamicService,
83
+ CommonService,
82
84
  AttributeMasterRepository,
83
85
  PreferenceService,
84
86
  PreferenceRepository,
@@ -0,0 +1,9 @@
1
+ import { Injectable } from '@nestjs/common';
2
+ import { EntityServiceImpl } from './entity-service-impl.service';
3
+
4
+ @Injectable()
5
+ export class CommonService extends EntityServiceImpl {
6
+ constructor() {
7
+ super();
8
+ }
9
+ }
@@ -60,7 +60,7 @@ export class ActionDataRepository extends EntityServiceImpl {
60
60
  // if the action_category_code is 'SDFM', create a entry in cr_wf_form table
61
61
  if (act?.action_category_code === 'SDFM') {
62
62
  const data = {
63
- entity_type: 'LFO',
63
+ entity_type: 'LFRM',
64
64
  stage_id: act.stage_id,
65
65
  mapped_entity_type,
66
66
  mapped_entity_id,
@@ -32,7 +32,7 @@ export class ActionService extends EntityServiceImpl {
32
32
  WHERE stg_act_mapping_id IN (
33
33
  SELECT id
34
34
  FROM cr_wf_stage_action_mapping
35
- WHERE action_id = ? AND entity_type = 'STGM'
35
+ WHERE action_id = ? AND entity_type = 'WFSA'
36
36
  )`,
37
37
  [actionData.id],
38
38
  );
@@ -66,7 +66,7 @@ export class ActionService extends EntityServiceImpl {
66
66
  action_id: action.id,
67
67
  stage_id: actionData.stage_id,
68
68
 
69
- entity_type: 'STGM',
69
+ entity_type: 'WFSA',
70
70
  } as any;
71
71
 
72
72
  if (entityData?.organization_id) {
@@ -86,7 +86,7 @@ export class ActionService extends EntityServiceImpl {
86
86
  stg_act_mapping_id: stageActionMappingData.id,
87
87
  template_code: templateCode,
88
88
  type: 'template',
89
- entity_type: 'ARMS',
89
+ entity_type: 'WFAR',
90
90
  } as any;
91
91
 
92
92
  if (entityData?.organization_id) {
@@ -109,7 +109,7 @@ export class ActionService extends EntityServiceImpl {
109
109
  level_id: entityData.level_id,
110
110
  form_id: actionData.form,
111
111
  type: 'form',
112
- entity_type: 'ARMS',
112
+ entity_type: 'WFAR',
113
113
  } as any;
114
114
 
115
115
  await super.createEntity(resourceMapping, loggedInUser);
@@ -140,7 +140,7 @@ export class ActionService extends EntityServiceImpl {
140
140
  }
141
141
 
142
142
  const stageMapID = await this.dataSource.query(
143
- `SELECT id FROM cr_wf_stage_action_mapping WHERE action_id = ? AND entity_type = 'STGM'`,
143
+ `SELECT id FROM cr_wf_stage_action_mapping WHERE action_id = ? AND entity_type = 'WFSA'`,
144
144
  [action.id],
145
145
  );
146
146
 
@@ -148,7 +148,7 @@ export class ActionService extends EntityServiceImpl {
148
148
  let stageActionMapping = {
149
149
  action_id: action.id,
150
150
  stage_id: stage_id,
151
- entity_type: 'STGM',
151
+ entity_type: 'WFSA',
152
152
  id: stageMapID.length > 0 ? stageMapID[0].id : null,
153
153
  } as any;
154
154
 
@@ -173,7 +173,7 @@ export class ActionService extends EntityServiceImpl {
173
173
  stg_act_mapping_id: stageActionMappingData.id,
174
174
  template_code: templateCode,
175
175
  type: 'template',
176
- entity_type: 'ARMS',
176
+ entity_type: 'WFAR',
177
177
  } as any;
178
178
 
179
179
  await super.createEntity(resourceMapping, loggedInUser);
@@ -190,7 +190,7 @@ export class ActionService extends EntityServiceImpl {
190
190
  stg_act_mapping_id: stageActionMappingData.id,
191
191
  form_id: form,
192
192
  type: 'form',
193
- entity_type: 'ARMS',
193
+ entity_type: 'WFAR',
194
194
  } as any;
195
195
 
196
196
  await super.createEntity(resourceMapping, loggedInUser);
@@ -205,12 +205,12 @@ export class ActionService extends EntityServiceImpl {
205
205
  ): Promise<any> {
206
206
  await this.dataSource.query(
207
207
  `DELETE FROM cr_wf_action_template_mapping WHERE stg_act_mapping_id IN (SELECT
208
- id FROM cr_wf_stage_action_mapping WHERE action_id = ? AND entity_type = 'STGM')`,
208
+ id FROM cr_wf_stage_action_mapping WHERE action_id = ? AND entity_type = 'WFSA')`,
209
209
  [id],
210
210
  );
211
211
 
212
212
  await this.dataSource.query(
213
- `DELETE FROM cr_wf_stage_action_mapping WHERE action_id = ? AND entity_type ='STGM'`,
213
+ `DELETE FROM cr_wf_stage_action_mapping WHERE action_id = ? AND entity_type ='WFSA'`,
214
214
  [id],
215
215
  );
216
216
 
@@ -32,11 +32,11 @@ export class PopulateWorkflowService extends EntityServiceImpl {
32
32
  // { table: 'cr_workflow', entityType: 'WRFW', service: 'workflowService' },
33
33
  // {
34
34
  // table: 'cr_wf_stage_group',
35
- // entityType: 'STGP',
35
+ // entityType: 'WFSG',
36
36
  // service: 'stageGroupService',
37
37
  // },
38
- // { table: 'cr_wf_stage', entityType: 'STG', service: 'stageService' },
39
- // { table: 'cr_wf_action', entityType: 'ACTN', service: 'actionService' },
38
+ // { table: 'cr_wf_stage', entityType: 'WFS', service: 'stageService' },
39
+ // { table: 'cr_wf_action', entityType: 'WFA', service: 'actionService' },
40
40
  // ];
41
41
 
42
42
  // const getAllFactoryData = async (table: { table: string }) => {
@@ -132,11 +132,11 @@ export class PopulateWorkflowService extends EntityServiceImpl {
132
132
  { table: 'cr_workflow', entityType: 'WRFW', service: 'workflowService' },
133
133
  {
134
134
  table: 'cr_wf_stage_group',
135
- entityType: 'STGP',
135
+ entityType: 'WFSG',
136
136
  service: 'stageGroupService',
137
137
  },
138
- { table: 'cr_wf_stage', entityType: 'STG', service: 'stageService' },
139
- { table: 'cr_wf_action', entityType: 'ACTN', service: 'actionService' },
138
+ { table: 'cr_wf_stage', entityType: 'WFS', service: 'stageService' },
139
+ { table: 'cr_wf_action', entityType: 'WFA', service: 'actionService' },
140
140
  ];
141
141
 
142
142
  // Fetch all base data
@@ -198,7 +198,7 @@ export class PopulateWorkflowService extends EntityServiceImpl {
198
198
  workflow_id: workflowIdMap[workflow_id],
199
199
  organization_id,
200
200
  level_id: organization_id,
201
- entity_type: 'STGP',
201
+ entity_type: 'WFSG',
202
202
  status: statusValue,
203
203
  },
204
204
  loggedInUser,
@@ -221,7 +221,7 @@ export class PopulateWorkflowService extends EntityServiceImpl {
221
221
  workflow_id: workflowIdMap[originalWorkflowId], // New workflow id!
222
222
  organization_id,
223
223
  level_id: organization_id,
224
- entity_type: 'STG',
224
+ entity_type: 'WFS',
225
225
  status: statusValue,
226
226
  },
227
227
  loggedInUser,
@@ -308,7 +308,7 @@ export class PopulateWorkflowService extends EntityServiceImpl {
308
308
  organization_id,
309
309
  action_requirement: matchedNewMandatory?.id ?? null,
310
310
  level_id: organization_id,
311
- entity_type: 'ACTN',
311
+ entity_type: 'WFA',
312
312
  form: formActionCategory.length > 0 ? formViewMaster[0]?.id : null,
313
313
  status: statusValue,
314
314
  },
@@ -285,7 +285,7 @@ export class StageGroupService extends EntityServiceImpl {
285
285
 
286
286
  if (getAllStage.length > 0) {
287
287
  for (const stage of getAllStage) {
288
- await this.stageService.deleteEntity('STG', stage.id, loggedInUser);
288
+ await this.stageService.deleteEntity('WFS', stage.id, loggedInUser);
289
289
  }
290
290
  }
291
291
 
@@ -74,14 +74,14 @@ export class StageService extends EntityServiceImpl {
74
74
  loggedInUser: UserData,
75
75
  ): Promise<any> {
76
76
  const getAllStageAction = await this.dataSource.query(
77
- `SELECT action_id FROM cr_wf_stage_action_mapping WHERE stage_id = ? AND entity_type = 'STGM'`,
77
+ `SELECT action_id FROM cr_wf_stage_action_mapping WHERE stage_id = ? AND entity_type = 'WFSA'`,
78
78
  [id],
79
79
  );
80
80
 
81
81
  if (getAllStageAction.length > 0) {
82
82
  for (const action of getAllStageAction) {
83
83
  await this.actionService.deleteEntity(
84
- 'ACTN',
84
+ 'WFA',
85
85
  action.action_id,
86
86
  loggedInUser,
87
87
  );
@@ -428,7 +428,7 @@ export class TaskService extends EntityServiceImpl {
428
428
  note: entity.remark,
429
429
  is_system: true,
430
430
  mapped_entity_type: 'LEAD',
431
- entity_type: 'LNO',
431
+ entity_type: 'NOTE',
432
432
  mapped_entity_id: entity.mapped_entity_id,
433
433
  stage_id: entity.stage_id,
434
434
  action_id: entity.action_id,
@@ -133,7 +133,7 @@ export class WorkflowMetaService extends EntityServiceImpl {
133
133
  const { mappingUsed, stageGroup, firstStage } = getAllResult;
134
134
 
135
135
  currentStage = await this.stageMovementRepo.save({
136
- entity_type: 'STGM',
136
+ entity_type: 'WFSA',
137
137
  mapped_entity_type,
138
138
  mapped_entity_id,
139
139
  name: firstStage.name,
@@ -205,7 +205,7 @@ export class WorkflowMetaService extends EntityServiceImpl {
205
205
 
206
206
  // Insert next stage
207
207
  await this.stageMovementRepo.save({
208
- entity_type: 'STGM',
208
+ entity_type: 'WFSA',
209
209
  mapped_entity_type,
210
210
  mapped_entity_id,
211
211
  name: nextStage.name,
@@ -153,7 +153,7 @@ export class WorkflowService extends EntityServiceImpl {
153
153
  if (getAllStageGroup.length > 0) {
154
154
  for (const stageGroup of getAllStageGroup) {
155
155
  await this.stateGroupService.deleteEntity(
156
- 'STGP',
156
+ 'WFSG',
157
157
  stageGroup.id,
158
158
  loggedInUser,
159
159
  );
@@ -1,5 +0,0 @@
1
- {
2
- "recommendations": [
3
- "dbaeumer.vscode-eslint"
4
- ]
5
- }