rez_core 2.2.38 → 2.2.39
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.d.ts +1 -3
- package/dist/module/workflow/controller/stage-group.controller.js +3 -4
- package/dist/module/workflow/controller/stage-group.controller.js.map +1 -1
- package/dist/module/workflow/service/stage-group.service.d.ts +6 -4
- package/dist/module/workflow/service/stage-group.service.js +25 -4
- package/dist/module/workflow/service/stage-group.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 -6
- package/src/module/workflow/service/stage-group.service.ts +29 -7
|
@@ -9,8 +9,6 @@ export declare class StageGroupController {
|
|
|
9
9
|
}): Promise<import("../entity/stage-group.entity").StageGroup[]>;
|
|
10
10
|
getAllStageGroupAndStageHierarchy(req: Request & {
|
|
11
11
|
user: any;
|
|
12
|
-
}, body: {
|
|
13
|
-
workflow_id: number;
|
|
14
12
|
}): Promise<{
|
|
15
13
|
stages: any[];
|
|
16
14
|
workflow_id: number;
|
|
@@ -33,5 +31,5 @@ export declare class StageGroupController {
|
|
|
33
31
|
appcode: string;
|
|
34
32
|
level_id: string;
|
|
35
33
|
level_type: string;
|
|
36
|
-
}[]>;
|
|
34
|
+
}[] | null>;
|
|
37
35
|
}
|
|
@@ -24,9 +24,9 @@ let StageGroupController = class StageGroupController {
|
|
|
24
24
|
const { organization_id } = req.user.userData;
|
|
25
25
|
return this.stageGroupService.getAllStageGroup(body.workflow_id, organization_id);
|
|
26
26
|
}
|
|
27
|
-
async getAllStageGroupAndStageHierarchy(req
|
|
27
|
+
async getAllStageGroupAndStageHierarchy(req) {
|
|
28
28
|
const loggedInUser = req.user.userData;
|
|
29
|
-
return this.stageGroupService.getAllStageGroupAndStageHierarchy(
|
|
29
|
+
return this.stageGroupService.getAllStageGroupAndStageHierarchy(loggedInUser);
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
32
|
exports.StageGroupController = StageGroupController;
|
|
@@ -42,9 +42,8 @@ __decorate([
|
|
|
42
42
|
(0, common_1.Post)('/get-all-stage-groups-and-stages'),
|
|
43
43
|
(0, common_1.HttpCode)(common_1.HttpStatus.OK),
|
|
44
44
|
__param(0, (0, common_1.Req)()),
|
|
45
|
-
__param(1, (0, common_1.Body)()),
|
|
46
45
|
__metadata("design:type", Function),
|
|
47
|
-
__metadata("design:paramtypes", [Object
|
|
46
|
+
__metadata("design:paramtypes", [Object]),
|
|
48
47
|
__metadata("design:returntype", Promise)
|
|
49
48
|
], StageGroupController.prototype, "getAllStageGroupAndStageHierarchy", null);
|
|
50
49
|
exports.StageGroupController = StageGroupController = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stage-group.controller.js","sourceRoot":"","sources":["../../../../src/module/workflow/controller/stage-group.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAUwB;AACxB,2DAAgE;AAChE,wEAAmE;AAI5D,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAC/B,YAEmB,iBAAoC;QAApC,sBAAiB,GAAjB,iBAAiB,CAAmB;IACpD,CAAC;IAGE,AAAN,KAAK,CAAC,gBAAgB,CACb,GAA4B,EAC3B,IAA6B;QAErC,MAAM,EAAE,eAAe,EAAE,GAAG,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;QAC9C,OAAO,IAAI,CAAC,iBAAiB,CAAC,gBAAgB,CAC5C,IAAI,CAAC,WAAW,EAChB,eAAe,CAChB,CAAC;IACJ,CAAC;IAIK,AAAN,KAAK,CAAC,iCAAiC,
|
|
1
|
+
{"version":3,"file":"stage-group.controller.js","sourceRoot":"","sources":["../../../../src/module/workflow/controller/stage-group.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAUwB;AACxB,2DAAgE;AAChE,wEAAmE;AAI5D,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAC/B,YAEmB,iBAAoC;QAApC,sBAAiB,GAAjB,iBAAiB,CAAmB;IACpD,CAAC;IAGE,AAAN,KAAK,CAAC,gBAAgB,CACb,GAA4B,EAC3B,IAA6B;QAErC,MAAM,EAAE,eAAe,EAAE,GAAG,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;QAC9C,OAAO,IAAI,CAAC,iBAAiB,CAAC,gBAAgB,CAC5C,IAAI,CAAC,WAAW,EAChB,eAAe,CAChB,CAAC;IACJ,CAAC;IAIK,AAAN,KAAK,CAAC,iCAAiC,CAAQ,GAA4B;QACzE,MAAM,YAAY,GAAG,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;QAEvC,OAAO,IAAI,CAAC,iBAAiB,CAAC,iCAAiC,CAC7D,YAAY,CACb,CAAC;IACJ,CAAC;CACF,CAAA;AA3BY,oDAAoB;AAOzB;IADL,IAAA,aAAI,EAAC,mBAAmB,CAAC;IAEvB,WAAA,IAAA,YAAG,GAAE,CAAA;IACL,WAAA,IAAA,aAAI,GAAE,CAAA;;;;4DAOR;AAIK;IAFL,IAAA,aAAI,EAAC,kCAAkC,CAAC;IACxC,IAAA,iBAAQ,EAAC,mBAAU,CAAC,EAAE,CAAC;IACiB,WAAA,IAAA,YAAG,GAAE,CAAA;;;;6EAM7C;+BA1BU,oBAAoB;IAFhC,IAAA,mBAAU,EAAC,cAAc,CAAC;IAC1B,IAAA,kBAAS,EAAC,wBAAY,CAAC;IAGnB,WAAA,IAAA,eAAM,EAAC,mBAAmB,CAAC,CAAA;qCACQ,uCAAiB;GAH5C,oBAAoB,CA2BhC"}
|
|
@@ -3,14 +3,16 @@ 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 { DataSource } from 'typeorm';
|
|
6
|
+
import { DataSource, Repository } from 'typeorm';
|
|
7
|
+
import { WorkflowLevelMappingEntity } from '../entity/workflow-level-mapping.entity';
|
|
7
8
|
export declare class StageGroupService extends EntityServiceImpl {
|
|
8
9
|
private readonly stageGroupRepository;
|
|
9
10
|
private readonly stageService;
|
|
10
11
|
private readonly dataSource;
|
|
11
|
-
|
|
12
|
+
private readonly workflowLevelMappingRepo;
|
|
13
|
+
constructor(stageGroupRepository: StageGroupRepository, stageService: StageService, dataSource: DataSource, workflowLevelMappingRepo: Repository<WorkflowLevelMappingEntity>);
|
|
12
14
|
getAllStageGroup(workflow_id: number, organization_id: number): Promise<import("../entity/stage-group.entity").StageGroup[]>;
|
|
13
|
-
getAllStageGroupAndStageHierarchy(
|
|
15
|
+
getAllStageGroupAndStageHierarchy(loggedInUser: UserData): Promise<{
|
|
14
16
|
stages: any[];
|
|
15
17
|
workflow_id: number;
|
|
16
18
|
sequence: number;
|
|
@@ -32,7 +34,7 @@ export declare class StageGroupService extends EntityServiceImpl {
|
|
|
32
34
|
appcode: string;
|
|
33
35
|
level_id: string;
|
|
34
36
|
level_type: string;
|
|
35
|
-
}[]>;
|
|
37
|
+
}[] | null>;
|
|
36
38
|
updateEntity(entityData: BaseEntity, loggedInUser: UserData): Promise<any>;
|
|
37
39
|
getEntityData(entityType: string, id: number, loggedInUser?: UserData): Promise<BaseEntity | null>;
|
|
38
40
|
deleteEntity(entityType: string, id: number, loggedInUser: UserData): Promise<any>;
|
|
@@ -18,18 +18,37 @@ 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
|
+
const typeorm_2 = require("@nestjs/typeorm");
|
|
21
23
|
let StageGroupService = class StageGroupService extends entity_service_impl_service_1.EntityServiceImpl {
|
|
22
|
-
constructor(stageGroupRepository, stageService, dataSource) {
|
|
24
|
+
constructor(stageGroupRepository, stageService, dataSource, workflowLevelMappingRepo) {
|
|
23
25
|
super();
|
|
24
26
|
this.stageGroupRepository = stageGroupRepository;
|
|
25
27
|
this.stageService = stageService;
|
|
26
28
|
this.dataSource = dataSource;
|
|
29
|
+
this.workflowLevelMappingRepo = workflowLevelMappingRepo;
|
|
27
30
|
}
|
|
28
31
|
async getAllStageGroup(workflow_id, organization_id) {
|
|
29
32
|
return await this.stageGroupRepository.getAllStageGroup(workflow_id, organization_id);
|
|
30
33
|
}
|
|
31
|
-
async getAllStageGroupAndStageHierarchy(
|
|
32
|
-
|
|
34
|
+
async getAllStageGroupAndStageHierarchy(loggedInUser) {
|
|
35
|
+
let workflowLevelMapping = await this.workflowLevelMappingRepo.findOne({
|
|
36
|
+
where: {
|
|
37
|
+
mapped_level_type: loggedInUser.level_type,
|
|
38
|
+
mapped_level_id: loggedInUser.level_id,
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
if (!workflowLevelMapping) {
|
|
42
|
+
workflowLevelMapping = await this.workflowLevelMappingRepo.findOne({
|
|
43
|
+
where: {
|
|
44
|
+
mapped_level_type: 'ORG',
|
|
45
|
+
mapped_level_id: String(loggedInUser.organization_id),
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
if (!workflowLevelMapping)
|
|
50
|
+
return null;
|
|
51
|
+
return await this.stageGroupRepository.getAllStageGroupAndStageHierarchy(workflowLevelMapping.workflow_id, loggedInUser.organization_id);
|
|
33
52
|
}
|
|
34
53
|
async updateEntity(entityData, loggedInUser) {
|
|
35
54
|
return await super.updateEntity(entityData, loggedInUser);
|
|
@@ -52,8 +71,10 @@ exports.StageGroupService = StageGroupService;
|
|
|
52
71
|
exports.StageGroupService = StageGroupService = __decorate([
|
|
53
72
|
(0, common_1.Injectable)(),
|
|
54
73
|
__param(1, (0, common_1.Inject)('StageService')),
|
|
74
|
+
__param(3, (0, typeorm_2.InjectRepository)(workflow_level_mapping_entity_1.WorkflowLevelMappingEntity)),
|
|
55
75
|
__metadata("design:paramtypes", [stage_group_repository_1.StageGroupRepository,
|
|
56
76
|
stage_service_1.StageService,
|
|
57
|
-
typeorm_1.DataSource
|
|
77
|
+
typeorm_1.DataSource,
|
|
78
|
+
typeorm_1.Repository])
|
|
58
79
|
], StageGroupService);
|
|
59
80
|
//# sourceMappingURL=stage-group.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stage-group.service.js","sourceRoot":"","sources":["../../../../src/module/workflow/service/stage-group.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAoD;AACpD,gGAAwF;AACxF,iFAA4E;AAG5E,mDAA+C;AAC/C,
|
|
1
|
+
{"version":3,"file":"stage-group.service.js","sourceRoot":"","sources":["../../../../src/module/workflow/service/stage-group.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAoD;AACpD,gGAAwF;AACxF,iFAA4E;AAG5E,mDAA+C;AAC/C,qCAAiD;AACjD,2FAAqF;AACrF,6CAAmD;AAG5C,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,+CAAiB;IACtD,YACmB,oBAA0C,EAE1C,YAA0B,EAC1B,UAAsB,EAEtB,wBAAgE;QAEjF,KAAK,EAAE,CAAC;QAPS,yBAAoB,GAApB,oBAAoB,CAAsB;QAE1C,iBAAY,GAAZ,YAAY,CAAc;QAC1B,eAAU,GAAV,UAAU,CAAY;QAEtB,6BAAwB,GAAxB,wBAAwB,CAAwC;IAGnF,CAAC;IACD,KAAK,CAAC,gBAAgB,CAAC,WAAmB,EAAE,eAAuB;QACjE,OAAO,MAAM,IAAI,CAAC,oBAAoB,CAAC,gBAAgB,CACrD,WAAW,EACX,eAAe,CAChB,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,iCAAiC,CAAC,YAAsB;QAE5D,IAAI,oBAAoB,GAAG,MAAM,IAAI,CAAC,wBAAwB,CAAC,OAAO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