rez_core 2.2.23 → 2.2.24
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/workflow/controller/stage-group.controller.js +2 -2
- package/dist/module/workflow/controller/stage-group.controller.js.map +1 -1
- package/dist/module/workflow/controller/stage.controller.js +4 -4
- package/dist/module/workflow/controller/stage.controller.js.map +1 -1
- package/dist/module/workflow/repository/stage-group.repository.d.ts +1 -1
- package/dist/module/workflow/repository/stage-group.repository.js +2 -3
- package/dist/module/workflow/repository/stage-group.repository.js.map +1 -1
- package/dist/module/workflow/repository/stage.repository.d.ts +1 -1
- package/dist/module/workflow/repository/stage.repository.js +3 -4
- package/dist/module/workflow/repository/stage.repository.js.map +1 -1
- package/dist/module/workflow/service/stage-group.service.d.ts +1 -1
- package/dist/module/workflow/service/stage-group.service.js +2 -2
- package/dist/module/workflow/service/stage-group.service.js.map +1 -1
- package/dist/module/workflow/service/stage.service.d.ts +2 -2
- package/dist/module/workflow/service/stage.service.js +5 -5
- package/dist/module/workflow/service/stage.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/module/workflow/controller/stage-group.controller.ts +2 -3
- package/src/module/workflow/controller/stage.controller.ts +4 -6
- package/src/module/workflow/repository/stage-group.repository.ts +2 -7
- package/src/module/workflow/repository/stage.repository.ts +3 -10
- package/src/module/workflow/service/stage-group.service.ts +2 -7
- package/src/module/workflow/service/stage.service.ts +5 -16
package/package.json
CHANGED
|
@@ -23,11 +23,10 @@ export class StageGroupController {
|
|
|
23
23
|
@Req() req: Request & { user: any },
|
|
24
24
|
@Body() body: { workflow_id: number },
|
|
25
25
|
) {
|
|
26
|
-
const {
|
|
26
|
+
const { organization_id } = req.user.userData;
|
|
27
27
|
return this.stageGroupService.getAllStageGroup(
|
|
28
28
|
body.workflow_id,
|
|
29
|
-
|
|
30
|
-
level_type,
|
|
29
|
+
organization_id,
|
|
31
30
|
);
|
|
32
31
|
}
|
|
33
32
|
}
|
|
@@ -26,11 +26,10 @@ export class StageController {
|
|
|
26
26
|
@Req() req: Request & { user: any },
|
|
27
27
|
@Body() body: { stage_group_id: number },
|
|
28
28
|
) {
|
|
29
|
-
const {
|
|
29
|
+
const { organization_id } = req.user.userData;
|
|
30
30
|
return this.stageGroupService.getAllStage(
|
|
31
31
|
body.stage_group_id,
|
|
32
|
-
|
|
33
|
-
level_type,
|
|
32
|
+
organization_id,
|
|
34
33
|
);
|
|
35
34
|
}
|
|
36
35
|
|
|
@@ -40,11 +39,10 @@ export class StageController {
|
|
|
40
39
|
@Body('workflow_id') workflow_id: number,
|
|
41
40
|
@Req() req: Request & { user: any },
|
|
42
41
|
) {
|
|
43
|
-
const {
|
|
42
|
+
const { organization_id } = req.user.userData;
|
|
44
43
|
return this.stageGroupService.getStagesWithGroupName(
|
|
45
44
|
workflow_id,
|
|
46
|
-
|
|
47
|
-
level_type,
|
|
45
|
+
organization_id,
|
|
48
46
|
);
|
|
49
47
|
}
|
|
50
48
|
}
|
|
@@ -15,11 +15,7 @@ export class StageGroupRepository {
|
|
|
15
15
|
private readonly stageGroupRepository: Repository<StageGroup>,
|
|
16
16
|
) {}
|
|
17
17
|
|
|
18
|
-
async getAllStageGroup(
|
|
19
|
-
workflow_id: number,
|
|
20
|
-
level_id: string,
|
|
21
|
-
level_type: string,
|
|
22
|
-
) {
|
|
18
|
+
async getAllStageGroup(workflow_id: number, organization_id: number) {
|
|
23
19
|
if (!workflow_id) {
|
|
24
20
|
throw new BadRequestException('workflow_id is required');
|
|
25
21
|
}
|
|
@@ -27,8 +23,7 @@ export class StageGroupRepository {
|
|
|
27
23
|
const result = await this.stageGroupRepository.find({
|
|
28
24
|
where: {
|
|
29
25
|
workflow_id,
|
|
30
|
-
|
|
31
|
-
level_type,
|
|
26
|
+
organization_id,
|
|
32
27
|
},
|
|
33
28
|
order: {
|
|
34
29
|
sequence: 'ASC',
|
|
@@ -16,11 +16,7 @@ export class StageRepository {
|
|
|
16
16
|
private readonly stageRepository: Repository<Stage>,
|
|
17
17
|
) {}
|
|
18
18
|
|
|
19
|
-
async getAllStage(
|
|
20
|
-
stage_group_id: number,
|
|
21
|
-
level_id: string,
|
|
22
|
-
level_type: string,
|
|
23
|
-
) {
|
|
19
|
+
async getAllStage(stage_group_id: number, organization_id: number) {
|
|
24
20
|
if (!stage_group_id) {
|
|
25
21
|
throw new BadRequestException('stage_group_id is required');
|
|
26
22
|
}
|
|
@@ -28,8 +24,7 @@ export class StageRepository {
|
|
|
28
24
|
const result = await this.stageRepository.find({
|
|
29
25
|
where: {
|
|
30
26
|
stage_group_id,
|
|
31
|
-
|
|
32
|
-
level_type,
|
|
27
|
+
organization_id,
|
|
33
28
|
},
|
|
34
29
|
order: {
|
|
35
30
|
sequence: 'ASC',
|
|
@@ -37,9 +32,7 @@ export class StageRepository {
|
|
|
37
32
|
});
|
|
38
33
|
|
|
39
34
|
if (!result || result.length === 0) {
|
|
40
|
-
|
|
41
|
-
'No stage found for the given stage group ID',
|
|
42
|
-
);
|
|
35
|
+
return [];
|
|
43
36
|
}
|
|
44
37
|
|
|
45
38
|
return result;
|
|
@@ -16,15 +16,10 @@ export class StageGroupService extends EntityServiceImpl {
|
|
|
16
16
|
) {
|
|
17
17
|
super();
|
|
18
18
|
}
|
|
19
|
-
async getAllStageGroup(
|
|
20
|
-
workflow_id: number,
|
|
21
|
-
level_id: string,
|
|
22
|
-
level_type: string,
|
|
23
|
-
) {
|
|
19
|
+
async getAllStageGroup(workflow_id: number, organization_id: number) {
|
|
24
20
|
return await this.stageGroupRepository.getAllStageGroup(
|
|
25
21
|
workflow_id,
|
|
26
|
-
|
|
27
|
-
level_type,
|
|
22
|
+
organization_id,
|
|
28
23
|
);
|
|
29
24
|
}
|
|
30
25
|
|
|
@@ -23,15 +23,10 @@ export class StageService extends EntityServiceImpl {
|
|
|
23
23
|
) {
|
|
24
24
|
super();
|
|
25
25
|
}
|
|
26
|
-
async getAllStage(
|
|
27
|
-
stage_group_id: number,
|
|
28
|
-
level_id: string,
|
|
29
|
-
level_type: string,
|
|
30
|
-
) {
|
|
26
|
+
async getAllStage(stage_group_id: number, organization_id: number) {
|
|
31
27
|
return await this.stageRepository.getAllStage(
|
|
32
28
|
stage_group_id,
|
|
33
|
-
|
|
34
|
-
level_type,
|
|
29
|
+
organization_id,
|
|
35
30
|
);
|
|
36
31
|
}
|
|
37
32
|
|
|
@@ -75,19 +70,14 @@ export class StageService extends EntityServiceImpl {
|
|
|
75
70
|
return deleteStage;
|
|
76
71
|
}
|
|
77
72
|
|
|
78
|
-
async getStagesWithGroupName(
|
|
79
|
-
workflow_id: number,
|
|
80
|
-
level_id: string,
|
|
81
|
-
level_type: string,
|
|
82
|
-
) {
|
|
73
|
+
async getStagesWithGroupName(workflow_id: number, organization_id: number) {
|
|
83
74
|
if (!workflow_id) {
|
|
84
75
|
throw new BadRequestException('workflow_id is required');
|
|
85
76
|
}
|
|
86
77
|
|
|
87
78
|
const stageGroups = await this.stageGroupRepository.getAllStageGroup(
|
|
88
79
|
workflow_id,
|
|
89
|
-
|
|
90
|
-
level_type,
|
|
80
|
+
organization_id,
|
|
91
81
|
);
|
|
92
82
|
|
|
93
83
|
const stageGroupIds = stageGroups.map((group) => group.id);
|
|
@@ -101,8 +91,7 @@ export class StageService extends EntityServiceImpl {
|
|
|
101
91
|
try {
|
|
102
92
|
const stages = await this.stageRepository.getAllStage(
|
|
103
93
|
groupId,
|
|
104
|
-
|
|
105
|
-
level_type,
|
|
94
|
+
organization_id,
|
|
106
95
|
);
|
|
107
96
|
allStages.push(...stages);
|
|
108
97
|
} catch (err) {
|