rez_core 2.1.128 → 2.1.129
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/action-template-mapping.controller.d.ts +2 -0
- package/dist/module/workflow/controller/action-template-mapping.controller.js +5 -4
- package/dist/module/workflow/controller/action-template-mapping.controller.js.map +1 -1
- package/dist/module/workflow/entity/comm-template.entity.d.ts +1 -1
- package/dist/module/workflow/entity/comm-template.entity.js +2 -2
- package/dist/module/workflow/entity/comm-template.entity.js.map +1 -1
- package/dist/module/workflow/service/action-template-mapping.service.d.ts +1 -1
- package/dist/module/workflow/service/action-template-mapping.service.js +4 -3
- package/dist/module/workflow/service/action-template-mapping.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/module/workflow/controller/action-template-mapping.controller.ts +4 -1
- package/src/module/workflow/entity/comm-template.entity.ts +2 -2
- package/src/module/workflow/service/action-template-mapping.service.ts +13 -3
|
@@ -20,9 +20,9 @@ let ActionTemplateMappingController = class ActionTemplateMappingController {
|
|
|
20
20
|
constructor(actionTemplateMappingService) {
|
|
21
21
|
this.actionTemplateMappingService = actionTemplateMappingService;
|
|
22
22
|
}
|
|
23
|
-
async getTemplate(body) {
|
|
24
|
-
|
|
25
|
-
const result = this.actionTemplateMappingService.getTemplateByMode(body.stage_id, body.action_id, body.mode);
|
|
23
|
+
async getTemplate(body, req) {
|
|
24
|
+
const loggedInUser = req.user.userData;
|
|
25
|
+
const result = this.actionTemplateMappingService.getTemplateByMode(body.stage_id, body.action_id, body.mode, loggedInUser);
|
|
26
26
|
return result;
|
|
27
27
|
}
|
|
28
28
|
};
|
|
@@ -31,8 +31,9 @@ __decorate([
|
|
|
31
31
|
(0, common_1.Post)('/get-template'),
|
|
32
32
|
(0, common_1.HttpCode)(common_1.HttpStatus.OK),
|
|
33
33
|
__param(0, (0, common_1.Body)()),
|
|
34
|
+
__param(1, (0, common_1.Req)()),
|
|
34
35
|
__metadata("design:type", Function),
|
|
35
|
-
__metadata("design:paramtypes", [Object]),
|
|
36
|
+
__metadata("design:paramtypes", [Object, Object]),
|
|
36
37
|
__metadata("design:returntype", Promise)
|
|
37
38
|
], ActionTemplateMappingController.prototype, "getTemplate", null);
|
|
38
39
|
exports.ActionTemplateMappingController = ActionTemplateMappingController = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action-template-mapping.controller.js","sourceRoot":"","sources":["../../../../src/module/workflow/controller/action-template-mapping.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"action-template-mapping.controller.js","sourceRoot":"","sources":["../../../../src/module/workflow/controller/action-template-mapping.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAQwB;AACxB,2DAAgE;AAChE,gGAA0F;AAInF,IAAM,+BAA+B,GAArC,MAAM,+BAA+B;IAC1C,YACmB,4BAA0D;QAA1D,iCAA4B,GAA5B,4BAA4B,CAA8B;IAC1E,CAAC;IAIE,AAAN,KAAK,CAAC,WAAW,CACP,IAA2D,EAC5D,GAA4B;QAEnC,MAAM,YAAY,GAAG,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;QACvC,MAAM,MAAM,GAAG,IAAI,CAAC,4BAA4B,CAAC,iBAAiB,CAChE,IAAI,CAAC,QAAQ,EACb,IAAI,CAAC,SAAS,EACd,IAAI,CAAC,IAAI,EACT,YAAY,CACb,CAAC;QACF,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAA;AApBY,0EAA+B;AAOpC;IAFL,IAAA,aAAI,EAAC,eAAe,CAAC;IACrB,IAAA,iBAAQ,EAAC,mBAAU,CAAC,EAAE,CAAC;IAErB,WAAA,IAAA,aAAI,GAAE,CAAA;IACN,WAAA,IAAA,YAAG,GAAE,CAAA;;;;kEAUP;0CAnBU,+BAA+B;IAF3C,IAAA,mBAAU,EAAC,0BAA0B,CAAC;IACtC,IAAA,kBAAS,EAAC,wBAAY,CAAC;qCAG2B,8DAA4B;GAFlE,+BAA+B,CAoB3C"}
|
|
@@ -21,8 +21,8 @@ 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)({ type: '
|
|
25
|
-
__metadata("design:type",
|
|
24
|
+
(0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
26
|
], CommTemplate.prototype, "mode", void 0);
|
|
27
27
|
exports.CommTemplate = CommTemplate = __decorate([
|
|
28
28
|
(0, typeorm_1.Entity)({ name: 'cr_wf_comm_template' }),
|
|
@@ -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;CAIF,CAAA;AARY,oCAAY;AAOvB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,
|
|
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;CAIF,CAAA;AARY,oCAAY;AAOvB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CAC/B;uBAPF,YAAY;IADxB,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,qBAAqB,EAAE,CAAC;;GAC3B,YAAY,CAQxB"}
|
|
@@ -3,5 +3,5 @@ import { DataSource } from 'typeorm';
|
|
|
3
3
|
export declare class ActionTemplateMappingService extends EntityServiceImpl {
|
|
4
4
|
private readonly dataSource;
|
|
5
5
|
constructor(dataSource: DataSource);
|
|
6
|
-
getTemplateByMode(stage_id: number, action_id: number, mode: number): Promise<any>;
|
|
6
|
+
getTemplateByMode(stage_id: number, action_id: number, mode: number, loggedInUser: any): Promise<any>;
|
|
7
7
|
}
|
|
@@ -18,7 +18,7 @@ let ActionTemplateMappingService = class ActionTemplateMappingService extends en
|
|
|
18
18
|
super();
|
|
19
19
|
this.dataSource = dataSource;
|
|
20
20
|
}
|
|
21
|
-
async getTemplateByMode(stage_id, action_id, mode) {
|
|
21
|
+
async getTemplateByMode(stage_id, action_id, mode, loggedInUser) {
|
|
22
22
|
const stageAction = await this.dataSource.query(`
|
|
23
23
|
SELECT id FROM cr_wf_stage_action_mapping
|
|
24
24
|
WHERE stage_id = ? AND action_id = ?
|
|
@@ -30,14 +30,15 @@ let ActionTemplateMappingService = class ActionTemplateMappingService extends en
|
|
|
30
30
|
SELECT template_code FROM cr_wf_action_template_mapping
|
|
31
31
|
WHERE stg_act_mapping_id = ?
|
|
32
32
|
`, [stgActMappingId]);
|
|
33
|
+
const listMasterItemData = await this.dataSource.query(`SELECT code FROM cr_list_master_items WHERE id = ?`, [mode]);
|
|
33
34
|
const templateCodes = templates.map((t) => t.template_code);
|
|
34
35
|
if (!templateCodes.length)
|
|
35
36
|
return [];
|
|
36
37
|
const commTemplates = await this.dataSource.query(`
|
|
37
38
|
SELECT id, name
|
|
38
39
|
FROM cr_wf_comm_template
|
|
39
|
-
WHERE code IN (?) AND mode = ?
|
|
40
|
-
`, [templateCodes,
|
|
40
|
+
WHERE code IN (?) AND mode = ? AND organization_id = ?
|
|
41
|
+
`, [templateCodes, listMasterItemData[0].code, loggedInUser.organization_id]);
|
|
41
42
|
return commTemplates.map((t) => ({ id: t.id, name: t.name }));
|
|
42
43
|
}
|
|
43
44
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action-template-mapping.service.js","sourceRoot":"","sources":["../../../../src/module/workflow/service/action-template-mapping.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,gGAAwF;AACxF,qCAAqC;AAG9B,IAAM,4BAA4B,GAAlC,MAAM,4BAA6B,SAAQ,+CAAiB;IACjE,YAA6B,UAAsB;QACjD,KAAK,EAAE,CAAC;QADmB,eAAU,GAAV,UAAU,CAAY;IAEnD,CAAC;IACD,KAAK,CAAC,iBAAiB,
|
|
1
|
+
{"version":3,"file":"action-template-mapping.service.js","sourceRoot":"","sources":["../../../../src/module/workflow/service/action-template-mapping.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,gGAAwF;AACxF,qCAAqC;AAG9B,IAAM,4BAA4B,GAAlC,MAAM,4BAA6B,SAAQ,+CAAiB;IACjE,YAA6B,UAAsB;QACjD,KAAK,EAAE,CAAC;QADmB,eAAU,GAAV,UAAU,CAAY;IAEnD,CAAC;IACD,KAAK,CAAC,iBAAiB,CACrB,QAAgB,EAChB,SAAiB,EACjB,IAAY,EACZ,YAAY;QAEZ,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,CAC7C;;;OAGC,EACD,CAAC,QAAQ,EAAE,SAAS,CAAC,CACtB,CAAC;QACF,IAAI,CAAC,WAAW,EAAE,MAAM;YAAE,OAAO,EAAE,CAAC;QAEpC,MAAM,eAAe,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAE1C,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,CAC3C;;;OAGC,EACD,CAAC,eAA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