rez_core 2.1.138 → 2.1.140
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/filter/controller/filter.controller.d.ts +1 -1
- package/dist/module/filter/controller/filter.controller.js +7 -4
- package/dist/module/filter/controller/filter.controller.js.map +1 -1
- package/dist/module/filter/dto/filter-request.dto.d.ts +1 -0
- package/dist/module/filter/service/filter.service.js +23 -2
- package/dist/module/filter/service/filter.service.js.map +1 -1
- 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 +10 -0
- package/dist/module/workflow/controller/stage-group.controller.js +43 -0
- package/dist/module/workflow/controller/stage-group.controller.js.map +1 -0
- package/dist/module/workflow/controller/stage.controller.d.ts +10 -0
- package/dist/module/workflow/controller/stage.controller.js +43 -0
- package/dist/module/workflow/controller/stage.controller.js.map +1 -0
- package/dist/module/workflow/controller/workflow.controller.d.ts +18 -9
- package/dist/module/workflow/controller/workflow.controller.js +25 -13
- 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/entity/workflow.entity.d.ts +3 -0
- package/dist/module/workflow/entity/workflow.entity.js +12 -0
- package/dist/module/workflow/entity/workflow.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/repository/workflow.repository.d.ts +9 -1
- package/dist/module/workflow/repository/workflow.repository.js +38 -6
- package/dist/module/workflow/repository/workflow.repository.js.map +1 -1
- package/dist/module/workflow/service/action.service.d.ts +2 -0
- package/dist/module/workflow/service/action.service.js +39 -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 +8 -0
- package/dist/module/workflow/service/stage-group.service.js +19 -1
- package/dist/module/workflow/service/stage-group.service.js.map +1 -1
- package/dist/module/workflow/service/stage.service.d.ts +7 -5
- package/dist/module/workflow/service/stage.service.js +12 -18
- package/dist/module/workflow/service/stage.service.js.map +1 -1
- package/dist/module/workflow/service/workflow.service.d.ts +22 -3
- package/dist/module/workflow/service/workflow.service.js +65 -39
- package/dist/module/workflow/service/workflow.service.js.map +1 -1
- package/dist/module/workflow/workflow.module.js +22 -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/filter/controller/filter.controller.ts +10 -4
- package/src/module/filter/dto/filter-request.dto.ts +1 -0
- package/src/module/filter/service/filter.service.ts +34 -2
- package/src/module/workflow/controller/comm-template.controller.ts +31 -0
- package/src/module/workflow/controller/stage-group.controller.ts +33 -0
- package/src/module/workflow/controller/stage.controller.ts +33 -0
- package/src/module/workflow/controller/workflow.controller.ts +18 -11
- 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/entity/workflow.entity.ts +9 -0
- 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/repository/workflow.repository.ts +40 -2
- package/src/module/workflow/service/action.service.ts +85 -14
- package/src/module/workflow/service/comm-template.service.ts +21 -2
- package/src/module/workflow/service/stage-group.service.ts +35 -2
- package/src/module/workflow/service/stage.service.ts +24 -33
- package/src/module/workflow/service/workflow.service.ts +100 -47
- package/src/module/workflow/workflow.module.ts +23 -2
|
@@ -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"}
|
|
@@ -24,6 +24,18 @@ __decorate([
|
|
|
24
24
|
(0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
|
|
25
25
|
__metadata("design:type", String)
|
|
26
26
|
], Workflow.prototype, "mapped_entity_type", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({ type: 'boolean', nullable: true }),
|
|
29
|
+
__metadata("design:type", Boolean)
|
|
30
|
+
], Workflow.prototype, "is_default", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typeorm_1.Column)({ type: 'boolean', nullable: true }),
|
|
33
|
+
__metadata("design:type", Boolean)
|
|
34
|
+
], Workflow.prototype, "is_factory", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
37
|
+
__metadata("design:type", Number)
|
|
38
|
+
], Workflow.prototype, "sequence", void 0);
|
|
27
39
|
exports.Workflow = Workflow = __decorate([
|
|
28
40
|
(0, typeorm_1.Entity)({ name: 'cr_workflow' }),
|
|
29
41
|
__metadata("design:paramtypes", [])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow.entity.js","sourceRoot":"","sources":["../../../../src/module/workflow/entity/workflow.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uEAAwD;AACxD,6EAAuE;AACvE,qCAAyC;AAGlC,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,+BAAU;IACtC;QACE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,WAAW,GAAG,0BAAQ,CAAC;IAC9B,CAAC;
|
|
1
|
+
{"version":3,"file":"workflow.entity.js","sourceRoot":"","sources":["../../../../src/module/workflow/entity/workflow.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uEAAwD;AACxD,6EAAuE;AACvE,qCAAyC;AAGlC,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,+BAAU;IACtC;QACE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,WAAW,GAAG,0BAAQ,CAAC;IAC9B,CAAC;CAaF,CAAA;AAjBY,4BAAQ;AAOnB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;oDACjB;AAG3B;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACxB;AAGpB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACxB;AAGpB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACvB;mBAhBN,QAAQ;IADpB,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;;GACnB,QAAQ,CAiBpB"}
|
|
@@ -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"}
|
|
@@ -1,2 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import { Workflow } from '../entity/workflow.entity';
|
|
2
|
+
import { Repository } from 'typeorm';
|
|
3
|
+
export declare class WorkflowRepository {
|
|
4
|
+
private readonly workflowRepository;
|
|
5
|
+
constructor(workflowRepository: Repository<Workflow>);
|
|
6
|
+
getAllWorkflowsByFilters(entity_type: string, level_id: string, level_type: string): Promise<Workflow[]>;
|
|
7
|
+
deleteWorkflowById(id: number): Promise<{
|
|
8
|
+
message: string;
|
|
9
|
+
}>;
|
|
2
10
|
}
|
|
@@ -5,13 +5,45 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
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
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
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
|
+
};
|
|
8
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.
|
|
15
|
+
exports.WorkflowRepository = void 0;
|
|
10
16
|
const common_1 = require("@nestjs/common");
|
|
11
|
-
|
|
17
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
18
|
+
const workflow_entity_1 = require("../entity/workflow.entity");
|
|
19
|
+
const typeorm_2 = require("typeorm");
|
|
20
|
+
let WorkflowRepository = class WorkflowRepository {
|
|
21
|
+
constructor(workflowRepository) {
|
|
22
|
+
this.workflowRepository = workflowRepository;
|
|
23
|
+
}
|
|
24
|
+
async getAllWorkflowsByFilters(entity_type, level_id, level_type) {
|
|
25
|
+
return this.workflowRepository.find({
|
|
26
|
+
where: {
|
|
27
|
+
mapped_entity_type: entity_type,
|
|
28
|
+
level_id,
|
|
29
|
+
level_type,
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
async deleteWorkflowById(id) {
|
|
34
|
+
const result = await this.workflowRepository.delete(id);
|
|
35
|
+
if (result.affected === 0) {
|
|
36
|
+
throw new common_1.NotFoundException(`Workflow with ID ${id} not found`);
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
message: `Workflow has been successfully deleted.`,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
12
42
|
};
|
|
13
|
-
exports.
|
|
14
|
-
exports.
|
|
15
|
-
(0, common_1.Injectable)()
|
|
16
|
-
|
|
43
|
+
exports.WorkflowRepository = WorkflowRepository;
|
|
44
|
+
exports.WorkflowRepository = WorkflowRepository = __decorate([
|
|
45
|
+
(0, common_1.Injectable)(),
|
|
46
|
+
__param(0, (0, typeorm_1.InjectRepository)(workflow_entity_1.Workflow)),
|
|
47
|
+
__metadata("design:paramtypes", [typeorm_2.Repository])
|
|
48
|
+
], WorkflowRepository);
|
|
17
49
|
//# sourceMappingURL=workflow.repository.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow.repository.js","sourceRoot":"","sources":["../../../../src/module/workflow/repository/workflow.repository.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"workflow.repository.js","sourceRoot":"","sources":["../../../../src/module/workflow/repository/workflow.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA+D;AAC/D,6CAAmD;AACnD,+DAAqD;AACrD,qCAAqC;AAG9B,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAC7B,YAEmB,kBAAwC;QAAxC,uBAAkB,GAAlB,kBAAkB,CAAsB;IACxD,CAAC;IAMJ,KAAK,CAAC,wBAAwB,CAC5B,WAAmB,EACnB,QAAgB,EAChB,UAAkB;QAElB,OAAO,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC;YAClC,KAAK,EAAE;gBACL,kBAAkB,EAAE,WAAW;gBAC/B,QAAQ;gBACR,UAAU;aACX;SACF,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,kBAAkB,CAAC,EAAU;QACjC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QAExD,IAAI,MAAM,CAAC,QAAQ,KAAK,CAAC,EAAE,CAAC;YAC1B,MAAM,IAAI,0BAAiB,CAAC,oBAAoB,EAAE,YAAY,CAAC,CAAC;QAClE,CAAC;QAED,OAAO;YACL,OAAO,EAAE,yCAAyC;SACnD,CAAC;IACJ,CAAC;CACF,CAAA;AAnCY,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,0BAAgB,EAAC,0BAAQ,CAAC,CAAA;qCACU,oBAAU;GAHtC,kBAAkB,CAmC9B"}
|
|
@@ -5,5 +5,7 @@ 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>;
|
|
9
11
|
}
|
|
@@ -18,6 +18,15 @@ let ActionService = class ActionService extends entity_service_impl_service_1.En
|
|
|
18
18
|
super();
|
|
19
19
|
this.dataSource = dataSource;
|
|
20
20
|
}
|
|
21
|
+
async getEntityData(entityType, id, loggedInUser) {
|
|
22
|
+
const actionData = await super.getEntityData(entityType, id, loggedInUser);
|
|
23
|
+
if (!actionData) {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
const template = await this.dataSource.query(`SELECT template_code FROM cr_wf_action_template_mapping WHERE stg_act_mapping_id =
|
|
27
|
+
(SELECT id FROM cr_wf_stage_action_mapping WHERE action_id = ? AND entity_type = 'STGM')`, [actionData.id]);
|
|
28
|
+
return { ...actionData, template: template.map((t) => t.template_code) };
|
|
29
|
+
}
|
|
21
30
|
async createEntity(entityData, loggedInUser, manager, appcode) {
|
|
22
31
|
console.log('entityData', entityData);
|
|
23
32
|
let actionData = entityData;
|
|
@@ -31,13 +40,7 @@ let ActionService = class ActionService extends entity_service_impl_service_1.En
|
|
|
31
40
|
if (Array.isArray(actionData.template) && actionData.template.length > 0) {
|
|
32
41
|
const templates = actionData.template;
|
|
33
42
|
for (let i = 0; i < templates.length; i++) {
|
|
34
|
-
const
|
|
35
|
-
const templateResult = await this.dataSource.query(`SELECT code FROM cr_wf_comm_template WHERE id = ?`, [templateId]);
|
|
36
|
-
if (templateResult.length === 0) {
|
|
37
|
-
console.warn(`Template not found for id: ${templateId}`);
|
|
38
|
-
continue;
|
|
39
|
-
}
|
|
40
|
-
const templateCode = templateResult[0].code;
|
|
43
|
+
const templateCode = templates[i];
|
|
41
44
|
const actionTemplateMapping = {
|
|
42
45
|
stg_act_mapping_id: stageActionMappingData.id,
|
|
43
46
|
template_code: templateCode,
|
|
@@ -48,6 +51,35 @@ let ActionService = class ActionService extends entity_service_impl_service_1.En
|
|
|
48
51
|
}
|
|
49
52
|
return actionData;
|
|
50
53
|
}
|
|
54
|
+
async updateEntity(entityData, loggedInUser) {
|
|
55
|
+
console.log('entityData', entityData);
|
|
56
|
+
const { template, stage_id, ...actionData } = entityData;
|
|
57
|
+
let action = await super.updateEntity(actionData, loggedInUser);
|
|
58
|
+
if (!action) {
|
|
59
|
+
throw new Error('Action not found or could not be updated');
|
|
60
|
+
}
|
|
61
|
+
const stageMapID = await this.dataSource.query(`SELECT id FROM cr_wf_stage_action_mapping WHERE action_id = ? AND entity_type = 'STGM'`, [action.id]);
|
|
62
|
+
let stageActionMapping = {
|
|
63
|
+
action_id: action.id,
|
|
64
|
+
stage_id: stage_id,
|
|
65
|
+
entity_type: 'STGM',
|
|
66
|
+
id: stageMapID.length > 0 ? stageMapID[0].id : null,
|
|
67
|
+
};
|
|
68
|
+
let stageActionMappingData = await super.updateEntity(stageActionMapping, loggedInUser);
|
|
69
|
+
if (Array.isArray(template) && template.length > 0) {
|
|
70
|
+
for (let i = 0; i < template.length; i++) {
|
|
71
|
+
const templateCode = template[i];
|
|
72
|
+
await this.dataSource.query(`DELETE FROM cr_wf_action_template_mapping WHERE stg_act_mapping_id = ? AND template_code = ?`, [stageActionMappingData.id, templateCode]);
|
|
73
|
+
const actionTemplateMapping = {
|
|
74
|
+
stg_act_mapping_id: stageActionMappingData.id,
|
|
75
|
+
template_code: templateCode,
|
|
76
|
+
entity_type: 'ATMP',
|
|
77
|
+
};
|
|
78
|
+
await super.createEntity(actionTemplateMapping, loggedInUser);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return action;
|
|
82
|
+
}
|
|
51
83
|
};
|
|
52
84
|
exports.ActionService = ActionService;
|
|
53
85
|
exports.ActionService = ActionService = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action.service.js","sourceRoot":"","sources":["../../../../src/module/workflow/service/action.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAE5C,gGAAwF;AAExF,qCAAoD;
|
|
1
|
+
{"version":3,"file":"action.service.js","sourceRoot":"","sources":["../../../../src/module/workflow/service/action.service.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare class CommTemplateService
|
|
1
|
+
import { CommTemplateRepository } from '../repository/comm-template.repository';
|
|
2
|
+
export declare class CommTemplateService {
|
|
3
|
+
private readonly commTemplateRepository;
|
|
4
|
+
constructor(commTemplateRepository: CommTemplateRepository);
|
|
5
|
+
getAllCommTemplate(entity_type: string, loggedInUser: any): Promise<{
|
|
6
|
+
label: string;
|
|
7
|
+
value: string;
|
|
8
|
+
}[]>;
|
|
3
9
|
}
|
|
@@ -5,14 +5,29 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
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
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
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
|
+
};
|
|
8
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
12
|
exports.CommTemplateService = void 0;
|
|
10
13
|
const common_1 = require("@nestjs/common");
|
|
11
|
-
const
|
|
12
|
-
let CommTemplateService = class CommTemplateService
|
|
14
|
+
const comm_template_repository_1 = require("../repository/comm-template.repository");
|
|
15
|
+
let CommTemplateService = class CommTemplateService {
|
|
16
|
+
constructor(commTemplateRepository) {
|
|
17
|
+
this.commTemplateRepository = commTemplateRepository;
|
|
18
|
+
}
|
|
19
|
+
async getAllCommTemplate(entity_type, loggedInUser) {
|
|
20
|
+
const commTemplateData = await this.commTemplateRepository.getAllCommTemplate(entity_type, loggedInUser);
|
|
21
|
+
const response = commTemplateData.map((item) => ({
|
|
22
|
+
label: item.name,
|
|
23
|
+
value: item.code,
|
|
24
|
+
}));
|
|
25
|
+
return response;
|
|
26
|
+
}
|
|
13
27
|
};
|
|
14
28
|
exports.CommTemplateService = CommTemplateService;
|
|
15
29
|
exports.CommTemplateService = CommTemplateService = __decorate([
|
|
16
|
-
(0, common_1.Injectable)()
|
|
30
|
+
(0, common_1.Injectable)(),
|
|
31
|
+
__metadata("design:paramtypes", [comm_template_repository_1.CommTemplateRepository])
|
|
17
32
|
], CommTemplateService);
|
|
18
33
|
//# sourceMappingURL=comm-template.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comm-template.service.js","sourceRoot":"","sources":["../../../../src/module/workflow/service/comm-template.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"comm-template.service.js","sourceRoot":"","sources":["../../../../src/module/workflow/service/comm-template.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,qFAAgF;AAGzE,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAC9B,YACmB,sBAA8C;QAA9C,2BAAsB,GAAtB,sBAAsB,CAAwB;IAC9D,CAAC;IAEJ,KAAK,CAAC,kBAAkB,CAAC,WAAmB,EAAE,YAAY;QACxD,MAAM,gBAAgB,GACpB,MAAM,IAAI,CAAC,sBAAsB,CAAC,kBAAkB,CAClD,WAAW,EACX,YAAY,CACb,CAAC;QAEJ,MAAM,QAAQ,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YAC/C,KAAK,EAAE,IAAI,CAAC,IAAI;YAChB,KAAK,EAAE,IAAI,CAAC,IAAI;SACjB,CAAC,CAAC,CAAC;QAEJ,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF,CAAA;AAnBY,kDAAmB;8BAAnB,mBAAmB;IAD/B,IAAA,mBAAU,GAAE;qCAGgC,iDAAsB;GAFtD,mBAAmB,CAmB/B"}
|
|
@@ -1,3 +1,11 @@
|
|
|
1
1
|
import { EntityServiceImpl } from 'src/module/meta/service/entity-service-impl.service';
|
|
2
|
+
import { StageGroupRepository } from '../repository/stage-group.repository';
|
|
3
|
+
import { BaseEntity } from 'src/module/meta/entity/base-entity.entity';
|
|
4
|
+
import { UserData } from 'src/module/user/entity/user.entity';
|
|
2
5
|
export declare class StageGroupService extends EntityServiceImpl {
|
|
6
|
+
private readonly stageGroupRepository;
|
|
7
|
+
constructor(stageGroupRepository: StageGroupRepository);
|
|
8
|
+
getAllStageGroup(workflow_id: number, level_id: string, level_type: string): Promise<import("../entity/stage-group.entity").StageGroup[]>;
|
|
9
|
+
updateEntity(entityData: BaseEntity, loggedInUser: UserData): Promise<any>;
|
|
10
|
+
getEntityData(entityType: string, id: number, loggedInUser?: UserData): Promise<BaseEntity | null>;
|
|
3
11
|
}
|
|
@@ -5,14 +5,32 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
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
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
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
|
+
};
|
|
8
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
12
|
exports.StageGroupService = void 0;
|
|
10
13
|
const common_1 = require("@nestjs/common");
|
|
11
14
|
const entity_service_impl_service_1 = require("../../meta/service/entity-service-impl.service");
|
|
15
|
+
const stage_group_repository_1 = require("../repository/stage-group.repository");
|
|
12
16
|
let StageGroupService = class StageGroupService extends entity_service_impl_service_1.EntityServiceImpl {
|
|
17
|
+
constructor(stageGroupRepository) {
|
|
18
|
+
super();
|
|
19
|
+
this.stageGroupRepository = stageGroupRepository;
|
|
20
|
+
}
|
|
21
|
+
async getAllStageGroup(workflow_id, level_id, level_type) {
|
|
22
|
+
return await this.stageGroupRepository.getAllStageGroup(workflow_id, level_id, level_type);
|
|
23
|
+
}
|
|
24
|
+
async updateEntity(entityData, loggedInUser) {
|
|
25
|
+
return await super.updateEntity(entityData, loggedInUser);
|
|
26
|
+
}
|
|
27
|
+
async getEntityData(entityType, id, loggedInUser) {
|
|
28
|
+
return await super.getEntityData(entityType, id, loggedInUser);
|
|
29
|
+
}
|
|
13
30
|
};
|
|
14
31
|
exports.StageGroupService = StageGroupService;
|
|
15
32
|
exports.StageGroupService = StageGroupService = __decorate([
|
|
16
|
-
(0, common_1.Injectable)()
|
|
33
|
+
(0, common_1.Injectable)(),
|
|
34
|
+
__metadata("design:paramtypes", [stage_group_repository_1.StageGroupRepository])
|
|
17
35
|
], StageGroupService);
|
|
18
36
|
//# 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":"
|
|
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;AAKrE,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,+CAAiB;IACtD,YAA6B,oBAA0C;QACrE,KAAK,EAAE,CAAC;QADmB,yBAAoB,GAApB,oBAAoB,CAAsB;IAEvE,CAAC;IACD,KAAK,CAAC,gBAAgB,CACpB,WAAmB,EACnB,QAAgB,EAChB,UAAkB;QAElB,OAAO,MAAM,IAAI,CAAC,oBAAoB,CAAC,gBAAgB,CACrD,WAAW,EACX,QAAQ,EACR,UAAU,CACX,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,YAAY,CAChB,UAAsB,EACtB,YAAsB;QAEtB,OAAO,MAAM,KAAK,CAAC,YAAY,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;IAC5D,CAAC;IAED,KAAK,CAAC,aAAa,CACjB,UAAkB,EAClB,EAAU,EACV,YAAuB;QAEvB,OAAO,MAAM,KAAK,CAAC,aAAa,CAAC,UAAU,EAAE,EAAE,EAAE,YAAY,CAAC,CAAC;IACjE,CAAC;CACF,CAAA;AA9BY,8CAAiB;4BAAjB,iBAAiB;IAD7B,IAAA,mBAAU,GAAE;qCAEwC,6CAAoB;GAD5D,iBAAiB,CA8B7B"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { BaseEntity } from 'src/module/meta/entity/base-entity.entity';
|
|
2
1
|
import { EntityServiceImpl } from 'src/module/meta/service/entity-service-impl.service';
|
|
2
|
+
import { BaseEntity } from 'src/module/meta/entity/base-entity.entity';
|
|
3
3
|
import { UserData } from 'src/module/user/entity/user.entity';
|
|
4
|
-
import {
|
|
4
|
+
import { StageRepository } from '../repository/stage.repository';
|
|
5
5
|
export declare class StageService extends EntityServiceImpl {
|
|
6
|
-
private readonly
|
|
7
|
-
constructor(
|
|
8
|
-
|
|
6
|
+
private readonly stageRepository;
|
|
7
|
+
constructor(stageRepository: StageRepository);
|
|
8
|
+
getAllStage(stage_group_id: number, level_id: string, level_type: string): Promise<import("../entity/stage.entity").Stage[]>;
|
|
9
|
+
updateEntity(entityData: BaseEntity, loggedInUser: UserData): Promise<any>;
|
|
10
|
+
getEntityData(entityType: string, id: number, loggedInUser?: UserData): Promise<BaseEntity | null>;
|
|
9
11
|
}
|
|
@@ -12,31 +12,25 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.StageService = void 0;
|
|
13
13
|
const common_1 = require("@nestjs/common");
|
|
14
14
|
const entity_service_impl_service_1 = require("../../meta/service/entity-service-impl.service");
|
|
15
|
-
const
|
|
15
|
+
const stage_repository_1 = require("../repository/stage.repository");
|
|
16
16
|
let StageService = class StageService extends entity_service_impl_service_1.EntityServiceImpl {
|
|
17
|
-
constructor(
|
|
17
|
+
constructor(stageRepository) {
|
|
18
18
|
super();
|
|
19
|
-
this.
|
|
19
|
+
this.stageRepository = stageRepository;
|
|
20
20
|
}
|
|
21
|
-
async
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
if (stageGroupName && stageData.name) {
|
|
31
|
-
stageData.full_name = `${stageGroupName}-${stageData.name}`;
|
|
32
|
-
}
|
|
33
|
-
const savedStage = await super.createEntity(stageData, loggedInUser, manager, appcode);
|
|
34
|
-
return savedStage;
|
|
21
|
+
async getAllStage(stage_group_id, level_id, level_type) {
|
|
22
|
+
return await this.stageRepository.getAllStage(stage_group_id, level_id, level_type);
|
|
23
|
+
}
|
|
24
|
+
async updateEntity(entityData, loggedInUser) {
|
|
25
|
+
return await super.updateEntity(entityData, loggedInUser);
|
|
26
|
+
}
|
|
27
|
+
async getEntityData(entityType, id, loggedInUser) {
|
|
28
|
+
return await super.getEntityData(entityType, id, loggedInUser);
|
|
35
29
|
}
|
|
36
30
|
};
|
|
37
31
|
exports.StageService = StageService;
|
|
38
32
|
exports.StageService = StageService = __decorate([
|
|
39
33
|
(0, common_1.Injectable)(),
|
|
40
|
-
__metadata("design:paramtypes", [
|
|
34
|
+
__metadata("design:paramtypes", [stage_repository_1.StageRepository])
|
|
41
35
|
], StageService);
|
|
42
36
|
//# sourceMappingURL=stage.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stage.service.js","sourceRoot":"","sources":["../../../../src/module/workflow/service/stage.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;
|
|
1
|
+
{"version":3,"file":"stage.service.js","sourceRoot":"","sources":["../../../../src/module/workflow/service/stage.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,gGAAwF;AAGxF,qEAAiE;AAG1D,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,+CAAiB;IACjD,YAA6B,eAAgC;QAC3D,KAAK,EAAE,CAAC;QADmB,oBAAe,GAAf,eAAe,CAAiB;IAE7D,CAAC;IACD,KAAK,CAAC,WAAW,CACf,cAAsB,EACtB,QAAgB,EAChB,UAAkB;QAElB,OAAO,MAAM,IAAI,CAAC,eAAe,CAAC,WAAW,CAC3C,cAAc,EACd,QAAQ,EACR,UAAU,CACX,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,YAAY,CAChB,UAAsB,EACtB,YAAsB;QAEtB,OAAO,MAAM,KAAK,CAAC,YAAY,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;IAC5D,CAAC;IAED,KAAK,CAAC,aAAa,CACjB,UAAkB,EAClB,EAAU,EACV,YAAuB;QAEvB,OAAO,MAAM,KAAK,CAAC,aAAa,CAAC,UAAU,EAAE,EAAE,EAAE,YAAY,CAAC,CAAC;IACjE,CAAC;CACF,CAAA;AA9BY,oCAAY;uBAAZ,YAAY;IADxB,IAAA,mBAAU,GAAE;qCAEmC,kCAAe;GADlD,YAAY,CA8BxB"}
|
|
@@ -1,9 +1,28 @@
|
|
|
1
1
|
import { EntityServiceImpl } from 'src/module/meta/service/entity-service-impl.service';
|
|
2
2
|
import { DataSource } from 'typeorm';
|
|
3
|
+
import { WorkflowRepository } from '../repository/workflow.repository';
|
|
4
|
+
import { BaseEntity } from 'src/module/meta/entity/base-entity.entity';
|
|
5
|
+
import { UserData } from 'src/module/user/entity/user.entity';
|
|
6
|
+
import { ListMasterService } from 'src/module/listmaster/service/list-master.service';
|
|
7
|
+
import { Workflow } from '../entity/workflow.entity';
|
|
3
8
|
export declare class WorkflowService extends EntityServiceImpl {
|
|
4
9
|
private readonly dataSource;
|
|
5
|
-
|
|
6
|
-
|
|
10
|
+
private readonly workflowRepository;
|
|
11
|
+
private readonly listMasterService;
|
|
12
|
+
constructor(dataSource: DataSource, workflowRepository: WorkflowRepository, listMasterService: ListMasterService);
|
|
13
|
+
getAllWorkflows(entity_type: string, level_id: string, level_type: string): Promise<Workflow[]>;
|
|
7
14
|
getWorkflowById(id: number): Promise<any>;
|
|
8
|
-
|
|
15
|
+
updateEntity(entityData: BaseEntity, loggedInUser: UserData): Promise<any>;
|
|
16
|
+
deleteWorkflowById(id: number): Promise<{
|
|
17
|
+
message: string;
|
|
18
|
+
}>;
|
|
19
|
+
updateSequence(body: any[], loggedInUser: any): Promise<{
|
|
20
|
+
updated: number;
|
|
21
|
+
results: {
|
|
22
|
+
id: any;
|
|
23
|
+
success: boolean;
|
|
24
|
+
result?: any;
|
|
25
|
+
error?: string;
|
|
26
|
+
}[];
|
|
27
|
+
}>;
|
|
9
28
|
}
|