rez_core 5.0.89 → 5.0.91
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/dist/module/meta/repository/entity-master.repository.d.ts +3 -1
- package/dist/module/meta/repository/entity-master.repository.js +10 -6
- package/dist/module/meta/repository/entity-master.repository.js.map +1 -1
- package/dist/module/meta/service/entity-relation.service.d.ts +1 -3
- package/dist/module/meta/service/entity-relation.service.js +22 -31
- package/dist/module/meta/service/entity-relation.service.js.map +1 -1
- package/dist/module/module/service/module-access.service.d.ts +3 -1
- package/dist/module/module/service/module-access.service.js +11 -4
- package/dist/module/module/service/module-access.service.js.map +1 -1
- package/dist/module/notification/controller/notification.controller.d.ts +1 -1
- package/dist/module/notification/service/notification.service.d.ts +6 -4
- package/dist/module/notification/service/notification.service.js +22 -20
- package/dist/module/notification/service/notification.service.js.map +1 -1
- package/dist/module/workflow/controller/action.controller.d.ts +5 -2
- package/dist/module/workflow/controller/form-master.controller.d.ts +4 -1
- package/dist/module/workflow/repository/action-data.repository.d.ts +2 -3
- package/dist/module/workflow/repository/action-data.repository.js +29 -18
- package/dist/module/workflow/repository/action-data.repository.js.map +1 -1
- package/dist/module/workflow/repository/action.repository.d.ts +6 -7
- package/dist/module/workflow/repository/action.repository.js +53 -61
- package/dist/module/workflow/repository/action.repository.js.map +1 -1
- package/dist/module/workflow/repository/comm-template.repository.d.ts +2 -3
- package/dist/module/workflow/repository/comm-template.repository.js +15 -9
- package/dist/module/workflow/repository/comm-template.repository.js.map +1 -1
- package/dist/module/workflow/repository/form-master.repository.d.ts +7 -4
- package/dist/module/workflow/repository/form-master.repository.js +14 -11
- package/dist/module/workflow/repository/form-master.repository.js.map +1 -1
- package/dist/module/workflow/repository/stage-group.repository.d.ts +4 -5
- package/dist/module/workflow/repository/stage-group.repository.js +34 -35
- package/dist/module/workflow/repository/stage-group.repository.js.map +1 -1
- package/dist/module/workflow/repository/stage-movement.repository.d.ts +6 -3
- package/dist/module/workflow/repository/stage-movement.repository.js +30 -17
- package/dist/module/workflow/repository/stage-movement.repository.js.map +1 -1
- package/dist/module/workflow/service/action.service.d.ts +13 -5
- package/dist/module/workflow/service/action.service.js +71 -20
- package/dist/module/workflow/service/action.service.js.map +1 -1
- package/dist/module/workflow/service/entity-modification.service.d.ts +3 -3
- package/dist/module/workflow/service/entity-modification.service.js +4 -4
- package/dist/module/workflow/service/entity-modification.service.js.map +1 -1
- package/dist/module/workflow/service/form-master.service.d.ts +4 -1
- package/dist/module/workflow/service/stage-group.service.d.ts +2 -7
- package/dist/module/workflow/service/stage-group.service.js +19 -17
- package/dist/module/workflow/service/stage-group.service.js.map +1 -1
- package/dist/module/workflow/service/stage.service.d.ts +2 -3
- package/dist/module/workflow/service/stage.service.js +24 -11
- package/dist/module/workflow/service/stage.service.js.map +1 -1
- package/dist/module/workflow/service/task.service.d.ts +2 -5
- package/dist/module/workflow/service/task.service.js +44 -45
- package/dist/module/workflow/service/task.service.js.map +1 -1
- package/dist/module/workflow/service/workflow-list-master.service.d.ts +1 -3
- package/dist/module/workflow/service/workflow-list-master.service.js +38 -26
- package/dist/module/workflow/service/workflow-list-master.service.js.map +1 -1
- package/dist/module/workflow/service/workflow-meta.service.d.ts +6 -3
- package/dist/module/workflow/service/workflow-meta.service.js +78 -50
- package/dist/module/workflow/service/workflow-meta.service.js.map +1 -1
- package/dist/module/workflow/service/workflow.service.d.ts +1 -3
- package/dist/module/workflow/service/workflow.service.js +10 -6
- package/dist/module/workflow/service/workflow.service.js.map +1 -1
- package/dist/module/workflow-schedule/processors/schedule.processor.d.ts +4 -2
- package/dist/module/workflow-schedule/processors/schedule.processor.js +51 -38
- package/dist/module/workflow-schedule/processors/schedule.processor.js.map +1 -1
- package/dist/module/workflow-schedule/service/workflow-schedule.service.d.ts +2 -3
- package/dist/module/workflow-schedule/service/workflow-schedule.service.js +15 -14
- package/dist/module/workflow-schedule/service/workflow-schedule.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/module/meta/repository/entity-master.repository.ts +9 -8
- package/src/module/meta/service/entity-relation.service.ts +23 -41
- package/src/module/module/service/module-access.service.ts +8 -4
- package/src/module/notification/service/notification.service.ts +24 -20
- package/src/module/workflow/repository/action-data.repository.ts +33 -28
- package/src/module/workflow/repository/action.repository.ts +74 -77
- package/src/module/workflow/repository/comm-template.repository.ts +19 -13
- package/src/module/workflow/repository/form-master.repository.ts +15 -24
- package/src/module/workflow/repository/stage-group.repository.ts +41 -52
- package/src/module/workflow/repository/stage-movement.repository.ts +35 -32
- package/src/module/workflow/service/action.service.ts +70 -43
- package/src/module/workflow/service/entity-modification.service.ts +3 -3
- package/src/module/workflow/service/stage-group.service.ts +21 -19
- package/src/module/workflow/service/stage.service.ts +36 -28
- package/src/module/workflow/service/task.service.ts +53 -56
- package/src/module/workflow/service/workflow-list-master.service.ts +42 -34
- package/src/module/workflow/service/workflow-meta.service.ts +81 -77
- package/src/module/workflow/service/workflow.service.ts +9 -5
- package/src/module/workflow-schedule/processors/schedule.processor.ts +133 -97
- package/src/module/workflow-schedule/service/workflow-schedule.service.ts +24 -26
|
@@ -20,13 +20,16 @@ const workflow_level_mapping_entity_1 = require("../entity/workflow-level-mappin
|
|
|
20
20
|
const stage_group_entity_1 = require("../entity/stage-group.entity");
|
|
21
21
|
const stage_entity_1 = require("../entity/stage.entity");
|
|
22
22
|
const reflection_helper_service_1 = require("../../../utils/service/reflection-helper.service");
|
|
23
|
+
const action_data_entity_1 = require("../entity/action-data.entity");
|
|
24
|
+
const task_data_entity_1 = require("../entity/task-data.entity");
|
|
23
25
|
let StageMovementRepository = class StageMovementRepository {
|
|
24
|
-
constructor(workflowLevelMappingRepo, stageGroupRepo, stageRepo,
|
|
26
|
+
constructor(workflowLevelMappingRepo, stageGroupRepo, stageRepo, reflectionHelper, actionDataEntityRepository, taskDataEntityRepository) {
|
|
25
27
|
this.workflowLevelMappingRepo = workflowLevelMappingRepo;
|
|
26
28
|
this.stageGroupRepo = stageGroupRepo;
|
|
27
29
|
this.stageRepo = stageRepo;
|
|
28
|
-
this.dataSource = dataSource;
|
|
29
30
|
this.reflectionHelper = reflectionHelper;
|
|
31
|
+
this.actionDataEntityRepository = actionDataEntityRepository;
|
|
32
|
+
this.taskDataEntityRepository = taskDataEntityRepository;
|
|
30
33
|
}
|
|
31
34
|
async getFirstStage({ loggedInUser, mapped_entity_type, mapped_entity_id, }) {
|
|
32
35
|
let workflowLevelMapping = await this.workflowLevelMappingRepo.findOne({
|
|
@@ -111,25 +114,25 @@ let StageMovementRepository = class StageMovementRepository {
|
|
|
111
114
|
async getAllActionByStageId(stageId) {
|
|
112
115
|
const actionRepo = this.reflectionHelper.getRepoService('ActionEntity');
|
|
113
116
|
const result = await actionRepo
|
|
114
|
-
.createQueryBuilder(
|
|
115
|
-
.leftJoin(
|
|
116
|
-
.leftJoin(
|
|
117
|
-
.where(
|
|
117
|
+
.createQueryBuilder('a')
|
|
118
|
+
.leftJoin('frm_wf_stage_action_mapping', 'm', 'a.id = m.action_id::bigint')
|
|
119
|
+
.leftJoin('frm_wf_action_category', 'ac', 'a.action_category::bigint = ac.id')
|
|
120
|
+
.where('m.stage_id::bigint = :stageId', { stageId: Number(stageId) })
|
|
118
121
|
.select([
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
122
|
+
'a.*',
|
|
123
|
+
'm.id AS mapping_id',
|
|
124
|
+
'm.stage_id AS stage_id',
|
|
125
|
+
'ac.code AS action_category_code',
|
|
123
126
|
])
|
|
124
|
-
.orderBy(
|
|
127
|
+
.orderBy('a.sequence', 'ASC')
|
|
125
128
|
.getRawMany();
|
|
126
129
|
const actionResourceMappingRepo = this.reflectionHelper.getRepoService('ActionResourcesMapping');
|
|
127
130
|
for (const item of result) {
|
|
128
131
|
if (item.action_category_code === 'SDFM') {
|
|
129
132
|
const actionData = await actionResourceMappingRepo.findOne({
|
|
130
133
|
where: {
|
|
131
|
-
stg_act_mapping_id: item.mapping_id
|
|
132
|
-
}
|
|
134
|
+
stg_act_mapping_id: item.mapping_id,
|
|
135
|
+
},
|
|
133
136
|
});
|
|
134
137
|
item.form_id = actionData?.form_id || null;
|
|
135
138
|
}
|
|
@@ -139,14 +142,21 @@ let StageMovementRepository = class StageMovementRepository {
|
|
|
139
142
|
async saveActionData(action, loggedInUser) {
|
|
140
143
|
if (action.length > 0) {
|
|
141
144
|
for (const act of action) {
|
|
142
|
-
await this.
|
|
145
|
+
await this.actionDataEntityRepository.save({
|
|
146
|
+
stage_id: act.stage_id,
|
|
147
|
+
user_id: loggedInUser.id,
|
|
148
|
+
action_id: act.id,
|
|
149
|
+
});
|
|
143
150
|
}
|
|
144
151
|
}
|
|
145
152
|
}
|
|
146
153
|
async saveTaskData(actionData, loggedInUser) {
|
|
147
154
|
if (actionData.length > 0) {
|
|
148
155
|
for (const action of actionData) {
|
|
149
|
-
await this.
|
|
156
|
+
await this.taskDataEntityRepository.save({
|
|
157
|
+
action_id: action.id,
|
|
158
|
+
user_id: String(loggedInUser.id),
|
|
159
|
+
});
|
|
150
160
|
}
|
|
151
161
|
}
|
|
152
162
|
}
|
|
@@ -157,10 +167,13 @@ exports.StageMovementRepository = StageMovementRepository = __decorate([
|
|
|
157
167
|
__param(0, (0, typeorm_1.InjectRepository)(workflow_level_mapping_entity_1.WorkflowLevelMappingEntity)),
|
|
158
168
|
__param(1, (0, typeorm_1.InjectRepository)(stage_group_entity_1.StageGroup)),
|
|
159
169
|
__param(2, (0, typeorm_1.InjectRepository)(stage_entity_1.Stage)),
|
|
170
|
+
__param(4, (0, typeorm_1.InjectRepository)(action_data_entity_1.ActionDataEntity)),
|
|
171
|
+
__param(5, (0, typeorm_1.InjectRepository)(task_data_entity_1.TaskDataEntity)),
|
|
160
172
|
__metadata("design:paramtypes", [typeorm_2.Repository,
|
|
161
173
|
typeorm_2.Repository,
|
|
162
174
|
typeorm_2.Repository,
|
|
163
|
-
|
|
164
|
-
|
|
175
|
+
reflection_helper_service_1.ReflectionHelper,
|
|
176
|
+
typeorm_2.Repository,
|
|
177
|
+
typeorm_2.Repository])
|
|
165
178
|
], StageMovementRepository);
|
|
166
179
|
//# sourceMappingURL=stage-movement.repository.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stage-movement.repository.js","sourceRoot":"","sources":["../../../../src/module/workflow/repository/stage-movement.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"stage-movement.repository.js","sourceRoot":"","sources":["../../../../src/module/workflow/repository/stage-movement.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,6CAAmD;AACnD,qCAA+C;AAC/C,2FAAqF;AACrF,qEAA0D;AAC1D,yDAA+C;AAE/C,gGAAoF;AACpF,qEAAgE;AAChE,iEAA4D;AAGrD,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAClC,YAEmB,wBAAgE,EAEhE,cAAsC,EAEtC,SAA4B,EAC5B,gBAAkC,EAElC,0BAAwD,EAExD,wBAAoD;QATpD,6BAAwB,GAAxB,wBAAwB,CAAwC;QAEhE,mBAAc,GAAd,cAAc,CAAwB;QAEtC,cAAS,GAAT,SAAS,CAAmB;QAC5B,qBAAgB,GAAhB,gBAAgB,CAAkB;QAElC,+BAA0B,GAA1B,0BAA0B,CAA8B;QAExD,6BAAwB,GAAxB,wBAAwB,CAA4B;IACpE,CAAC;IAEJ,KAAK,CAAC,aAAa,CAAC,EAClB,YAAY,EACZ,kBAAkB,EAClB,gBAAgB,GAKjB;QAEC,IAAI,oBAAoB,GAAG,MAAM,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAAC;YACrE,KAAK,EAAE;gBACL,iBAAiB,EAAE,YAAY,CAAC,UAAU;gBAC1C,eAAe,EAAE,YAAY,CAAC,QAAQ;aACvC;SACF,CAAC,CAAC;QAGH,IAAI,CAAC,oBAAoB,EAAE,CAAC;YAC1B,oBAAoB,GAAG,MAAM,I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1
1
|
import { BaseEntity } from 'src/module/meta/entity/base-entity.entity';
|
|
2
2
|
import { EntityServiceImpl } from 'src/module/meta/service/entity-service-impl.service';
|
|
3
3
|
import { UserData } from 'src/module/user/entity/user.entity';
|
|
4
|
-
import {
|
|
4
|
+
import { EntityManager, Repository } from 'typeorm';
|
|
5
5
|
import { ActionRepository } from '../repository/action.repository';
|
|
6
|
+
import { ActionResourcesMapping } from '../entity/action-resources-mapping.entity';
|
|
7
|
+
import { StageActionMapping } from '../entity/stage-action-mapping.entity';
|
|
8
|
+
import { ActionTemplateMapping } from '../entity/action-template-mapping.entity';
|
|
6
9
|
export declare class ActionService extends EntityServiceImpl {
|
|
7
|
-
private readonly dataSource;
|
|
8
10
|
private readonly actionRepository;
|
|
9
|
-
|
|
11
|
+
private readonly actionResourcesMappingRepository;
|
|
12
|
+
private readonly stageActionMappingRepository;
|
|
13
|
+
private readonly actionTemplateMappingRepository;
|
|
14
|
+
constructor(actionRepository: ActionRepository, actionResourcesMappingRepository: Repository<ActionResourcesMapping>, stageActionMappingRepository: Repository<StageActionMapping>, actionTemplateMappingRepository: Repository<ActionTemplateMapping>);
|
|
10
15
|
getEntityData(entityType: string, id: number, loggedInUser: any): Promise<any>;
|
|
11
16
|
createEntity(entityData: BaseEntity, loggedInUser: UserData | null, manager?: EntityManager | null, appcode?: string): Promise<any>;
|
|
12
17
|
updateEntity(entityData: BaseEntity, loggedInUser: UserData): Promise<any>;
|
|
13
18
|
deleteEntity(entityType: string, id: number, loggedInUser: UserData): Promise<any>;
|
|
14
19
|
getReasonCode(loggedInUser: UserData): Promise<any>;
|
|
15
|
-
defaultReasonCode(list_type: string, loggedInUser: UserData): Promise<
|
|
20
|
+
defaultReasonCode(list_type: string, loggedInUser: UserData): Promise<{
|
|
21
|
+
label: any;
|
|
22
|
+
value: any;
|
|
23
|
+
}[]>;
|
|
16
24
|
getActions(loggedInUser: UserData, stage_id: number): Promise<any[]>;
|
|
17
25
|
getDependentActions(loggedInUser: UserData, stage_id: number, action_id: number | undefined): Promise<any>;
|
|
18
26
|
getAction(loggedInUser: UserData, stage_id: number, mapped_entity_id: number, mapped_entity_type: string): Promise<{
|
|
@@ -25,7 +33,7 @@ export declare class ActionService extends EntityServiceImpl {
|
|
|
25
33
|
name: any;
|
|
26
34
|
reason_code: any;
|
|
27
35
|
default_reason_code: any;
|
|
28
|
-
is_default:
|
|
36
|
+
is_default: any;
|
|
29
37
|
is_current: any;
|
|
30
38
|
is_done: any;
|
|
31
39
|
is_mandatory: any;
|
|
@@ -8,30 +8,50 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
11
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
15
|
exports.ActionService = void 0;
|
|
13
16
|
const common_1 = require("@nestjs/common");
|
|
14
17
|
const entity_service_impl_service_1 = require("../../meta/service/entity-service-impl.service");
|
|
15
18
|
const typeorm_1 = require("typeorm");
|
|
16
19
|
const action_repository_1 = require("../repository/action.repository");
|
|
20
|
+
const action_resources_mapping_entity_1 = require("../entity/action-resources-mapping.entity");
|
|
21
|
+
const typeorm_2 = require("@nestjs/typeorm");
|
|
22
|
+
const stage_action_mapping_entity_1 = require("../entity/stage-action-mapping.entity");
|
|
23
|
+
const action_template_mapping_entity_1 = require("../entity/action-template-mapping.entity");
|
|
17
24
|
let ActionService = class ActionService extends entity_service_impl_service_1.EntityServiceImpl {
|
|
18
|
-
constructor(
|
|
25
|
+
constructor(actionRepository, actionResourcesMappingRepository, stageActionMappingRepository, actionTemplateMappingRepository) {
|
|
19
26
|
super();
|
|
20
|
-
this.dataSource = dataSource;
|
|
21
27
|
this.actionRepository = actionRepository;
|
|
28
|
+
this.actionResourcesMappingRepository = actionResourcesMappingRepository;
|
|
29
|
+
this.stageActionMappingRepository = stageActionMappingRepository;
|
|
30
|
+
this.actionTemplateMappingRepository = actionTemplateMappingRepository;
|
|
22
31
|
}
|
|
23
32
|
async getEntityData(entityType, id, loggedInUser) {
|
|
24
33
|
const actionData = await super.getEntityData(entityType, id, loggedInUser);
|
|
25
34
|
if (!actionData) {
|
|
26
35
|
return null;
|
|
27
36
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
37
|
+
let actionResourceMappingRepo = this.reflectionHelper.getRepoService('ActionResourcesMapping');
|
|
38
|
+
await actionResourceMappingRepo.find({
|
|
39
|
+
where: {},
|
|
40
|
+
});
|
|
41
|
+
const result = await actionResourceMappingRepo
|
|
42
|
+
.createQueryBuilder('arm')
|
|
43
|
+
.select([
|
|
44
|
+
'arm.template_code AS template_code',
|
|
45
|
+
'arm.form_id AS form_id',
|
|
46
|
+
])
|
|
47
|
+
.where(`arm.stg_act_mapping_id IN (
|
|
48
|
+
SELECT sam.id
|
|
49
|
+
FROM frm_wf_stage_action_mapping sam
|
|
50
|
+
WHERE sam.action_id = :actionId
|
|
51
|
+
AND sam.entity_type = 'WFSA'
|
|
52
|
+
)`)
|
|
53
|
+
.setParameter('actionId', actionData.id)
|
|
54
|
+
.getRawMany();
|
|
35
55
|
const templates = result
|
|
36
56
|
.filter((t) => t.template_code !== null)
|
|
37
57
|
.map((t) => t.template_code);
|
|
@@ -69,7 +89,10 @@ let ActionService = class ActionService extends entity_service_impl_service_1.En
|
|
|
69
89
|
await super.createEntity(resourceMapping, loggedInUser);
|
|
70
90
|
}
|
|
71
91
|
}
|
|
72
|
-
await this.
|
|
92
|
+
await this.actionResourcesMappingRepository.delete({
|
|
93
|
+
stg_act_mapping_id: stageActionMappingData.id,
|
|
94
|
+
type: 'form',
|
|
95
|
+
});
|
|
73
96
|
if (actionData.form) {
|
|
74
97
|
const resourceMapping = {
|
|
75
98
|
stg_act_mapping_id: stageActionMappingData.id,
|
|
@@ -89,11 +112,16 @@ let ActionService = class ActionService extends entity_service_impl_service_1.En
|
|
|
89
112
|
if (!action) {
|
|
90
113
|
throw new Error('Action not found or could not be updated');
|
|
91
114
|
}
|
|
92
|
-
const
|
|
115
|
+
const stageMap = await this.stageActionMappingRepository.findOne({
|
|
116
|
+
where: {
|
|
117
|
+
action_id: action.id,
|
|
118
|
+
entity_type: 'WFSA',
|
|
119
|
+
},
|
|
120
|
+
});
|
|
93
121
|
let stageActionMappingData;
|
|
94
|
-
if (
|
|
122
|
+
if (stageMap) {
|
|
95
123
|
const stageActionMapping = {
|
|
96
|
-
id:
|
|
124
|
+
id: stageMap.id,
|
|
97
125
|
action_id: action.id,
|
|
98
126
|
stage_id,
|
|
99
127
|
entity_type: 'WFSA',
|
|
@@ -109,7 +137,10 @@ let ActionService = class ActionService extends entity_service_impl_service_1.En
|
|
|
109
137
|
};
|
|
110
138
|
stageActionMappingData = await super.createEntity(newStageMapping, loggedInUser);
|
|
111
139
|
}
|
|
112
|
-
await this.
|
|
140
|
+
await this.actionResourcesMappingRepository.delete({
|
|
141
|
+
stg_act_mapping_id: stageActionMappingData.id,
|
|
142
|
+
type: 'template',
|
|
143
|
+
});
|
|
113
144
|
if (Array.isArray(template) && template.length > 0) {
|
|
114
145
|
for (let i = 0; i < template.length; i++) {
|
|
115
146
|
const templateCode = template[i];
|
|
@@ -123,7 +154,10 @@ let ActionService = class ActionService extends entity_service_impl_service_1.En
|
|
|
123
154
|
console.log(res);
|
|
124
155
|
}
|
|
125
156
|
}
|
|
126
|
-
await this.
|
|
157
|
+
await this.actionResourcesMappingRepository.delete({
|
|
158
|
+
stg_act_mapping_id: stageActionMappingData.id,
|
|
159
|
+
type: 'form',
|
|
160
|
+
});
|
|
127
161
|
if (form) {
|
|
128
162
|
const resourceMapping = {
|
|
129
163
|
stg_act_mapping_id: stageActionMappingData.id,
|
|
@@ -136,9 +170,21 @@ let ActionService = class ActionService extends entity_service_impl_service_1.En
|
|
|
136
170
|
return action;
|
|
137
171
|
}
|
|
138
172
|
async deleteEntity(entityType, id, loggedInUser) {
|
|
139
|
-
await this.
|
|
140
|
-
|
|
141
|
-
|
|
173
|
+
await this.actionTemplateMappingRepository
|
|
174
|
+
.createQueryBuilder()
|
|
175
|
+
.delete()
|
|
176
|
+
.where(`stg_act_mapping_id IN (
|
|
177
|
+
SELECT sam.id
|
|
178
|
+
FROM frm_wf_stage_action_mapping sam
|
|
179
|
+
WHERE sam.action_id = :actionId
|
|
180
|
+
AND sam.entity_type = 'WFSA'
|
|
181
|
+
)`)
|
|
182
|
+
.setParameter('actionId', id)
|
|
183
|
+
.execute();
|
|
184
|
+
await this.stageActionMappingRepository.delete({
|
|
185
|
+
action_id: id,
|
|
186
|
+
entity_type: 'WFSA',
|
|
187
|
+
});
|
|
142
188
|
const deleteAction = await super.deleteEntity(entityType, id, loggedInUser);
|
|
143
189
|
return deleteAction;
|
|
144
190
|
}
|
|
@@ -162,7 +208,12 @@ let ActionService = class ActionService extends entity_service_impl_service_1.En
|
|
|
162
208
|
exports.ActionService = ActionService;
|
|
163
209
|
exports.ActionService = ActionService = __decorate([
|
|
164
210
|
(0, common_1.Injectable)(),
|
|
165
|
-
|
|
166
|
-
|
|
211
|
+
__param(1, (0, typeorm_2.InjectRepository)(action_resources_mapping_entity_1.ActionResourcesMapping)),
|
|
212
|
+
__param(2, (0, typeorm_2.InjectRepository)(stage_action_mapping_entity_1.StageActionMapping)),
|
|
213
|
+
__param(3, (0, typeorm_2.InjectRepository)(action_template_mapping_entity_1.ActionTemplateMapping)),
|
|
214
|
+
__metadata("design:paramtypes", [action_repository_1.ActionRepository,
|
|
215
|
+
typeorm_1.Repository,
|
|
216
|
+
typeorm_1.Repository,
|
|
217
|
+
typeorm_1.Repository])
|
|
167
218
|
], ActionService);
|
|
168
219
|
//# sourceMappingURL=action.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action.service.js","sourceRoot":"","sources":["../../../../src/module/workflow/service/action.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"action.service.js","sourceRoot":"","sources":["../../../../src/module/workflow/service/action.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAE5C,gGAAwF;AAExF,qCAAoD;AACpD,uEAAmE;AAEnE,+FAAmF;AACnF,6CAAmD;AACnD,uFAA2E;AAC3E,6FAAiF;AAG1E,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,+CAAiB;IAClD,YACmB,gBAAkC,EAElC,gCAAoE,EAEpE,4BAA4D,EAE5D,+BAAkE;QAEnF,KAAK,EAAE,CAAC;QARS,qBAAgB,GAAhB,gBAAgB,CAAkB;QAElC,qCAAgC,GAAhC,gCAAgC,CAAoC;QAEpE,iCAA4B,GAA5B,4BAA4B,CAAgC;QAE5D,oCAA+B,GAA/B,+BAA+B,CAAmC;IAGrF,CAAC;IAED,KAAK,CAAC,aAAa,CACjB,UAAkB,EAClB,EAAU,EACV,YAAY;QAEZ,MAAM,UAAU,GAAG,MAAM,KAAK,CAAC,aAAa,CAAC,UAAU,EAAE,EAAE,EAAE,YAAY,CAAC,CAAC;QAE3E,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,OAAO,IAAI,CAAC;QACd,CAAC;QAED,IAAI,yBAAyB,GAAG,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,wBAAwB,CAAC,CAAC;QAC/F,MAAM,yBAAyB,CAAC,IAAI,CAAC;YACnC,KAAK,EAAE,EAAE;SACV,CAAC,CAAC;QAEH,MAAM,MAAM,GAAG,MAAM,yBAAyB;aAC3C,kBAAkB,CAAC,KAAK,CAAC;aACzB,MAAM,CAAC;YACN,oCAAoC;YACpC,wBAAwB;SACzB,CAAC;aACD,KAAK,CAAC;;;;;QAKL,CAAC;aACF,YAAY,CAAC,UAAU,EAAE,UAAU,CAA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gB,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;IAC3D,CAAC;IAED,KAAK,CAAC,iBAAiB,CAAC,SAAiB,EAAE,YAAsB;QAC/D,OAAO,IAAI,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;IAC1E,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,YAAsB,EAAE,QAAgB;QACvD,OAAO,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;IAClE,CAAC;IAED,KAAK,CAAC,mBAAmB,CACvB,YAAsB,EACtB,QAAgB,EAChB,SAA6B;QAE7B,OAAO,IAAI,CAAC,gBAAgB,CAAC,mBAAmB,CAC9C,YAAY,EACZ,QAAQ,EACR,SAAS,CACV,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,SAAS,CACb,YAAsB,EACtB,QAAgB,EAChB,gBAAwB,EACxB,kBAA0B;QAE1B,MAAM,EAAE,eAAe,EAAE,GAAG,YAAY,CAAC;QACzC,OAAO,IAAI,CAAC,gBAAgB,CAAC,SAAS,CACpC,eAAe,EACf,QAAQ,EACR,gBAAgB,EAChB,kBAAkB,CACnB,CAAC;IACJ,CAAC;CACF,CAAA;AApSY,sCAAa;wBAAb,aAAa;IADzB,IAAA,mBAAU,GAAE;IAIR,WAAA,IAAA,0BAAgB,EAAC,wDAAsB,CAAC,CAAA;IAExC,WAAA,IAAA,0BAAgB,EAAC,gDAAkB,CAAC,CAAA;IAEpC,WAAA,IAAA,0BAAgB,EAAC,sDAAqB,CAAC,CAAA;qCALL,oCAAgB;QAEA,oBAAU;QAEd,oBAAU;QAEP,oBAAU;GARnD,aAAa,CAoSzB"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { EntityServiceImpl } from 'src/module/meta/service/entity-service-impl.service';
|
|
2
2
|
import { UserData } from 'src/module/user/entity/user.entity';
|
|
3
|
-
import {
|
|
3
|
+
import { EntityManager } from 'typeorm';
|
|
4
4
|
export declare class EntityModificationService extends EntityServiceImpl {
|
|
5
|
-
private readonly
|
|
6
|
-
constructor(
|
|
5
|
+
private readonly entityManager;
|
|
6
|
+
constructor(entityManager: EntityManager);
|
|
7
7
|
logModification(modificationData: any, loggedInUser: UserData): Promise<any>;
|
|
8
8
|
}
|
|
@@ -14,9 +14,9 @@ const common_1 = require("@nestjs/common");
|
|
|
14
14
|
const entity_service_impl_service_1 = require("../../meta/service/entity-service-impl.service");
|
|
15
15
|
const typeorm_1 = require("typeorm");
|
|
16
16
|
let EntityModificationService = class EntityModificationService extends entity_service_impl_service_1.EntityServiceImpl {
|
|
17
|
-
constructor(
|
|
17
|
+
constructor(entityManager) {
|
|
18
18
|
super();
|
|
19
|
-
this.
|
|
19
|
+
this.entityManager = entityManager;
|
|
20
20
|
}
|
|
21
21
|
async logModification(modificationData, loggedInUser) {
|
|
22
22
|
const { mapped_entity_type, mapped_entity_id, attribute_key } = modificationData;
|
|
@@ -29,7 +29,7 @@ let EntityModificationService = class EntityModificationService extends entity_s
|
|
|
29
29
|
throw new common_1.NotFoundException('Entity metadata not found in frm_entity_master');
|
|
30
30
|
}
|
|
31
31
|
const tableName = entityMeta.db_table_name;
|
|
32
|
-
const [entityRow] = await this.
|
|
32
|
+
const [entityRow] = await this.entityManager.query(`
|
|
33
33
|
SELECT * FROM ${tableName} WHERE id = $1
|
|
34
34
|
`, [mapped_entity_id]);
|
|
35
35
|
if (!entityRow) {
|
|
@@ -43,6 +43,6 @@ let EntityModificationService = class EntityModificationService extends entity_s
|
|
|
43
43
|
exports.EntityModificationService = EntityModificationService;
|
|
44
44
|
exports.EntityModificationService = EntityModificationService = __decorate([
|
|
45
45
|
(0, common_1.Injectable)(),
|
|
46
|
-
__metadata("design:paramtypes", [typeorm_1.
|
|
46
|
+
__metadata("design:paramtypes", [typeorm_1.EntityManager])
|
|
47
47
|
], EntityModificationService);
|
|
48
48
|
//# sourceMappingURL=entity-modification.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-modification.service.js","sourceRoot":"","sources":["../../../../src/module/workflow/service/entity-modification.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAIwB;AACxB,gGAAwF;AAExF,
|
|
1
|
+
{"version":3,"file":"entity-modification.service.js","sourceRoot":"","sources":["../../../../src/module/workflow/service/entity-modification.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAIwB;AACxB,gGAAwF;AAExF,qCAAoD;AAI7C,IAAM,yBAAyB,GAA/B,MAAM,yBAA0B,SAAQ,+CAAiB;IAC9D,YAA6B,aAA4B;QAEvD,KAAK,EAAE,CAAC;QAFmB,kBAAa,GAAb,aAAa,CAAe;IAGzD,CAAC;IACD,KAAK,CAAC,eAAe,CAAC,gBAAqB,EAAE,YAAsB;QACjE,MAAM,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,aAAa,EAAE,GAC3D,gBAAgB,CAAC;QACnB,MAAM,EAAE,eAAe,EAAE,GAAG,YAAY,CAAC;QAEzC,IAAI,CAAC,kBAAkB,IAAI,CAAC,gBAAgB,IAAI,CAAC,aAAa,EAAE,CAAC;YAC/D,MAAM,IAAI,4BAAmB,CAC3B,4FAA4F,CAC7F,CAAC;QACJ,CAAC;QAED,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,aAAa,CAAC,kBAAkB,EAAE,YAAY,CAAC,CAAC;QAElG,IAAI,CAAC,UAAU,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,CAAC;YAC7C,MAAM,IAAI,0BAAiB,CACzB,gDAAgD,CACjD,CAAC;QACJ,CAAC;QAED,MAAM,SAAS,GAAG,UAAU,CAAC,aAAa,CAAC;QAG3C,MAAM,CAAC,SAAS,CAAC,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,KAAK,CAChD;oBACc,SAAS;KACxB,EACC,CAAC,gBAAgB,CAAC,CACnB,CAAC;QAEF,IAAI,CAAC,SAAS,EAAE,CAAC;YACf,MAAM,IAAI,0BAAiB,CACzB,sBAAsB,SAAS,YAAY,gBAAgB,EAAE,CAC9D,CAAC;QACJ,CAAC;QAGD,MAAM,qBAAqB,GAAG,SAAS,CAAC,aAAa,CAAC,CAAC;QAGvD,gBAAgB,CAAC,aAAa,GAAG,qBAAqB,CAAC;QAGvD,OAAO,MAAM,KAAK,CAAC,YAAY,CAAC,gBAAgB,EAAE,YAAY,CAAC,CAAC;IAClE,CAAC;CACF,CAAA;AAjDY,8DAAyB;oCAAzB,yBAAyB;IADrC,IAAA,mBAAU,GAAE;qCAEiC,uBAAa;GAD9C,yBAAyB,CAiDrC"}
|
|
@@ -4,7 +4,10 @@ import { EntityServiceImpl } from 'src/module/meta/service/entity-service-impl.s
|
|
|
4
4
|
export declare class FormMasterService extends EntityServiceImpl {
|
|
5
5
|
private readonly formMasterRepository;
|
|
6
6
|
constructor(formMasterRepository: FormMasterRepository);
|
|
7
|
-
getForms(loggedInUser: UserData, source_entity_type: string): Promise<
|
|
7
|
+
getForms(loggedInUser: UserData, source_entity_type: string): Promise<{
|
|
8
|
+
label: any;
|
|
9
|
+
value: any;
|
|
10
|
+
}[]>;
|
|
8
11
|
saveForm(data: {
|
|
9
12
|
entity_id: number;
|
|
10
13
|
entity_type: string;
|
|
@@ -3,24 +3,19 @@ import { StageGroupRepository } from '../repository/stage-group.repository';
|
|
|
3
3
|
import { BaseEntity } from 'src/module/meta/entity/base-entity.entity';
|
|
4
4
|
import { UserData } from 'src/module/user/entity/user.entity';
|
|
5
5
|
import { StageService } from './stage.service';
|
|
6
|
-
import {
|
|
7
|
-
import { WorkflowLevelMappingEntity } from '../entity/workflow-level-mapping.entity';
|
|
6
|
+
import { Repository } from 'typeorm';
|
|
8
7
|
import { StageMovementData } from '../entity/stage-movement-data.entity';
|
|
9
|
-
import { MediaDataService } from 'src/module/meta/service/media-data.service';
|
|
10
8
|
import { ConfigService } from '@nestjs/config';
|
|
11
9
|
import { ListMasterData } from 'src/module/listmaster/entity/list-master.entity';
|
|
12
10
|
import { StageGroup } from '../entity/stage-group.entity';
|
|
13
11
|
export declare class StageGroupService extends EntityServiceImpl {
|
|
14
12
|
private readonly stageGroupRepository;
|
|
15
13
|
private readonly stageService;
|
|
16
|
-
private readonly dataSource;
|
|
17
|
-
private readonly workflowLevelMappingRepo;
|
|
18
14
|
private readonly stageMovementRepo;
|
|
19
|
-
private readonly mediaDataService;
|
|
20
15
|
private readonly configService;
|
|
21
16
|
private readonly listMasterRepo;
|
|
22
17
|
private readonly stageGroupRepo;
|
|
23
|
-
constructor(stageGroupRepository: StageGroupRepository, stageService: StageService,
|
|
18
|
+
constructor(stageGroupRepository: StageGroupRepository, stageService: StageService, stageMovementRepo: Repository<StageMovementData>, configService: ConfigService, listMasterRepo: Repository<ListMasterData>, stageGroupRepo: Repository<StageGroup>);
|
|
24
19
|
getAllStageGroup(workflow_id: number, organization_id: number): Promise<StageGroup[]>;
|
|
25
20
|
getAllStageGroupAndStageHierarchy(loggedInUser: UserData, lead_id: number): Promise<{
|
|
26
21
|
[key: string]: any;
|
|
@@ -18,33 +18,32 @@ const entity_service_impl_service_1 = require("../../meta/service/entity-service
|
|
|
18
18
|
const stage_group_repository_1 = require("../repository/stage-group.repository");
|
|
19
19
|
const stage_service_1 = require("./stage.service");
|
|
20
20
|
const typeorm_1 = require("typeorm");
|
|
21
|
-
const workflow_level_mapping_entity_1 = require("../entity/workflow-level-mapping.entity");
|
|
22
21
|
const typeorm_2 = require("@nestjs/typeorm");
|
|
23
22
|
const stage_movement_data_entity_1 = require("../entity/stage-movement-data.entity");
|
|
24
23
|
const moment = require("moment");
|
|
25
|
-
const media_data_service_1 = require("../../meta/service/media-data.service");
|
|
26
24
|
const axios_1 = require("axios");
|
|
27
25
|
const config_1 = require("@nestjs/config");
|
|
28
26
|
const list_master_entity_1 = require("../../listmaster/entity/list-master.entity");
|
|
29
27
|
const stage_group_entity_1 = require("../entity/stage-group.entity");
|
|
30
28
|
let StageGroupService = class StageGroupService extends entity_service_impl_service_1.EntityServiceImpl {
|
|
31
|
-
constructor(stageGroupRepository, stageService,
|
|
29
|
+
constructor(stageGroupRepository, stageService, stageMovementRepo, configService, listMasterRepo, stageGroupRepo) {
|
|
32
30
|
super();
|
|
33
31
|
this.stageGroupRepository = stageGroupRepository;
|
|
34
32
|
this.stageService = stageService;
|
|
35
|
-
this.dataSource = dataSource;
|
|
36
|
-
this.workflowLevelMappingRepo = workflowLevelMappingRepo;
|
|
37
33
|
this.stageMovementRepo = stageMovementRepo;
|
|
38
|
-
this.mediaDataService = mediaDataService;
|
|
39
34
|
this.configService = configService;
|
|
40
35
|
this.listMasterRepo = listMasterRepo;
|
|
41
36
|
this.stageGroupRepo = stageGroupRepo;
|
|
42
37
|
}
|
|
43
38
|
async getAllStageGroup(workflow_id, organization_id) {
|
|
44
39
|
const allStageGroup = await this.stageGroupRepository.getAllStageGroup(workflow_id, organization_id);
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
40
|
+
const listMasterItemsRepo = this.reflectionHelper.getRepoService('ListMasterItems');
|
|
41
|
+
const statusListMaster = await listMasterItemsRepo.find({
|
|
42
|
+
where: {
|
|
43
|
+
listtype: 'STS',
|
|
44
|
+
organization_id,
|
|
45
|
+
},
|
|
46
|
+
});
|
|
48
47
|
const statusMap = new Map(statusListMaster.map((s) => [String(s.id), s.name]));
|
|
49
48
|
for (const stage of allStageGroup) {
|
|
50
49
|
stage.status = statusMap.get(String(stage.status));
|
|
@@ -205,7 +204,14 @@ let StageGroupService = class StageGroupService extends entity_service_impl_serv
|
|
|
205
204
|
return await super.getEntityData(entityType, id, loggedInUser);
|
|
206
205
|
}
|
|
207
206
|
async deleteEntity(entityType, id, loggedInUser) {
|
|
208
|
-
const
|
|
207
|
+
const stageRepo = this.reflectionHelper.getRepoService('Stage');
|
|
208
|
+
const getAllStage = await stageRepo.find({
|
|
209
|
+
where: {
|
|
210
|
+
stage_group_id: id,
|
|
211
|
+
level_id: loggedInUser.level_id,
|
|
212
|
+
level_type: loggedInUser.level_type,
|
|
213
|
+
},
|
|
214
|
+
});
|
|
209
215
|
if (getAllStage.length > 0) {
|
|
210
216
|
for (const stage of getAllStage) {
|
|
211
217
|
await this.stageService.deleteEntity('WFS', stage.id, loggedInUser);
|
|
@@ -219,16 +225,12 @@ exports.StageGroupService = StageGroupService;
|
|
|
219
225
|
exports.StageGroupService = StageGroupService = __decorate([
|
|
220
226
|
(0, common_1.Injectable)(),
|
|
221
227
|
__param(1, (0, common_1.Inject)('StageService')),
|
|
222
|
-
__param(
|
|
223
|
-
__param(4, (0, typeorm_2.InjectRepository)(
|
|
224
|
-
__param(
|
|
225
|
-
__param(8, (0, typeorm_2.InjectRepository)(stage_group_entity_1.StageGroup)),
|
|
228
|
+
__param(2, (0, typeorm_2.InjectRepository)(stage_movement_data_entity_1.StageMovementData)),
|
|
229
|
+
__param(4, (0, typeorm_2.InjectRepository)(list_master_entity_1.ListMasterData)),
|
|
230
|
+
__param(5, (0, typeorm_2.InjectRepository)(stage_group_entity_1.StageGroup)),
|
|
226
231
|
__metadata("design:paramtypes", [stage_group_repository_1.StageGroupRepository,
|
|
227
232
|
stage_service_1.StageService,
|
|
228
|
-
typeorm_1.DataSource,
|
|
229
|
-
typeorm_1.Repository,
|
|
230
233
|
typeorm_1.Repository,
|
|
231
|
-
media_data_service_1.MediaDataService,
|
|
232
234
|
config_1.ConfigService,
|
|
233
235
|
typeorm_1.Repository,
|
|
234
236
|
typeorm_1.Repository])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stage-group.service.js","sourceRoot":"","sources":["../../../../src/module/workflow/service/stage-group.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"stage-group.service.js","sourceRoot":"","sources":["../../../../src/module/workflow/service/stage-group.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAyE;AACzE,gGAAwF;AACxF,iFAA4E;AAG5E,mDAA+C;AAC/C,qCAAqC;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IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,EAAE,YAAY,CAAC,CAAC;YACtE,CAAC;QACH,CAAC;QAED,MAAM,gBAAgB,GAAG,MAAM,KAAK,CAAC,YAAY,CAC/C,UAAU,EACV,EAAE,EACF,YAAY,CACb,CAAC;QAEF,OAAO,gBAAgB,CAAC;IAC1B,CAAC;CACF,CAAA;AAvUY,8CAAiB;4BAAjB,iBAAiB;IAD7B,IAAA,mBAAU,GAAE;IAIR,WAAA,IAAA,eAAM,EAAC,cAAc,CAAC,CAAA;IAEtB,WAAA,IAAA,0BAAgB,EAAC,8CAAiB,CAAC,CAAA;IAGnC,WAAA,IAAA,0BAAgB,EAAC,mCAAc,CAAC,CAAA;IAEhC,WAAA,IAAA,0BAAgB,EAAC,+BAAU,CAAC,CAAA;qCARU,6CAAoB;QAE5B,4BAAY;QAEP,oBAAU;QACd,sBAAa;QAEZ,oBAAU;QAEV,oBAAU;GAXlC,iBAAiB,CAuU7B"}
|
|
@@ -3,17 +3,16 @@ import { EntityServiceImpl } from 'src/module/meta/service/entity-service-impl.s
|
|
|
3
3
|
import { BaseEntity } from 'src/module/meta/entity/base-entity.entity';
|
|
4
4
|
import { UserData } from 'src/module/user/entity/user.entity';
|
|
5
5
|
import { StageRepository } from '../repository/stage.repository';
|
|
6
|
-
import {
|
|
6
|
+
import { Repository } from 'typeorm';
|
|
7
7
|
import { StageGroupRepository } from '../repository/stage-group.repository';
|
|
8
8
|
import { StageMovementData } from '../entity/stage-movement-data.entity';
|
|
9
9
|
export declare class StageService extends EntityServiceImpl {
|
|
10
10
|
private readonly stageRepository;
|
|
11
11
|
private readonly stageGroupRepository;
|
|
12
12
|
private readonly stageMovementRepo;
|
|
13
|
-
private readonly dataSource;
|
|
14
13
|
private readonly actionService;
|
|
15
14
|
private readonly logger;
|
|
16
|
-
constructor(stageRepository: StageRepository, stageGroupRepository: StageGroupRepository, stageMovementRepo: Repository<StageMovementData>,
|
|
15
|
+
constructor(stageRepository: StageRepository, stageGroupRepository: StageGroupRepository, stageMovementRepo: Repository<StageMovementData>, actionService: ActionService);
|
|
17
16
|
getAllStage(payload: {
|
|
18
17
|
stage_group_id: number;
|
|
19
18
|
mapped_entity_id: number;
|