rez_core 2.1.139 → 2.1.141
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/comm-template.controller.d.ts +11 -0
- package/dist/module/workflow/controller/comm-template.controller.js +44 -0
- package/dist/module/workflow/controller/comm-template.controller.js.map +1 -0
- package/dist/module/workflow/controller/stage-group.controller.d.ts +8 -2
- package/dist/module/workflow/controller/stage-group.controller.js +17 -5
- package/dist/module/workflow/controller/stage-group.controller.js.map +1 -1
- package/dist/module/workflow/controller/stage.controller.d.ts +13 -0
- package/dist/module/workflow/controller/stage.controller.js +56 -0
- package/dist/module/workflow/controller/stage.controller.js.map +1 -0
- package/dist/module/workflow/controller/workflow.controller.d.ts +11 -1
- package/dist/module/workflow/controller/workflow.controller.js +13 -0
- package/dist/module/workflow/controller/workflow.controller.js.map +1 -1
- package/dist/module/workflow/entity/action.entity.d.ts +4 -1
- package/dist/module/workflow/entity/action.entity.js +20 -8
- package/dist/module/workflow/entity/action.entity.js.map +1 -1
- package/dist/module/workflow/entity/stage-group.entity.d.ts +1 -1
- package/dist/module/workflow/entity/stage-group.entity.js +1 -1
- package/dist/module/workflow/entity/stage-group.entity.js.map +1 -1
- package/dist/module/workflow/entity/stage.entity.d.ts +1 -2
- package/dist/module/workflow/entity/stage.entity.js +1 -5
- package/dist/module/workflow/entity/stage.entity.js.map +1 -1
- package/dist/module/workflow/repository/comm-template.repository.d.ts +7 -0
- package/dist/module/workflow/repository/comm-template.repository.js +39 -0
- package/dist/module/workflow/repository/comm-template.repository.js.map +1 -0
- package/dist/module/workflow/repository/stage-group.repository.d.ts +7 -0
- package/dist/module/workflow/repository/stage-group.repository.js +50 -0
- package/dist/module/workflow/repository/stage-group.repository.js.map +1 -0
- package/dist/module/workflow/repository/stage.repository.d.ts +7 -0
- package/dist/module/workflow/repository/stage.repository.js +50 -0
- package/dist/module/workflow/repository/stage.repository.js.map +1 -0
- package/dist/module/workflow/service/action.service.d.ts +3 -0
- package/dist/module/workflow/service/action.service.js +46 -7
- package/dist/module/workflow/service/action.service.js.map +1 -1
- package/dist/module/workflow/service/comm-template.service.d.ts +8 -2
- package/dist/module/workflow/service/comm-template.service.js +18 -3
- package/dist/module/workflow/service/comm-template.service.js.map +1 -1
- package/dist/module/workflow/service/stage-group.service.d.ts +11 -0
- package/dist/module/workflow/service/stage-group.service.js +36 -1
- package/dist/module/workflow/service/stage-group.service.js.map +1 -1
- package/dist/module/workflow/service/stage.service.d.ts +14 -4
- package/dist/module/workflow/service/stage.service.js +57 -13
- package/dist/module/workflow/service/stage.service.js.map +1 -1
- package/dist/module/workflow/service/workflow.service.d.ts +15 -1
- package/dist/module/workflow/service/workflow.service.js +43 -2
- package/dist/module/workflow/service/workflow.service.js.map +1 -1
- package/dist/module/workflow/workflow.module.js +17 -2
- package/dist/module/workflow/workflow.module.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/module/workflow/controller/comm-template.controller.ts +31 -0
- package/src/module/workflow/controller/stage-group.controller.ts +27 -4
- package/src/module/workflow/controller/stage.controller.ts +50 -0
- package/src/module/workflow/controller/workflow.controller.ts +7 -1
- package/src/module/workflow/entity/action.entity.ts +10 -1
- package/src/module/workflow/entity/stage-group.entity.ts +1 -1
- package/src/module/workflow/entity/stage.entity.ts +1 -4
- package/src/module/workflow/repository/comm-template.repository.ts +22 -0
- package/src/module/workflow/repository/stage-group.repository.ts +46 -0
- package/src/module/workflow/repository/stage.repository.ts +47 -0
- package/src/module/workflow/service/action.service.ts +106 -14
- package/src/module/workflow/service/comm-template.service.ts +21 -2
- package/src/module/workflow/service/stage-group.service.ts +66 -2
- package/src/module/workflow/service/stage.service.ts +104 -28
- package/src/module/workflow/service/workflow.service.ts +70 -0
- package/src/module/workflow/workflow.module.ts +17 -2
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CommTemplateService } from '../service/comm-template.service';
|
|
2
|
+
export declare class CommTemplateController {
|
|
3
|
+
private readonly commTemplateService;
|
|
4
|
+
constructor(commTemplateService: CommTemplateService);
|
|
5
|
+
getTemplate(req: Request & {
|
|
6
|
+
user: any;
|
|
7
|
+
}, entityType?: string): Promise<{
|
|
8
|
+
label: string;
|
|
9
|
+
value: string;
|
|
10
|
+
}[]>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.CommTemplateController = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const jwt_guard_1 = require("../../auth/guards/jwt.guard");
|
|
18
|
+
const comm_template_service_1 = require("../service/comm-template.service");
|
|
19
|
+
let CommTemplateController = class CommTemplateController {
|
|
20
|
+
constructor(commTemplateService) {
|
|
21
|
+
this.commTemplateService = commTemplateService;
|
|
22
|
+
}
|
|
23
|
+
async getTemplate(req, entityType) {
|
|
24
|
+
const loggedInUser = req.user.userData;
|
|
25
|
+
const result = this.commTemplateService.getAllCommTemplate(entityType || '', loggedInUser);
|
|
26
|
+
return result;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
exports.CommTemplateController = CommTemplateController;
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, common_1.Get)('/get-comm-template'),
|
|
32
|
+
(0, common_1.HttpCode)(common_1.HttpStatus.OK),
|
|
33
|
+
__param(0, (0, common_1.Req)()),
|
|
34
|
+
__param(1, (0, common_1.Query)('entity_type')),
|
|
35
|
+
__metadata("design:type", Function),
|
|
36
|
+
__metadata("design:paramtypes", [Object, String]),
|
|
37
|
+
__metadata("design:returntype", Promise)
|
|
38
|
+
], CommTemplateController.prototype, "getTemplate", null);
|
|
39
|
+
exports.CommTemplateController = CommTemplateController = __decorate([
|
|
40
|
+
(0, common_1.Controller)('/templates'),
|
|
41
|
+
(0, common_1.UseGuards)(jwt_guard_1.JwtAuthGuard),
|
|
42
|
+
__metadata("design:paramtypes", [comm_template_service_1.CommTemplateService])
|
|
43
|
+
], CommTemplateController);
|
|
44
|
+
//# sourceMappingURL=comm-template.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comm-template.controller.js","sourceRoot":"","sources":["../../../../src/module/workflow/controller/comm-template.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAQwB;AACxB,2DAAgE;AAChE,4EAAuE;AAIhE,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IACjC,YAA6B,mBAAwC;QAAxC,wBAAmB,GAAnB,mBAAmB,CAAqB;IAAG,CAAC;IAInE,AAAN,KAAK,CAAC,WAAW,CACR,GAA4B,EACb,UAAmB;QAEzC,MAAM,YAAY,GAAG,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;QACvC,MAAM,MAAM,GAAG,IAAI,CAAC,mBAAmB,CAAC,kBAAkB,CACxD,UAAU,IAAI,EAAE,EAChB,YAAY,CACb,CAAC;QACF,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAA;AAhBY,wDAAsB;AAK3B;IAFL,IAAA,YAAG,EAAC,oBAAoB,CAAC;IACzB,IAAA,iBAAQ,EAAC,mBAAU,CAAC,EAAE,CAAC;IAErB,WAAA,IAAA,YAAG,GAAE,CAAA;IACL,WAAA,IAAA,cAAK,EAAC,aAAa,CAAC,CAAA;;;;yDAQtB;iCAfU,sBAAsB;IAFlC,IAAA,mBAAU,EAAC,YAAY,CAAC;IACxB,IAAA,kBAAS,EAAC,wBAAY,CAAC;qCAE4B,2CAAmB;GAD1D,sBAAsB,CAgBlC"}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
+
import { StageGroupService } from '../service/stage-group.service';
|
|
1
2
|
export declare class StageGroupController {
|
|
2
|
-
|
|
3
|
-
|
|
3
|
+
private readonly stageGroupService;
|
|
4
|
+
constructor(stageGroupService: StageGroupService);
|
|
5
|
+
getAllStageGroup(req: Request & {
|
|
6
|
+
user: any;
|
|
7
|
+
}, body: {
|
|
8
|
+
workflow_id: number;
|
|
9
|
+
}): Promise<import("../entity/stage-group.entity").StageGroup[]>;
|
|
4
10
|
}
|
|
@@ -8,24 +8,36 @@ 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.StageGroupController = void 0;
|
|
13
16
|
const common_1 = require("@nestjs/common");
|
|
14
17
|
const jwt_guard_1 = require("../../auth/guards/jwt.guard");
|
|
18
|
+
const stage_group_service_1 = require("../service/stage-group.service");
|
|
15
19
|
let StageGroupController = class StageGroupController {
|
|
16
|
-
constructor() {
|
|
17
|
-
|
|
20
|
+
constructor(stageGroupService) {
|
|
21
|
+
this.stageGroupService = stageGroupService;
|
|
22
|
+
}
|
|
23
|
+
async getAllStageGroup(req, body) {
|
|
24
|
+
const { level_id, level_type } = req.user.userData;
|
|
25
|
+
return this.stageGroupService.getAllStageGroup(body.workflow_id, level_id, level_type);
|
|
26
|
+
}
|
|
18
27
|
};
|
|
19
28
|
exports.StageGroupController = StageGroupController;
|
|
20
29
|
__decorate([
|
|
21
|
-
(0, common_1.
|
|
30
|
+
(0, common_1.Post)('/getAllStageGroup'),
|
|
31
|
+
__param(0, (0, common_1.Req)()),
|
|
32
|
+
__param(1, (0, common_1.Body)()),
|
|
22
33
|
__metadata("design:type", Function),
|
|
23
|
-
__metadata("design:paramtypes", []),
|
|
34
|
+
__metadata("design:paramtypes", [Object, Object]),
|
|
24
35
|
__metadata("design:returntype", Promise)
|
|
25
36
|
], StageGroupController.prototype, "getAllStageGroup", null);
|
|
26
37
|
exports.StageGroupController = StageGroupController = __decorate([
|
|
27
38
|
(0, common_1.Controller)('/stage-group'),
|
|
28
39
|
(0, common_1.UseGuards)(jwt_guard_1.JwtAuthGuard),
|
|
29
|
-
|
|
40
|
+
__param(0, (0, common_1.Inject)('StageGroupService')),
|
|
41
|
+
__metadata("design:paramtypes", [stage_group_service_1.StageGroupService])
|
|
30
42
|
], StageGroupController);
|
|
31
43
|
//# sourceMappingURL=stage-group.controller.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stage-group.controller.js","sourceRoot":"","sources":["../../../../src/module/workflow/controller/stage-group.controller.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"stage-group.controller.js","sourceRoot":"","sources":["../../../../src/module/workflow/controller/stage-group.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAQwB;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,QAAQ,EAAE,UAAU,EAAE,GAAG,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;QACnD,OAAO,IAAI,CAAC,iBAAiB,CAAC,gBAAgB,CAC5C,IAAI,CAAC,WAAW,EAChB,QAAQ,EACR,UAAU,CACX,CAAC;IACJ,CAAC;CACF,CAAA;AAlBY,oDAAoB;AAOzB;IADL,IAAA,aAAI,EAAC,mBAAmB,CAAC;IAEvB,WAAA,IAAA,YAAG,GAAE,CAAA;IACL,WAAA,IAAA,aAAI,GAAE,CAAA;;;;4DAQR;+BAjBU,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,CAkBhC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { StageService } from '../service/stage.service';
|
|
2
|
+
export declare class StageController {
|
|
3
|
+
private readonly stageGroupService;
|
|
4
|
+
constructor(stageGroupService: StageService);
|
|
5
|
+
getAllStage(req: Request & {
|
|
6
|
+
user: any;
|
|
7
|
+
}, body: {
|
|
8
|
+
stage_group_id: number;
|
|
9
|
+
}): Promise<import("../entity/stage.entity").Stage[]>;
|
|
10
|
+
getStagesWithGroupName(workflow_id: number, req: Request & {
|
|
11
|
+
user: any;
|
|
12
|
+
}): Promise<any>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.StageController = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const jwt_guard_1 = require("../../auth/guards/jwt.guard");
|
|
18
|
+
const stage_service_1 = require("../service/stage.service");
|
|
19
|
+
let StageController = class StageController {
|
|
20
|
+
constructor(stageGroupService) {
|
|
21
|
+
this.stageGroupService = stageGroupService;
|
|
22
|
+
}
|
|
23
|
+
async getAllStage(req, body) {
|
|
24
|
+
const { level_id, level_type } = req.user.userData;
|
|
25
|
+
return this.stageGroupService.getAllStage(body.stage_group_id, level_id, level_type);
|
|
26
|
+
}
|
|
27
|
+
async getStagesWithGroupName(workflow_id, req) {
|
|
28
|
+
const { level_id, level_type } = req.user.userData;
|
|
29
|
+
return this.stageGroupService.getStagesWithGroupName(workflow_id, level_id, level_type);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
exports.StageController = StageController;
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, common_1.Post)('/getAllStage'),
|
|
35
|
+
__param(0, (0, common_1.Req)()),
|
|
36
|
+
__param(1, (0, common_1.Body)()),
|
|
37
|
+
__metadata("design:type", Function),
|
|
38
|
+
__metadata("design:paramtypes", [Object, Object]),
|
|
39
|
+
__metadata("design:returntype", Promise)
|
|
40
|
+
], StageController.prototype, "getAllStage", null);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, common_1.Post)('/getStagesWithGroupName'),
|
|
43
|
+
(0, common_1.HttpCode)(common_1.HttpStatus.OK),
|
|
44
|
+
__param(0, (0, common_1.Body)('workflow_id')),
|
|
45
|
+
__param(1, (0, common_1.Req)()),
|
|
46
|
+
__metadata("design:type", Function),
|
|
47
|
+
__metadata("design:paramtypes", [Number, Object]),
|
|
48
|
+
__metadata("design:returntype", Promise)
|
|
49
|
+
], StageController.prototype, "getStagesWithGroupName", null);
|
|
50
|
+
exports.StageController = StageController = __decorate([
|
|
51
|
+
(0, common_1.Controller)('/stage'),
|
|
52
|
+
(0, common_1.UseGuards)(jwt_guard_1.JwtAuthGuard),
|
|
53
|
+
__param(0, (0, common_1.Inject)('StageService')),
|
|
54
|
+
__metadata("design:paramtypes", [stage_service_1.StageService])
|
|
55
|
+
], StageController);
|
|
56
|
+
//# sourceMappingURL=stage.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stage.controller.js","sourceRoot":"","sources":["../../../../src/module/workflow/controller/stage.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAUwB;AACxB,2DAAgE;AAChE,4DAAwD;AAKjD,IAAM,eAAe,GAArB,MAAM,eAAe;IAC1B,YAEmB,iBAA+B;QAA/B,sBAAiB,GAAjB,iBAAiB,CAAc;IAC/C,CAAC;IAGE,AAAN,KAAK,CAAC,WAAW,CACR,GAA4B,EAC3B,IAAgC;QAExC,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;QACnD,OAAO,IAAI,CAAC,iBAAiB,CAAC,WAAW,CACvC,IAAI,CAAC,cAAc,EACnB,QAAQ,EACR,UAAU,CACX,CAAC;IACJ,CAAC;IAIK,AAAN,KAAK,CAAC,sBAAsB,CACL,WAAmB,EACjC,GAA4B;QAEnC,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;QACnD,OAAO,IAAI,CAAC,iBAAiB,CAAC,sBAAsB,CAClD,WAAW,EACX,QAAQ,EACR,UAAU,CACX,CAAC;IACJ,CAAC;CACF,CAAA;AAhCY,0CAAe;AAOpB;IADL,IAAA,aAAI,EAAC,cAAc,CAAC;IAElB,WAAA,IAAA,YAAG,GAAE,CAAA;IACL,WAAA,IAAA,aAAI,GAAE,CAAA;;;;kDAQR;AAIK;IAFL,IAAA,aAAI,EAAC,yBAAyB,CAAC;IAC/B,IAAA,iBAAQ,EAAC,mBAAU,CAAC,EAAE,CAAC;IAErB,WAAA,IAAA,aAAI,EAAC,aAAa,CAAC,CAAA;IACnB,WAAA,IAAA,YAAG,GAAE,CAAA;;;;6DAQP;0BA/BU,eAAe;IAF3B,IAAA,mBAAU,EAAC,QAAQ,CAAC;IACpB,IAAA,kBAAS,EAAC,wBAAY,CAAC;IAGnB,WAAA,IAAA,eAAM,EAAC,cAAc,CAAC,CAAA;qCACa,4BAAY;GAHvC,eAAe,CAgC3B"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { WorkflowService } from '../service/workflow.service';
|
|
2
|
-
import { Request } from 'express';
|
|
3
2
|
export declare class WorkflowController {
|
|
4
3
|
private readonly workflowService;
|
|
5
4
|
constructor(workflowService: WorkflowService);
|
|
@@ -12,4 +11,15 @@ export declare class WorkflowController {
|
|
|
12
11
|
deleteWorkflow(id: number): Promise<{
|
|
13
12
|
message: string;
|
|
14
13
|
}>;
|
|
14
|
+
updateSequence(body: any, req: Request & {
|
|
15
|
+
user: any;
|
|
16
|
+
}): Promise<{
|
|
17
|
+
updated: number;
|
|
18
|
+
results: {
|
|
19
|
+
id: any;
|
|
20
|
+
success: boolean;
|
|
21
|
+
result?: any;
|
|
22
|
+
error?: string;
|
|
23
|
+
}[];
|
|
24
|
+
}>;
|
|
15
25
|
}
|
|
@@ -30,6 +30,10 @@ let WorkflowController = class WorkflowController {
|
|
|
30
30
|
async deleteWorkflow(id) {
|
|
31
31
|
return this.workflowService.deleteWorkflowById(id);
|
|
32
32
|
}
|
|
33
|
+
async updateSequence(body, req) {
|
|
34
|
+
const loggedInUser = req.user?.userData;
|
|
35
|
+
return this.workflowService.updateSequence(body, loggedInUser);
|
|
36
|
+
}
|
|
33
37
|
};
|
|
34
38
|
exports.WorkflowController = WorkflowController;
|
|
35
39
|
__decorate([
|
|
@@ -57,6 +61,15 @@ __decorate([
|
|
|
57
61
|
__metadata("design:paramtypes", [Number]),
|
|
58
62
|
__metadata("design:returntype", Promise)
|
|
59
63
|
], WorkflowController.prototype, "deleteWorkflow", null);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, common_1.Put)('/updateSequence'),
|
|
66
|
+
(0, common_1.HttpCode)(common_1.HttpStatus.OK),
|
|
67
|
+
__param(0, (0, common_1.Body)()),
|
|
68
|
+
__param(1, (0, common_1.Req)()),
|
|
69
|
+
__metadata("design:type", Function),
|
|
70
|
+
__metadata("design:paramtypes", [Object, Object]),
|
|
71
|
+
__metadata("design:returntype", Promise)
|
|
72
|
+
], WorkflowController.prototype, "updateSequence", null);
|
|
60
73
|
exports.WorkflowController = WorkflowController = __decorate([
|
|
61
74
|
(0, common_1.Controller)('/workflow'),
|
|
62
75
|
(0, common_1.UseGuards)(jwt_guard_1.JwtAuthGuard),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow.controller.js","sourceRoot":"","sources":["../../../../src/module/workflow/controller/workflow.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAawB;AACxB,2DAAgE;AAChE,kEAA8D;
|
|
1
|
+
{"version":3,"file":"workflow.controller.js","sourceRoot":"","sources":["../../../../src/module/workflow/controller/workflow.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAawB;AACxB,2DAAgE;AAChE,kEAA8D;AAIvD,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAC7B,YAEmB,eAAgC;QAAhC,oBAAe,GAAf,eAAe,CAAiB;IAChD,CAAC;IAIE,AAAN,KAAK,CAAC,eAAe,CACZ,GAA4B,EAC3B,IAA6B;QAErC,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;QACnD,OAAO,IAAI,CAAC,eAAe,CAAC,eAAe,CACzC,IAAI,CAAC,WAAW,EAChB,QAAQ,EACR,UAAU,CACX,CAAC;IACJ,CAAC;IAIK,AAAN,KAAK,CAAC,eAAe,CAAc,EAAU;QAC3C,OAAO,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC;IAClD,CAAC;IAIK,AAAN,KAAK,CAAC,cAAc,CAAc,EAAU;QAC1C,OAAO,IAAI,CAAC,eAAe,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAC;IACrD,CAAC;IAIK,AAAN,KAAK,CAAC,cAAc,CAAS,IAAS,EAAS,GAA4B;QACzE,MAAM,YAAY,GAAG,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC;QACxC,OAAO,IAAI,CAAC,eAAe,CAAC,cAAc,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;IACjE,CAAC;CACF,CAAA;AAtCY,gDAAkB;AAQvB;IAFL,IAAA,aAAI,EAAC,kBAAkB,CAAC;IACxB,IAAA,iBAAQ,EAAC,mBAAU,CAAC,EAAE,CAAC;IAErB,WAAA,IAAA,YAAG,GAAE,CAAA;IACL,WAAA,IAAA,aAAI,GAAE,CAAA;;;;yDAQR;AAIK;IAFL,IAAA,YAAG,EAAC,sBAAsB,CAAC;IAC3B,IAAA,iBAAQ,EAAC,mBAAU,CAAC,EAAE,CAAC;IACD,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;;;;yDAEjC;AAIK;IAFL,IAAA,eAAM,EAAC,qBAAqB,CAAC;IAC7B,IAAA,iBAAQ,EAAC,mBAAU,CAAC,EAAE,CAAC;IACF,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;;;;wDAEhC;AAIK;IAFL,IAAA,YAAG,EAAC,iBAAiB,CAAC;IACtB,IAAA,iBAAQ,EAAC,mBAAU,CAAC,EAAE,CAAC;IACF,WAAA,IAAA,aAAI,GAAE,CAAA;IAAa,WAAA,IAAA,YAAG,GAAE,CAAA;;;;wDAG7C;6BArCU,kBAAkB;IAF9B,IAAA,mBAAU,EAAC,WAAW,CAAC;IACvB,IAAA,kBAAS,EAAC,wBAAY,CAAC;IAGnB,WAAA,IAAA,eAAM,EAAC,iBAAiB,CAAC,CAAA;qCACQ,kCAAe;GAHxC,kBAAkB,CAsC9B"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { BaseEntity } from 'src/module/meta/entity/base-entity.entity';
|
|
2
|
-
export declare class
|
|
2
|
+
export declare class ActionEntity extends BaseEntity {
|
|
3
3
|
constructor();
|
|
4
4
|
workflow_id: number;
|
|
5
5
|
action_cat_id: number;
|
|
6
6
|
action_requirement: string;
|
|
7
|
+
reason_code: string;
|
|
8
|
+
default_reason_code: string;
|
|
9
|
+
default_value: boolean;
|
|
7
10
|
}
|
|
@@ -9,31 +9,43 @@ 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
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.ActionEntity = void 0;
|
|
13
13
|
const global_constant_1 = require("../../../constant/global.constant");
|
|
14
14
|
const base_entity_entity_1 = require("../../meta/entity/base-entity.entity");
|
|
15
15
|
const typeorm_1 = require("typeorm");
|
|
16
|
-
let
|
|
16
|
+
let ActionEntity = class ActionEntity extends base_entity_entity_1.BaseEntity {
|
|
17
17
|
constructor() {
|
|
18
18
|
super();
|
|
19
19
|
this.entity_type = global_constant_1.ACTION;
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
|
-
exports.
|
|
22
|
+
exports.ActionEntity = ActionEntity;
|
|
23
23
|
__decorate([
|
|
24
24
|
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
25
25
|
__metadata("design:type", Number)
|
|
26
|
-
],
|
|
26
|
+
], ActionEntity.prototype, "workflow_id", void 0);
|
|
27
27
|
__decorate([
|
|
28
28
|
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
29
29
|
__metadata("design:type", Number)
|
|
30
|
-
],
|
|
30
|
+
], ActionEntity.prototype, "action_cat_id", void 0);
|
|
31
31
|
__decorate([
|
|
32
32
|
(0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
|
|
33
33
|
__metadata("design:type", String)
|
|
34
|
-
],
|
|
35
|
-
|
|
34
|
+
], ActionEntity.prototype, "action_requirement", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], ActionEntity.prototype, "reason_code", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], ActionEntity.prototype, "default_reason_code", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)({ default: 0, type: 'boolean' }),
|
|
45
|
+
__metadata("design:type", Boolean)
|
|
46
|
+
], ActionEntity.prototype, "default_value", void 0);
|
|
47
|
+
exports.ActionEntity = ActionEntity = __decorate([
|
|
36
48
|
(0, typeorm_1.Entity)({ name: 'cr_wf_action' }),
|
|
37
49
|
__metadata("design:paramtypes", [])
|
|
38
|
-
],
|
|
50
|
+
], ActionEntity);
|
|
39
51
|
//# sourceMappingURL=action.entity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action.entity.js","sourceRoot":"","sources":["../../../../src/module/workflow/entity/action.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uEAAsD;AACtD,6EAAuE;AACvE,qCAAyC;AAGlC,IAAM,
|
|
1
|
+
{"version":3,"file":"action.entity.js","sourceRoot":"","sources":["../../../../src/module/workflow/entity/action.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uEAAsD;AACtD,6EAAuE;AACvE,qCAAyC;AAGlC,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,+BAAU;IAC1C;QACE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,WAAW,GAAG,wBAAM,CAAC;IAC5B,CAAC;CAmBF,CAAA;AAvBY,oCAAY;AAOvB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACpB;AAGpB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDAClB;AAGtB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wDACjB;AAG3B;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACxB;AAGpB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yDAChB;AAG5B;IADC,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;mDACjB;uBAtBZ,YAAY;IADxB,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC;;GACpB,YAAY,CAuBxB"}
|
|
@@ -27,7 +27,7 @@ __decorate([
|
|
|
27
27
|
__decorate([
|
|
28
28
|
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
29
29
|
__metadata("design:type", Number)
|
|
30
|
-
], StageGroup.prototype, "
|
|
30
|
+
], StageGroup.prototype, "sequence", void 0);
|
|
31
31
|
exports.StageGroup = StageGroup = __decorate([
|
|
32
32
|
(0, typeorm_1.Entity)({ name: 'cr_wf_stage_group' }),
|
|
33
33
|
__metadata("design:paramtypes", [])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stage-group.entity.js","sourceRoot":"","sources":["../../../../src/module/workflow/entity/stage-group.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uEAA2D;AAC3D,6EAAuE;AACvE,qCAAyC;AAGlC,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,+BAAU;IACxC;QACE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,WAAW,GAAG,6BAAW,CAAC;IACjC,CAAC;CAOF,CAAA;AAXY,gCAAU;AAOrB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACpB;AAGpB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;
|
|
1
|
+
{"version":3,"file":"stage-group.entity.js","sourceRoot":"","sources":["../../../../src/module/workflow/entity/stage-group.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uEAA2D;AAC3D,6EAAuE;AACvE,qCAAyC;AAGlC,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,+BAAU;IACxC;QACE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,WAAW,GAAG,6BAAW,CAAC;IACjC,CAAC;CAOF,CAAA;AAXY,gCAAU;AAOrB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACpB;AAGpB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACvB;qBAVN,UAAU;IADtB,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,mBAAmB,EAAE,CAAC;;GACzB,UAAU,CAWtB"}
|
|
@@ -24,14 +24,10 @@ __decorate([
|
|
|
24
24
|
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
25
25
|
__metadata("design:type", Number)
|
|
26
26
|
], Stage.prototype, "stage_group_id", void 0);
|
|
27
|
-
__decorate([
|
|
28
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
29
|
-
__metadata("design:type", String)
|
|
30
|
-
], Stage.prototype, "full_name", void 0);
|
|
31
27
|
__decorate([
|
|
32
28
|
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
33
29
|
__metadata("design:type", Number)
|
|
34
|
-
], Stage.prototype, "
|
|
30
|
+
], Stage.prototype, "sequence", void 0);
|
|
35
31
|
exports.Stage = Stage = __decorate([
|
|
36
32
|
(0, typeorm_1.Entity)({ name: 'cr_wf_stage' }),
|
|
37
33
|
__metadata("design:paramtypes", [])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stage.entity.js","sourceRoot":"","sources":["../../../../src/module/workflow/entity/stage.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uEAAqD;AACrD,6EAAuE;AACvE,qCAAyC;AAGlC,IAAM,KAAK,GAAX,MAAM,KAAM,SAAQ,+BAAU;IACnC;QACE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,WAAW,GAAG,uBAAK,CAAC;IAC3B,CAAC;
|
|
1
|
+
{"version":3,"file":"stage.entity.js","sourceRoot":"","sources":["../../../../src/module/workflow/entity/stage.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uEAAqD;AACrD,6EAAuE;AACvE,qCAAyC;AAGlC,IAAM,KAAK,GAAX,MAAM,KAAM,SAAQ,+BAAU;IACnC;QACE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,WAAW,GAAG,uBAAK,CAAC;IAC3B,CAAC;CAOF,CAAA;AAXY,sBAAK;AAOhB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACjB;AAGvB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uCACvB;gBAVN,KAAK;IADjB,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;;GACnB,KAAK,CAWjB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Repository } from 'typeorm';
|
|
2
|
+
import { CommTemplate } from '../entity/comm-template.entity';
|
|
3
|
+
export declare class CommTemplateRepository {
|
|
4
|
+
private readonly commTemplateRepository;
|
|
5
|
+
constructor(commTemplateRepository: Repository<CommTemplate>);
|
|
6
|
+
getAllCommTemplate(entity_type: string, loggedInUser: any): Promise<CommTemplate[]>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.CommTemplateRepository = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
18
|
+
const typeorm_2 = require("typeorm");
|
|
19
|
+
const comm_template_entity_1 = require("../entity/comm-template.entity");
|
|
20
|
+
let CommTemplateRepository = class CommTemplateRepository {
|
|
21
|
+
constructor(commTemplateRepository) {
|
|
22
|
+
this.commTemplateRepository = commTemplateRepository;
|
|
23
|
+
}
|
|
24
|
+
async getAllCommTemplate(entity_type, loggedInUser) {
|
|
25
|
+
return this.commTemplateRepository.find({
|
|
26
|
+
select: ['name', 'code'],
|
|
27
|
+
where: {
|
|
28
|
+
entity_type: entity_type,
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
exports.CommTemplateRepository = CommTemplateRepository;
|
|
34
|
+
exports.CommTemplateRepository = CommTemplateRepository = __decorate([
|
|
35
|
+
(0, common_1.Injectable)(),
|
|
36
|
+
__param(0, (0, typeorm_1.InjectRepository)(comm_template_entity_1.CommTemplate)),
|
|
37
|
+
__metadata("design:paramtypes", [typeorm_2.Repository])
|
|
38
|
+
], CommTemplateRepository);
|
|
39
|
+
//# sourceMappingURL=comm-template.repository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comm-template.repository.js","sourceRoot":"","sources":["../../../../src/module/workflow/repository/comm-template.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA+D;AAC/D,6CAAmD;AAEnD,qCAAqC;AACrC,yEAA8D;AAGvD,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IACjC,YAEmB,sBAAgD;QAAhD,2BAAsB,GAAtB,sBAAsB,CAA0B;IAChE,CAAC;IAEJ,KAAK,CAAC,kBAAkB,CAAC,WAAmB,EAAE,YAAY;QACxD,OAAO,IAAI,CAAC,sBAAsB,CAAC,IAAI,CAAC;YACtC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;YACxB,KAAK,EAAE;gBACL,WAAW,EAAE,WAAW;aACzB;SACF,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AAdY,wDAAsB;iCAAtB,sBAAsB;IADlC,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,0BAAgB,EAAC,mCAAY,CAAC,CAAA;qCACU,oBAAU;GAH1C,sBAAsB,CAclC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { StageGroup } from '../entity/stage-group.entity';
|
|
2
|
+
import { Repository } from 'typeorm';
|
|
3
|
+
export declare class StageGroupRepository {
|
|
4
|
+
private readonly stageGroupRepository;
|
|
5
|
+
constructor(stageGroupRepository: Repository<StageGroup>);
|
|
6
|
+
getAllStageGroup(workflow_id: number, level_id: string, level_type: string): Promise<StageGroup[]>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.StageGroupRepository = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const stage_group_entity_1 = require("../entity/stage-group.entity");
|
|
18
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
19
|
+
const typeorm_2 = require("typeorm");
|
|
20
|
+
let StageGroupRepository = class StageGroupRepository {
|
|
21
|
+
constructor(stageGroupRepository) {
|
|
22
|
+
this.stageGroupRepository = stageGroupRepository;
|
|
23
|
+
}
|
|
24
|
+
async getAllStageGroup(workflow_id, level_id, level_type) {
|
|
25
|
+
if (!workflow_id) {
|
|
26
|
+
throw new common_1.BadRequestException('workflow_id is required');
|
|
27
|
+
}
|
|
28
|
+
const result = await this.stageGroupRepository.find({
|
|
29
|
+
where: {
|
|
30
|
+
workflow_id,
|
|
31
|
+
level_id,
|
|
32
|
+
level_type,
|
|
33
|
+
},
|
|
34
|
+
order: {
|
|
35
|
+
sequence: 'ASC',
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
if (!result || result.length === 0) {
|
|
39
|
+
throw new common_1.NotFoundException('No stage groups found for the given workflow ID');
|
|
40
|
+
}
|
|
41
|
+
return result;
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
exports.StageGroupRepository = StageGroupRepository;
|
|
45
|
+
exports.StageGroupRepository = StageGroupRepository = __decorate([
|
|
46
|
+
(0, common_1.Injectable)(),
|
|
47
|
+
__param(0, (0, typeorm_1.InjectRepository)(stage_group_entity_1.StageGroup)),
|
|
48
|
+
__metadata("design:paramtypes", [typeorm_2.Repository])
|
|
49
|
+
], StageGroupRepository);
|
|
50
|
+
//# sourceMappingURL=stage-group.repository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stage-group.repository.js","sourceRoot":"","sources":["../../../../src/module/workflow/repository/stage-group.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAKwB;AACxB,qEAA0D;AAC1D,6CAAmD;AACnD,qCAAqC;AAG9B,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAC/B,YAEmB,oBAA4C;QAA5C,yBAAoB,GAApB,oBAAoB,CAAwB;IAC5D,CAAC;IAEJ,KAAK,CAAC,gBAAgB,CACpB,WAAmB,EACnB,QAAgB,EAChB,UAAkB;QAElB,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,MAAM,IAAI,4BAAmB,CAAC,yBAAyB,CAAC,CAAC;QAC3D,CAAC;QAED,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC;YAClD,KAAK,EAAE;gBACL,WAAW;gBACX,QAAQ;gBACR,UAAU;aACX;YACD,KAAK,EAAE;gBACL,QAAQ,EAAE,KAAK;aAChB;SACF,CAAC,CAAC;QAEH,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACnC,MAAM,IAAI,0BAAiB,CACzB,iDAAiD,CAClD,CAAC;QACJ,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAA;AAlCY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,0BAAgB,EAAC,+BAAU,CAAC,CAAA;qCACU,oBAAU;GAHxC,oBAAoB,CAkChC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Repository } from 'typeorm';
|
|
2
|
+
import { Stage } from '../entity/stage.entity';
|
|
3
|
+
export declare class StageRepository {
|
|
4
|
+
private readonly stageRepository;
|
|
5
|
+
constructor(stageRepository: Repository<Stage>);
|
|
6
|
+
getAllStage(stage_group_id: number, level_id: string, level_type: string): Promise<Stage[]>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.StageRepository = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
18
|
+
const typeorm_2 = require("typeorm");
|
|
19
|
+
const stage_entity_1 = require("../entity/stage.entity");
|
|
20
|
+
let StageRepository = class StageRepository {
|
|
21
|
+
constructor(stageRepository) {
|
|
22
|
+
this.stageRepository = stageRepository;
|
|
23
|
+
}
|
|
24
|
+
async getAllStage(stage_group_id, level_id, level_type) {
|
|
25
|
+
if (!stage_group_id) {
|
|
26
|
+
throw new common_1.BadRequestException('stage_group_id is required');
|
|
27
|
+
}
|
|
28
|
+
const result = await this.stageRepository.find({
|
|
29
|
+
where: {
|
|
30
|
+
stage_group_id,
|
|
31
|
+
level_id,
|
|
32
|
+
level_type,
|
|
33
|
+
},
|
|
34
|
+
order: {
|
|
35
|
+
sequence: 'ASC',
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
if (!result || result.length === 0) {
|
|
39
|
+
throw new common_1.NotFoundException('No stage found for the given stage group ID');
|
|
40
|
+
}
|
|
41
|
+
return result;
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
exports.StageRepository = StageRepository;
|
|
45
|
+
exports.StageRepository = StageRepository = __decorate([
|
|
46
|
+
(0, common_1.Injectable)(),
|
|
47
|
+
__param(0, (0, typeorm_1.InjectRepository)(stage_entity_1.Stage)),
|
|
48
|
+
__metadata("design:paramtypes", [typeorm_2.Repository])
|
|
49
|
+
], StageRepository);
|
|
50
|
+
//# sourceMappingURL=stage.repository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stage.repository.js","sourceRoot":"","sources":["../../../../src/module/workflow/repository/stage.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAKwB;AAExB,6CAAmD;AACnD,qCAAqC;AACrC,yDAA+C;AAGxC,IAAM,eAAe,GAArB,MAAM,eAAe;IAC1B,YAEmB,eAAkC;QAAlC,oBAAe,GAAf,eAAe,CAAmB;IAClD,CAAC;IAEJ,KAAK,CAAC,WAAW,CACf,cAAsB,EACtB,QAAgB,EAChB,UAAkB;QAElB,IAAI,CAAC,cAAc,EAAE,CAAC;YACpB,MAAM,IAAI,4BAAmB,CAAC,4BAA4B,CAAC,CAAC;QAC9D,CAAC;QAED,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC;YAC7C,KAAK,EAAE;gBACL,cAAc;gBACd,QAAQ;gBACR,UAAU;aACX;YACD,KAAK,EAAE;gBACL,QAAQ,EAAE,KAAK;aAChB;SACF,CAAC,CAAC;QAEH,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACnC,MAAM,IAAI,0BAAiB,CACzB,6CAA6C,CAC9C,CAAC;QACJ,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAA;AAlCY,0CAAe;0BAAf,eAAe;IAD3B,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,0BAAgB,EAAC,oBAAK,CAAC,CAAA;qCACU,oBAAU;GAHnC,eAAe,CAkC3B"}
|
|
@@ -5,5 +5,8 @@ import { DataSource, EntityManager } from 'typeorm';
|
|
|
5
5
|
export declare class ActionService extends EntityServiceImpl {
|
|
6
6
|
private readonly dataSource;
|
|
7
7
|
constructor(dataSource: DataSource);
|
|
8
|
+
getEntityData(entityType: string, id: number, loggedInUser: any): Promise<any>;
|
|
8
9
|
createEntity(entityData: BaseEntity, loggedInUser: UserData | null, manager?: EntityManager | null, appcode?: string): Promise<any>;
|
|
10
|
+
updateEntity(entityData: BaseEntity, loggedInUser: UserData): Promise<any>;
|
|
11
|
+
deleteEntity(entityType: string, id: number, loggedInUser: UserData): Promise<any>;
|
|
9
12
|
}
|