rez_core 2.1.144 → 2.1.147
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/constant/global.constant.d.ts +1 -0
- package/dist/constant/global.constant.js +2 -1
- package/dist/constant/global.constant.js.map +1 -1
- package/dist/module/enterprise/repository/school.repository.js +18 -2
- package/dist/module/enterprise/repository/school.repository.js.map +1 -1
- package/dist/module/layout_preference/controller/layout_preference.controller.js +2 -2
- package/dist/module/layout_preference/controller/layout_preference.controller.js.map +1 -1
- package/dist/module/layout_preference/entity/layout_preference.entity.d.ts +2 -0
- package/dist/module/layout_preference/entity/layout_preference.entity.js +13 -0
- package/dist/module/layout_preference/entity/layout_preference.entity.js.map +1 -1
- package/dist/module/layout_preference/repository/layout_preference.repository.d.ts +1 -1
- package/dist/module/layout_preference/repository/layout_preference.repository.js +4 -2
- package/dist/module/layout_preference/repository/layout_preference.repository.js.map +1 -1
- package/dist/module/layout_preference/service/layout_preference.service.d.ts +1 -1
- package/dist/module/layout_preference/service/layout_preference.service.js +10 -4
- package/dist/module/layout_preference/service/layout_preference.service.js.map +1 -1
- package/dist/module/meta/controller/media.controller.d.ts +1 -1
- package/dist/module/meta/controller/media.controller.js +1 -1
- package/dist/module/meta/controller/media.controller.js.map +1 -1
- package/dist/module/workflow/controller/action-category.controller.d.ts +8 -0
- package/dist/module/workflow/controller/action-category.controller.js +45 -0
- package/dist/module/workflow/controller/action-category.controller.js.map +1 -0
- package/dist/module/workflow/controller/action.controller.d.ts +3 -0
- package/dist/module/workflow/controller/action.controller.js +14 -0
- package/dist/module/workflow/controller/action.controller.js.map +1 -1
- package/dist/module/workflow/controller/comm-template.controller.d.ts +2 -2
- package/dist/module/workflow/controller/comm-template.controller.js +4 -4
- package/dist/module/workflow/controller/comm-template.controller.js.map +1 -1
- package/dist/module/workflow/controller/entity-modification.controller.d.ts +8 -0
- package/dist/module/workflow/controller/entity-modification.controller.js +44 -0
- package/dist/module/workflow/controller/entity-modification.controller.js.map +1 -0
- package/dist/module/workflow/controller/workflow-meta.controller.d.ts +9 -0
- package/dist/module/workflow/controller/workflow-meta.controller.js +63 -0
- package/dist/module/workflow/controller/workflow-meta.controller.js.map +1 -0
- package/dist/module/workflow/controller/workflow.controller.d.ts +9 -1
- package/dist/module/workflow/controller/workflow.controller.js +17 -2
- package/dist/module/workflow/controller/workflow.controller.js.map +1 -1
- package/dist/module/workflow/entity/action-category.entity.d.ts +1 -0
- package/dist/module/workflow/entity/action-category.entity.js +4 -0
- package/dist/module/workflow/entity/action-category.entity.js.map +1 -1
- package/dist/module/workflow/entity/action.entity.d.ts +1 -0
- package/dist/module/workflow/entity/action.entity.js +4 -0
- package/dist/module/workflow/entity/action.entity.js.map +1 -1
- package/dist/module/workflow/entity/comm-template.entity.d.ts +5 -0
- package/dist/module/workflow/entity/comm-template.entity.js +21 -1
- package/dist/module/workflow/entity/comm-template.entity.js.map +1 -1
- package/dist/module/workflow/entity/entity-modification.entity.d.ts +13 -0
- package/dist/module/workflow/entity/entity-modification.entity.js +63 -0
- package/dist/module/workflow/entity/entity-modification.entity.js.map +1 -0
- package/dist/module/workflow/entity/stage-movement-data.entity.d.ts +2 -0
- package/dist/module/workflow/entity/stage-movement-data.entity.js +8 -0
- package/dist/module/workflow/entity/stage-movement-data.entity.js.map +1 -1
- package/dist/module/workflow/entity/template-attach-mapper.entity.d.ts +11 -0
- package/dist/module/workflow/entity/template-attach-mapper.entity.js +54 -0
- package/dist/module/workflow/entity/template-attach-mapper.entity.js.map +1 -0
- package/dist/module/workflow/repository/comm-template.repository.d.ts +8 -2
- package/dist/module/workflow/repository/comm-template.repository.js +37 -6
- package/dist/module/workflow/repository/comm-template.repository.js.map +1 -1
- package/dist/module/workflow/service/action-category.service.d.ts +5 -0
- package/dist/module/workflow/service/action-category.service.js +20 -1
- package/dist/module/workflow/service/action-category.service.js.map +1 -1
- package/dist/module/workflow/service/action.service.d.ts +1 -0
- package/dist/module/workflow/service/action.service.js +72 -0
- package/dist/module/workflow/service/action.service.js.map +1 -1
- package/dist/module/workflow/service/comm-template.service.d.ts +4 -1
- package/dist/module/workflow/service/comm-template.service.js +38 -1
- package/dist/module/workflow/service/comm-template.service.js.map +1 -1
- package/dist/module/workflow/service/entity-modification.service.d.ts +8 -0
- package/dist/module/workflow/service/entity-modification.service.js +52 -0
- package/dist/module/workflow/service/entity-modification.service.js.map +1 -0
- package/dist/module/workflow/service/populate-workflow.service.d.ts +21 -0
- package/dist/module/workflow/service/populate-workflow.service.js +124 -0
- package/dist/module/workflow/service/populate-workflow.service.js.map +1 -0
- package/dist/module/workflow/service/workflow-list-master.service.js +3 -3
- package/dist/module/workflow/service/workflow-meta.service.d.ts +9 -0
- package/dist/module/workflow/service/workflow-meta.service.js +81 -0
- package/dist/module/workflow/service/workflow-meta.service.js.map +1 -0
- package/dist/module/workflow/workflow.module.js +48 -23
- package/dist/module/workflow/workflow.module.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/constant/global.constant.ts +2 -0
- package/src/module/enterprise/repository/school.repository.ts +23 -2
- package/src/module/layout_preference/controller/layout_preference.controller.ts +4 -2
- package/src/module/layout_preference/entity/layout_preference.entity.ts +11 -0
- package/src/module/layout_preference/repository/layout_preference.repository.ts +6 -2
- package/src/module/layout_preference/service/layout_preference.service.ts +24 -6
- package/src/module/meta/controller/media.controller.ts +5 -7
- package/src/module/workflow/controller/action-category.controller.ts +35 -0
- package/src/module/workflow/controller/action.controller.ts +11 -0
- package/src/module/workflow/controller/comm-template.controller.ts +5 -4
- package/src/module/workflow/controller/entity-modification.controller.ts +35 -0
- package/src/module/workflow/controller/workflow-meta.controller.ts +52 -0
- package/src/module/workflow/controller/workflow.controller.ts +14 -0
- package/src/module/workflow/entity/action-category.entity.ts +3 -0
- package/src/module/workflow/entity/action.entity.ts +3 -0
- package/src/module/workflow/entity/comm-template.entity.ts +18 -1
- package/src/module/workflow/entity/entity-modification.entity.ts +38 -0
- package/src/module/workflow/entity/stage-movement-data.entity.ts +6 -0
- package/src/module/workflow/entity/template-attach-mapper.entity.ts +30 -0
- package/src/module/workflow/repository/comm-template.repository.ts +58 -5
- package/src/module/workflow/service/action-category.service.ts +23 -1
- package/src/module/workflow/service/action-template-mapping.service.ts +1 -1
- package/src/module/workflow/service/action.service.ts +106 -0
- package/src/module/workflow/service/comm-template.service.ts +54 -1
- package/src/module/workflow/service/entity-modification.service.ts +67 -0
- package/src/module/workflow/service/populate-workflow.service.ts +189 -0
- package/src/module/workflow/service/workflow-list-master.service.ts +3 -3
- package/src/module/workflow/service/workflow-meta.service.ts +98 -0
- package/src/module/workflow/workflow.module.ts +48 -23
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { WorkflowService } from '../service/workflow.service';
|
|
2
|
+
import { PopulateWorkflowService } from '../service/populate-workflow.service';
|
|
2
3
|
export declare class WorkflowController {
|
|
3
4
|
private readonly workflowService;
|
|
4
|
-
|
|
5
|
+
private readonly populateWorkflowService;
|
|
6
|
+
constructor(workflowService: WorkflowService, populateWorkflowService: PopulateWorkflowService);
|
|
5
7
|
getAllWorkflows(req: Request & {
|
|
6
8
|
user: any;
|
|
7
9
|
}, body: {
|
|
@@ -20,4 +22,10 @@ export declare class WorkflowController {
|
|
|
20
22
|
error?: string;
|
|
21
23
|
}[];
|
|
22
24
|
}>;
|
|
25
|
+
populateWorkflow(body: any, req: Request & {
|
|
26
|
+
user: any;
|
|
27
|
+
}): Promise<{
|
|
28
|
+
message: string;
|
|
29
|
+
status: string;
|
|
30
|
+
}>;
|
|
23
31
|
}
|
|
@@ -16,9 +16,11 @@ exports.WorkflowController = void 0;
|
|
|
16
16
|
const common_1 = require("@nestjs/common");
|
|
17
17
|
const jwt_guard_1 = require("../../auth/guards/jwt.guard");
|
|
18
18
|
const workflow_service_1 = require("../service/workflow.service");
|
|
19
|
+
const populate_workflow_service_1 = require("../service/populate-workflow.service");
|
|
19
20
|
let WorkflowController = class WorkflowController {
|
|
20
|
-
constructor(workflowService) {
|
|
21
|
+
constructor(workflowService, populateWorkflowService) {
|
|
21
22
|
this.workflowService = workflowService;
|
|
23
|
+
this.populateWorkflowService = populateWorkflowService;
|
|
22
24
|
}
|
|
23
25
|
async getAllWorkflows(req, body) {
|
|
24
26
|
const { level_id, level_type } = req.user.userData;
|
|
@@ -31,6 +33,10 @@ let WorkflowController = class WorkflowController {
|
|
|
31
33
|
const loggedInUser = req.user?.userData;
|
|
32
34
|
return this.workflowService.updateSequence(body, loggedInUser);
|
|
33
35
|
}
|
|
36
|
+
async populateWorkflow(body, req) {
|
|
37
|
+
const loggedInUser = req.user?.userData;
|
|
38
|
+
return this.populateWorkflowService.populateWorkflowData(body.organization_id, loggedInUser);
|
|
39
|
+
}
|
|
34
40
|
};
|
|
35
41
|
exports.WorkflowController = WorkflowController;
|
|
36
42
|
__decorate([
|
|
@@ -59,10 +65,19 @@ __decorate([
|
|
|
59
65
|
__metadata("design:paramtypes", [Object, Object]),
|
|
60
66
|
__metadata("design:returntype", Promise)
|
|
61
67
|
], WorkflowController.prototype, "updateSequence", null);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, common_1.Post)('/populateWorkflow'),
|
|
70
|
+
__param(0, (0, common_1.Body)()),
|
|
71
|
+
__param(1, (0, common_1.Req)()),
|
|
72
|
+
__metadata("design:type", Function),
|
|
73
|
+
__metadata("design:paramtypes", [Object, Object]),
|
|
74
|
+
__metadata("design:returntype", Promise)
|
|
75
|
+
], WorkflowController.prototype, "populateWorkflow", null);
|
|
62
76
|
exports.WorkflowController = WorkflowController = __decorate([
|
|
63
77
|
(0, common_1.Controller)('/workflow'),
|
|
64
78
|
(0, common_1.UseGuards)(jwt_guard_1.JwtAuthGuard),
|
|
65
79
|
__param(0, (0, common_1.Inject)('WorkflowService')),
|
|
66
|
-
__metadata("design:paramtypes", [workflow_service_1.WorkflowService
|
|
80
|
+
__metadata("design:paramtypes", [workflow_service_1.WorkflowService,
|
|
81
|
+
populate_workflow_service_1.PopulateWorkflowService])
|
|
67
82
|
], WorkflowController);
|
|
68
83
|
//# sourceMappingURL=workflow.controller.js.map
|
|
@@ -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;AAC9D,oFAA+E;AAIxE,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAC7B,YAEmB,eAAgC,EAChC,uBAAgD;QADhD,oBAAe,GAAf,eAAe,CAAiB;QAChC,4BAAuB,GAAvB,uBAAuB,CAAyB;IAChE,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;IAKK,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;IAGK,AAAN,KAAK,CAAC,gBAAgB,CACZ,IAAS,EACV,GAA4B;QAEnC,MAAM,YAAY,GAAG,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC;QACxC,OAAO,IAAI,CAAC,uBAAuB,CAAC,oBAAoB,CACtD,IAAI,CAAC,eAAe,EACpB,YAAY,CACb,CAAC;IACJ,CAAC;CACF,CAAA;AA9CY,gDAAkB;AASvB;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;AAKK;IAFL,IAAA,aAAI,EAAC,iBAAiB,CAAC;IACvB,IAAA,iBAAQ,EAAC,mBAAU,CAAC,EAAE,CAAC;IACF,WAAA,IAAA,aAAI,GAAE,CAAA;IAAa,WAAA,IAAA,YAAG,GAAE,CAAA;;;;wDAG7C;AAGK;IADL,IAAA,aAAI,EAAC,mBAAmB,CAAC;IAEvB,WAAA,IAAA,aAAI,GAAE,CAAA;IACN,WAAA,IAAA,YAAG,GAAE,CAAA;;;;0DAOP;6BA7CU,kBAAkB;IAF9B,IAAA,mBAAU,EAAC,WAAW,CAAC;IACvB,IAAA,kBAAS,EAAC,wBAAY,CAAC;IAGnB,WAAA,IAAA,eAAM,EAAC,iBAAiB,CAAC,CAAA;qCACQ,kCAAe;QACP,mDAAuB;GAJxD,kBAAkB,CA8C9B"}
|
|
@@ -28,6 +28,10 @@ __decorate([
|
|
|
28
28
|
(0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
|
|
29
29
|
__metadata("design:type", String)
|
|
30
30
|
], ActionCategory.prototype, "modalName", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], ActionCategory.prototype, "mapped_entity_type", void 0);
|
|
31
35
|
exports.ActionCategory = ActionCategory = __decorate([
|
|
32
36
|
(0, typeorm_1.Entity)({ name: 'cr_wf_action_category' }),
|
|
33
37
|
__metadata("design:paramtypes", [])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action-category.entity.js","sourceRoot":"","sources":["../../../../src/module/workflow/entity/action-category.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uEAA+D;AAC/D,6EAAuE;AACvE,qCAAyC;AAGlC,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,+BAAU;IAC5C;QACE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,WAAW,GAAG,iCAAe,CAAC;IACrC,CAAC;
|
|
1
|
+
{"version":3,"file":"action-category.entity.js","sourceRoot":"","sources":["../../../../src/module/workflow/entity/action-category.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uEAA+D;AAC/D,6EAAuE;AACvE,qCAAyC;AAGlC,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,+BAAU;IAC5C;QACE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,WAAW,GAAG,iCAAe,CAAC;IACrC,CAAC;CAUF,CAAA;AAdY,wCAAc;AAOzB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CAC/B;AAGb;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDAC1B;AAGlB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0DACjB;yBAbhB,cAAc;IAD1B,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,uBAAuB,EAAE,CAAC;;GAC7B,cAAc,CAc1B"}
|
|
@@ -32,6 +32,10 @@ __decorate([
|
|
|
32
32
|
(0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
|
|
33
33
|
__metadata("design:type", String)
|
|
34
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, "sequence", void 0);
|
|
35
39
|
__decorate([
|
|
36
40
|
(0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
|
|
37
41
|
__metadata("design:type", String)
|
|
@@ -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,YAAY,GAAlB,MAAM,YAAa,SAAQ,+BAAU;IAC1C;QACE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,WAAW,GAAG,wBAAM,CAAC;IAC5B,CAAC;
|
|
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;CAsBF,CAAA;AA1BY,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;;8CAC3B;AAGjB;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;uBAzBZ,YAAY;IADxB,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC;;GACpB,YAAY,CA0BxB"}
|
|
@@ -2,4 +2,9 @@ import { BaseEntity } from 'src/module/meta/entity/base-entity.entity';
|
|
|
2
2
|
export declare class CommTemplate extends BaseEntity {
|
|
3
3
|
constructor();
|
|
4
4
|
mode: string;
|
|
5
|
+
mapped_entity_type: string;
|
|
6
|
+
subject: string;
|
|
7
|
+
format_type: string;
|
|
8
|
+
rich_text: string;
|
|
9
|
+
markup_id: number;
|
|
5
10
|
}
|
|
@@ -21,9 +21,29 @@ let CommTemplate = class CommTemplate extends base_entity_entity_1.BaseEntity {
|
|
|
21
21
|
};
|
|
22
22
|
exports.CommTemplate = CommTemplate;
|
|
23
23
|
__decorate([
|
|
24
|
-
(0, typeorm_1.Column)({
|
|
24
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
25
25
|
__metadata("design:type", String)
|
|
26
26
|
], CommTemplate.prototype, "mode", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], CommTemplate.prototype, "mapped_entity_type", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], CommTemplate.prototype, "subject", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], CommTemplate.prototype, "format_type", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typeorm_1.Column)({ type: 'longtext', nullable: true }),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], CommTemplate.prototype, "rich_text", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
45
|
+
__metadata("design:type", Number)
|
|
46
|
+
], CommTemplate.prototype, "markup_id", void 0);
|
|
27
47
|
exports.CommTemplate = CommTemplate = __decorate([
|
|
28
48
|
(0, typeorm_1.Entity)({ name: 'cr_wf_comm_template' }),
|
|
29
49
|
__metadata("design:paramtypes", [])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comm-template.entity.js","sourceRoot":"","sources":["../../../../src/module/workflow/entity/comm-template.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uEAA6D;AAC7D,6EAAuE;AACvE,qCAAyC;AAGlC,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,+BAAU;IAC1C;QACE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,WAAW,GAAG,+BAAa,CAAC;IACnC,CAAC;
|
|
1
|
+
{"version":3,"file":"comm-template.entity.js","sourceRoot":"","sources":["../../../../src/module/workflow/entity/comm-template.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uEAA6D;AAC7D,6EAAuE;AACvE,qCAAyC;AAGlC,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,+BAAU;IAC1C;QACE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,WAAW,GAAG,+BAAa,CAAC;IACnC,CAAC;CAqBF,CAAA;AAzBY,oCAAY;AAOvB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACd;AAGb;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wDACjB;AAG3B;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACX;AAGhB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACP;AAIpB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CAC3B;AAIlB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACT;uBAxBP,YAAY;IADxB,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,qBAAqB,EAAE,CAAC;;GAC3B,YAAY,CAyBxB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseEntity } from 'src/module/meta/entity/base-entity.entity';
|
|
2
|
+
export declare class EntityModification extends BaseEntity {
|
|
3
|
+
constructor();
|
|
4
|
+
mapped_entity_id: number;
|
|
5
|
+
mapped_entity_type: string;
|
|
6
|
+
mode: string;
|
|
7
|
+
stage_id: number;
|
|
8
|
+
action_id: number;
|
|
9
|
+
attribute_key: string;
|
|
10
|
+
current_value: string;
|
|
11
|
+
new_value: string;
|
|
12
|
+
reason_code: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.EntityModification = void 0;
|
|
13
|
+
const global_constant_1 = require("../../../constant/global.constant");
|
|
14
|
+
const base_entity_entity_1 = require("../../meta/entity/base-entity.entity");
|
|
15
|
+
const typeorm_1 = require("typeorm");
|
|
16
|
+
let EntityModification = class EntityModification extends base_entity_entity_1.BaseEntity {
|
|
17
|
+
constructor() {
|
|
18
|
+
super();
|
|
19
|
+
this.entity_type = global_constant_1.ENTITY_MODIFICATION;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
exports.EntityModification = EntityModification;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
25
|
+
__metadata("design:type", Number)
|
|
26
|
+
], EntityModification.prototype, "mapped_entity_id", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], EntityModification.prototype, "mapped_entity_type", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], EntityModification.prototype, "mode", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
37
|
+
__metadata("design:type", Number)
|
|
38
|
+
], EntityModification.prototype, "stage_id", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
41
|
+
__metadata("design:type", Number)
|
|
42
|
+
], EntityModification.prototype, "action_id", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], EntityModification.prototype, "attribute_key", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
|
|
49
|
+
__metadata("design:type", String)
|
|
50
|
+
], EntityModification.prototype, "current_value", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
|
|
53
|
+
__metadata("design:type", String)
|
|
54
|
+
], EntityModification.prototype, "new_value", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], EntityModification.prototype, "reason_code", void 0);
|
|
59
|
+
exports.EntityModification = EntityModification = __decorate([
|
|
60
|
+
(0, typeorm_1.Entity)({ name: 'cr_wf_entity_modification' }),
|
|
61
|
+
__metadata("design:paramtypes", [])
|
|
62
|
+
], EntityModification);
|
|
63
|
+
//# sourceMappingURL=entity-modification.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity-modification.entity.js","sourceRoot":"","sources":["../../../../src/module/workflow/entity/entity-modification.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uEAAmE;AACnE,6EAAuE;AACvE,qCAAyC;AAGlC,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,+BAAU;IAChD;QACE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,WAAW,GAAG,qCAAmB,CAAC;IACzC,CAAC;CA4BF,CAAA;AAhCY,gDAAkB;AAO7B;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4DACf;AAGzB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8DACjB;AAG3B;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDAC/B;AAGb;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;oDACvB;AAGjB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDACtB;AAGlB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yDACtB;AAGtB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yDACtB;AAGtB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDAC1B;AAGlB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uDACxB;6BA/BT,kBAAkB;IAD9B,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,2BAA2B,EAAE,CAAC;;GACjC,kBAAkB,CAgC9B"}
|
|
@@ -40,6 +40,14 @@ __decorate([
|
|
|
40
40
|
(0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
|
|
41
41
|
__metadata("design:type", String)
|
|
42
42
|
], StageMovementData.prototype, "is_current", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], StageMovementData.prototype, "mapped_entity_type", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
49
|
+
__metadata("design:type", Number)
|
|
50
|
+
], StageMovementData.prototype, "mapped_entity_id", void 0);
|
|
43
51
|
exports.StageMovementData = StageMovementData = __decorate([
|
|
44
52
|
(0, typeorm_1.Entity)({ name: 'cr_wf_stage_movement_data' }),
|
|
45
53
|
__metadata("design:paramtypes", [])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stage-movement-data.entity.js","sourceRoot":"","sources":["../../../../src/module/workflow/entity/stage-movement-data.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uEAAmE;AACnE,6EAAuE;AACvE,qCAAyC;AAGlC,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,+BAAU;IAC/C;QACE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,WAAW,GAAG,qCAAmB,CAAC;IACzC,CAAC;
|
|
1
|
+
{"version":3,"file":"stage-movement-data.entity.js","sourceRoot":"","sources":["../../../../src/module/workflow/entity/stage-movement-data.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uEAAmE;AACnE,6EAAuE;AACvE,qCAAyC;AAGlC,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,+BAAU;IAC/C;QACE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,WAAW,GAAG,qCAAmB,CAAC;IACzC,CAAC;CAsBF,CAAA;AA1BY,8CAAiB;AAO5B;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0DAChB;AAGxB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kEACR;AAGhC;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BAC7B,IAAI;qDAAC;AAGjB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BAC/B,IAAI;mDAAC;AAGf;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDACzB;AAGnB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6DACjB;AAG3B;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2DACf;4BAzBd,iBAAiB;IAD7B,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,2BAA2B,EAAE,CAAC;;GACjC,iBAAiB,CA0B7B"}
|
|
@@ -0,0 +1,54 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.TemplateAttach = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
let TemplateAttach = class TemplateAttach {
|
|
15
|
+
constructor() { }
|
|
16
|
+
};
|
|
17
|
+
exports.TemplateAttach = TemplateAttach;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, typeorm_1.PrimaryGeneratedColumn)(),
|
|
20
|
+
__metadata("design:type", Number)
|
|
21
|
+
], TemplateAttach.prototype, "id", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, typeorm_1.Column)({}),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], TemplateAttach.prototype, "entity_type", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
28
|
+
__metadata("design:type", Number)
|
|
29
|
+
], TemplateAttach.prototype, "template_id", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
32
|
+
__metadata("design:type", Number)
|
|
33
|
+
], TemplateAttach.prototype, "media_id", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
36
|
+
__metadata("design:type", Number)
|
|
37
|
+
], TemplateAttach.prototype, "organization_id", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], TemplateAttach.prototype, "appcode", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], TemplateAttach.prototype, "level_id", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], TemplateAttach.prototype, "level_type", void 0);
|
|
50
|
+
exports.TemplateAttach = TemplateAttach = __decorate([
|
|
51
|
+
(0, typeorm_1.Entity)({ name: 'cr_wf_tem_attach_mapper' }),
|
|
52
|
+
__metadata("design:paramtypes", [])
|
|
53
|
+
], TemplateAttach);
|
|
54
|
+
//# sourceMappingURL=template-attach-mapper.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template-attach-mapper.entity.js","sourceRoot":"","sources":["../../../../src/module/workflow/entity/template-attach-mapper.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAiE;AAG1D,IAAM,cAAc,GAApB,MAAM,cAAc;IACzB,gBAAe,CAAC;CAyBjB,CAAA;AA1BY,wCAAc;AAIzB;IADC,IAAA,gCAAsB,GAAE;;0CACd;AAGX;IADC,IAAA,gBAAM,EAAC,EAAE,CAAC;;mDACS;AAGpB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACP;AAGpB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACV;AAGjB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uDACH;AAGxB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACX;AAGhB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACV;AAGjB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDACR;yBAzBR,cAAc;IAD1B,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,yBAAyB,EAAE,CAAC;;GAC/B,cAAc,CA0B1B"}
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { Repository } from 'typeorm';
|
|
2
2
|
import { CommTemplate } from '../entity/comm-template.entity';
|
|
3
|
+
import { TemplateAttach } from '../entity/template-attach-mapper.entity';
|
|
4
|
+
import { MediaDataService } from 'src/module/meta/service/media-data.service';
|
|
3
5
|
export declare class CommTemplateRepository {
|
|
4
6
|
private readonly commTemplateRepository;
|
|
5
|
-
|
|
7
|
+
private readonly templateAttachEntity;
|
|
8
|
+
private readonly mediaDataService;
|
|
9
|
+
constructor(commTemplateRepository: Repository<CommTemplate>, templateAttachEntity: Repository<TemplateAttach>, mediaDataService: MediaDataService);
|
|
6
10
|
getAllCommTemplate(entity_type: string, loggedInUser: any): Promise<CommTemplate[]>;
|
|
7
|
-
|
|
11
|
+
save(commTemplate: any): Promise<any>;
|
|
12
|
+
delete(id: any): Promise<any>;
|
|
13
|
+
getTemplateByCode(entity_type: string, code: string, loggedInUser: any): Promise<any | null>;
|
|
8
14
|
}
|
|
@@ -17,35 +17,66 @@ const common_1 = require("@nestjs/common");
|
|
|
17
17
|
const typeorm_1 = require("@nestjs/typeorm");
|
|
18
18
|
const typeorm_2 = require("typeorm");
|
|
19
19
|
const comm_template_entity_1 = require("../entity/comm-template.entity");
|
|
20
|
+
const template_attach_mapper_entity_1 = require("../entity/template-attach-mapper.entity");
|
|
21
|
+
const media_data_service_1 = require("../../meta/service/media-data.service");
|
|
20
22
|
let CommTemplateRepository = class CommTemplateRepository {
|
|
21
|
-
constructor(commTemplateRepository) {
|
|
23
|
+
constructor(commTemplateRepository, templateAttachEntity, mediaDataService) {
|
|
22
24
|
this.commTemplateRepository = commTemplateRepository;
|
|
25
|
+
this.templateAttachEntity = templateAttachEntity;
|
|
26
|
+
this.mediaDataService = mediaDataService;
|
|
23
27
|
}
|
|
24
28
|
async getAllCommTemplate(entity_type, loggedInUser) {
|
|
29
|
+
const { organization_id } = loggedInUser;
|
|
25
30
|
return this.commTemplateRepository.find({
|
|
26
31
|
select: ['name', 'code'],
|
|
27
32
|
where: {
|
|
28
|
-
|
|
33
|
+
mapped_entity_type: entity_type,
|
|
34
|
+
organization_id: organization_id,
|
|
29
35
|
},
|
|
30
36
|
});
|
|
31
37
|
}
|
|
38
|
+
async save(commTemplate) {
|
|
39
|
+
return this.templateAttachEntity.save(commTemplate);
|
|
40
|
+
}
|
|
41
|
+
async delete(id) {
|
|
42
|
+
return await this.templateAttachEntity.delete(id);
|
|
43
|
+
}
|
|
32
44
|
async getTemplateByCode(entity_type, code, loggedInUser) {
|
|
33
45
|
const template = await this.commTemplateRepository.findOne({
|
|
34
46
|
where: {
|
|
35
|
-
entity_type
|
|
36
|
-
code
|
|
47
|
+
entity_type,
|
|
48
|
+
code,
|
|
37
49
|
},
|
|
38
50
|
});
|
|
39
51
|
if (!template) {
|
|
40
52
|
throw new common_1.NotFoundException(`Template with code ${code} not found`);
|
|
41
53
|
}
|
|
42
|
-
|
|
54
|
+
if (template.format_type === 'markup') {
|
|
55
|
+
const media = await this.mediaDataService.getMediaDownloadUrl(template.markup_id, loggedInUser);
|
|
56
|
+
console.log(media);
|
|
57
|
+
}
|
|
58
|
+
if (template.format_type === 'richtext') {
|
|
59
|
+
return template;
|
|
60
|
+
}
|
|
61
|
+
const attachments = await this.templateAttachEntity.find({
|
|
62
|
+
select: ['media_id'],
|
|
63
|
+
where: {
|
|
64
|
+
entity_type: entity_type,
|
|
65
|
+
template_id: template.id,
|
|
66
|
+
},
|
|
67
|
+
});
|
|
68
|
+
const media = await this.mediaDataService.getMediaDownloadUrl(1, loggedInUser);
|
|
69
|
+
console.log(media);
|
|
70
|
+
return { ...template, attachments: attachments.map((att) => att.media_id) };
|
|
43
71
|
}
|
|
44
72
|
};
|
|
45
73
|
exports.CommTemplateRepository = CommTemplateRepository;
|
|
46
74
|
exports.CommTemplateRepository = CommTemplateRepository = __decorate([
|
|
47
75
|
(0, common_1.Injectable)(),
|
|
48
76
|
__param(0, (0, typeorm_1.InjectRepository)(comm_template_entity_1.CommTemplate)),
|
|
49
|
-
|
|
77
|
+
__param(1, (0, typeorm_1.InjectRepository)(template_attach_mapper_entity_1.TemplateAttach)),
|
|
78
|
+
__metadata("design:paramtypes", [typeorm_2.Repository,
|
|
79
|
+
typeorm_2.Repository,
|
|
80
|
+
media_data_service_1.MediaDataService])
|
|
50
81
|
], CommTemplateRepository);
|
|
51
82
|
//# sourceMappingURL=comm-template.repository.js.map
|
|
@@ -1 +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;
|
|
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;AAC9D,2FAAyE;AACzE,8EAA8E;AAGvE,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IACjC,YAEmB,sBAAgD,EAEhD,oBAAgD,EAChD,gBAAkC;QAHlC,2BAAsB,GAAtB,sBAAsB,CAA0B;QAEhD,yBAAoB,GAApB,oBAAoB,CAA4B;QAChD,qBAAgB,GAAhB,gBAAgB,CAAkB;IAClD,CAAC;IAEJ,KAAK,CAAC,kBAAkB,CAAC,WAAmB,EAAE,YAAY;QACxD,MAAM,EAAE,eAAe,EAAE,GAAG,YAAY,CAAC;QACzC,OAAO,IAAI,CAAC,sBAAsB,CAAC,IAAI,CAAC;YACtC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;YACxB,KAAK,EAAE;gBACL,kBAAkB,EAAE,WAAW;gBAC/B,eAAe,EAAE,eAAe;aACjC;SACF,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,YAAiB;QAS1B,OAAO,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAO;QAElB,OAAO,MAAM,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;IAED,KAAK,CAAC,iBAAiB,CACrB,WAAmB,EACnB,IAAY,EACZ,YAAY;QAEZ,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,sBAAsB,CAAC,OAAO,CAAC;YACzD,KAAK,EAAE;gBACL,WAAW;gBACX,IAAI;aACL;SACF,CAAC,CAAC;QAEH,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,MAAM,IAAI,0BAAiB,CAAC,sBAAsB,IAAI,YAAY,CAAC,CAAC;QACtE,CAAC;QAED,IAAI,QAAQ,CAAC,WAAW,KAAK,QAAQ,EAAE,CAAC;YACtC,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,mBAAmB,CAC3D,QAAQ,CAAC,SAAS,EAClB,YAAY,CACb,CAAC;YAEF,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACrB,CAAC;QAED,IAAI,QAAQ,CAAC,WAAW,KAAK,UAAU,EAAE,CAAC;YACxC,OAAO,QAAQ,CAAC;QAClB,CAAC;QAGD,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC;YACvD,MAAM,EAAE,CAAC,UAAU,CAAC;YACpB,KAAK,EAAE;gBACL,WAAW,EAAE,WAAW;gBACxB,WAAW,EAAE,QAAQ,CAAC,EAAE;aACzB;SACF,CAAC,CAAC;QAEH,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,mBAAmB,CAC3D,CAAC,EACD,YAAY,CACb,CAAC;QAEF,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAEnB,OAAO,EAAE,GAAG,QAAQ,EAAE,WAAW,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;IAC9E,CAAC;CACF,CAAA;AApFY,wDAAsB;iCAAtB,sBAAsB;IADlC,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,0BAAgB,EAAC,mCAAY,CAAC,CAAA;IAE9B,WAAA,IAAA,0BAAgB,EAAC,8CAAc,CAAC,CAAA;qCADQ,oBAAU;QAEZ,oBAAU;QACd,qCAAgB;GAN1C,sBAAsB,CAoFlC"}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
import { EntityServiceImpl } from 'src/module/meta/service/entity-service-impl.service';
|
|
2
|
+
import { UserData } from 'src/module/user/entity/user.entity';
|
|
3
|
+
import { DataSource } from 'typeorm';
|
|
2
4
|
export declare class ActionCategoryService extends EntityServiceImpl {
|
|
5
|
+
private readonly dataSource;
|
|
6
|
+
constructor(dataSource: DataSource);
|
|
7
|
+
getActionsCat(loggedInUser: UserData, entity_type: string): Promise<any>;
|
|
3
8
|
}
|
|
@@ -5,14 +5,33 @@ 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.ActionCategoryService = 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 typeorm_1 = require("typeorm");
|
|
12
16
|
let ActionCategoryService = class ActionCategoryService extends entity_service_impl_service_1.EntityServiceImpl {
|
|
17
|
+
constructor(dataSource) {
|
|
18
|
+
super();
|
|
19
|
+
this.dataSource = dataSource;
|
|
20
|
+
}
|
|
21
|
+
async getActionsCat(loggedInUser, entity_type) {
|
|
22
|
+
const { organization_id } = loggedInUser;
|
|
23
|
+
const result = await this.dataSource.query(`
|
|
24
|
+
SELECT id, name
|
|
25
|
+
FROM cr_wf_action_category
|
|
26
|
+
WHERE mapped_entity_type = ?
|
|
27
|
+
AND organization_id = ?
|
|
28
|
+
`, [entity_type, organization_id]);
|
|
29
|
+
return result;
|
|
30
|
+
}
|
|
13
31
|
};
|
|
14
32
|
exports.ActionCategoryService = ActionCategoryService;
|
|
15
33
|
exports.ActionCategoryService = ActionCategoryService = __decorate([
|
|
16
|
-
(0, common_1.Injectable)()
|
|
34
|
+
(0, common_1.Injectable)(),
|
|
35
|
+
__metadata("design:paramtypes", [typeorm_1.DataSource])
|
|
17
36
|
], ActionCategoryService);
|
|
18
37
|
//# sourceMappingURL=action-category.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action-category.service.js","sourceRoot":"","sources":["../../../../src/module/workflow/service/action-category.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"action-category.service.js","sourceRoot":"","sources":["../../../../src/module/workflow/service/action-category.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,gGAAwF;AAExF,qCAAqC;AAG9B,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,+CAAiB;IAC1D,YAA6B,UAAsB;QACjD,KAAK,EAAE,CAAC;QADmB,eAAU,GAAV,UAAU,CAAY;IAEnD,CAAC;IAED,KAAK,CAAC,aAAa,CAAC,YAAsB,EAAE,WAAmB;QAC7D,MAAM,EAAE,eAAe,EAAE,GAAG,YAAY,CAAC;QAEzC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,CACxC;;;;;KAKD,EACC,CAAC,WAAW,EAAE,eAAe,CAAC,CAC/B,CAAC;QAEF,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAA;AApBY,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,mBAAU,GAAE;qCAE8B,oBAAU;GADxC,qBAAqB,CAoBjC"}
|
|
@@ -11,4 +11,5 @@ export declare class ActionService extends EntityServiceImpl {
|
|
|
11
11
|
deleteEntity(entityType: string, id: number, loggedInUser: UserData): Promise<any>;
|
|
12
12
|
getReasonCode(loggedInUser: UserData): Promise<any>;
|
|
13
13
|
defaultReasonCode(list_type: string, loggedInUser: UserData): Promise<any>;
|
|
14
|
+
getActions(loggedInUser: UserData, stage_id: number): Promise<any>;
|
|
14
15
|
}
|
|
@@ -115,6 +115,78 @@ let ActionService = class ActionService extends entity_service_impl_service_1.En
|
|
|
115
115
|
value: row.name,
|
|
116
116
|
}));
|
|
117
117
|
}
|
|
118
|
+
async getActions(loggedInUser, stage_id) {
|
|
119
|
+
const { organization_id } = loggedInUser;
|
|
120
|
+
const stageActions = await this.dataSource.query(`
|
|
121
|
+
SELECT id, action_id
|
|
122
|
+
FROM cr_wf_stage_action_mapping
|
|
123
|
+
WHERE stage_id = ?
|
|
124
|
+
`, [stage_id]);
|
|
125
|
+
if (!stageActions?.length)
|
|
126
|
+
return [];
|
|
127
|
+
const actionIds = stageActions.map((sa) => sa.action_id);
|
|
128
|
+
const mappingIds = stageActions.map((sa) => sa.id);
|
|
129
|
+
const templateMappings = await this.dataSource.query(`
|
|
130
|
+
SELECT template_code
|
|
131
|
+
FROM cr_wf_action_template_mapping
|
|
132
|
+
WHERE stg_act_mapping_id IN (?)
|
|
133
|
+
`, [mappingIds]);
|
|
134
|
+
const templateCodes = templateMappings.map((tm) => tm.template_code);
|
|
135
|
+
let templateNameMap = {};
|
|
136
|
+
if (templateCodes.length > 0) {
|
|
137
|
+
const templates = await this.dataSource.query(`
|
|
138
|
+
SELECT code, name
|
|
139
|
+
FROM cr_wf_comm_template
|
|
140
|
+
WHERE code IN (?)
|
|
141
|
+
AND organization_id = ?
|
|
142
|
+
`, [templateCodes, organization_id]);
|
|
143
|
+
const codeToNameMap = templates.reduce((acc, curr) => {
|
|
144
|
+
acc[curr.code] = curr.name;
|
|
145
|
+
return acc;
|
|
146
|
+
}, {});
|
|
147
|
+
templateMappings.forEach((tm) => {
|
|
148
|
+
const mappingId = tm.stg_act_mapping_id;
|
|
149
|
+
const name = codeToNameMap[tm.template_code];
|
|
150
|
+
if (name) {
|
|
151
|
+
if (!templateNameMap[mappingId]) {
|
|
152
|
+
templateNameMap[mappingId] = name;
|
|
153
|
+
}
|
|
154
|
+
else {
|
|
155
|
+
templateNameMap[mappingId] += `, ${name}`;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
const result = await this.dataSource.query(`
|
|
161
|
+
SELECT
|
|
162
|
+
a.id,
|
|
163
|
+
a.name AS action_name,
|
|
164
|
+
ac.name AS action_category,
|
|
165
|
+
ar.name AS action_requirement
|
|
166
|
+
FROM cr_wf_action a
|
|
167
|
+
LEFT JOIN cr_wf_action_category ac
|
|
168
|
+
ON ac.id = a.action_cat_id
|
|
169
|
+
LEFT JOIN cr_list_master_items ar
|
|
170
|
+
ON ar.id = a.action_requirement
|
|
171
|
+
AND ar.listtype = 'ACRQ'
|
|
172
|
+
AND ar.organization_id = ?
|
|
173
|
+
WHERE a.organization_id = ?
|
|
174
|
+
AND a.id IN (?)
|
|
175
|
+
`, [organization_id, organization_id, actionIds]);
|
|
176
|
+
const enrichedResult = result.map((row) => {
|
|
177
|
+
const relatedMappingIds = stageActions
|
|
178
|
+
.filter((sa) => sa.action_id === row.id)
|
|
179
|
+
.map((sa) => sa.id);
|
|
180
|
+
const allNames = relatedMappingIds
|
|
181
|
+
.map((mid) => templateNameMap[mid])
|
|
182
|
+
.filter(Boolean);
|
|
183
|
+
return {
|
|
184
|
+
...row,
|
|
185
|
+
template: allNames.length ? allNames.join(', ') : '',
|
|
186
|
+
};
|
|
187
|
+
});
|
|
188
|
+
return enrichedResult;
|
|
189
|
+
}
|
|
118
190
|
};
|
|
119
191
|
exports.ActionService = ActionService;
|
|
120
192
|
exports.ActionService = ActionService = __decorate([
|