rez_core 3.1.190 → 3.1.192
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/repository/action-data.repository.js +12 -1
- package/dist/module/workflow/repository/action-data.repository.js.map +1 -1
- package/dist/module/workflow/repository/comm-template.repository.js.map +1 -1
- package/dist/module/workflow/service/comm-template.service.js +1 -1
- package/dist/module/workflow/service/comm-template.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/module/workflow/repository/action-data.repository.ts +26 -3
- package/src/module/workflow/repository/comm-template.repository.ts +1 -1
- package/src/module/workflow/service/comm-template.service.ts +1 -1
package/package.json
CHANGED
|
@@ -56,8 +56,8 @@ export class ActionDataRepository extends EntityServiceImpl {
|
|
|
56
56
|
} as ActionDataEntity);
|
|
57
57
|
await this.actionDataRepo.save(actionData);
|
|
58
58
|
|
|
59
|
-
// SEND
|
|
60
|
-
// if the action_category_code is 'SDFM', create a entry in
|
|
59
|
+
// SEND ANY FORM
|
|
60
|
+
// if the action_category_code is 'SDFM', create a entry in crm_lead_form table
|
|
61
61
|
if (act?.action_category_code === 'SDFM') {
|
|
62
62
|
const data = {
|
|
63
63
|
entity_type: 'LFRM',
|
|
@@ -69,7 +69,30 @@ export class ActionDataRepository extends EntityServiceImpl {
|
|
|
69
69
|
action_id: act.id,
|
|
70
70
|
};
|
|
71
71
|
|
|
72
|
-
super.createEntity(
|
|
72
|
+
const createdEntity = await super.createEntity(
|
|
73
|
+
data as any,
|
|
74
|
+
loggedInUser,
|
|
75
|
+
);
|
|
76
|
+
// THEN INSERT SDFM IN RELATION TASK TABLE
|
|
77
|
+
|
|
78
|
+
let relationData = await this.dataSource.query(
|
|
79
|
+
`SELECT * FROM cr_entity_relation WHERE source_entity_type = ? AND target_entity_type = ?`,
|
|
80
|
+
[createdEntity.mapped_entity_type, createdEntity.entity_type],
|
|
81
|
+
);
|
|
82
|
+
|
|
83
|
+
if (relationData) {
|
|
84
|
+
await this.dataSource.query(
|
|
85
|
+
`INSERT INTO cr_entity_relation_data (organization_id, source_entity_id, source_entity_type, target_entity_id, target_entity_type, relation_type) VALUES (?, ?, ?, ?, ?,?)`,
|
|
86
|
+
[
|
|
87
|
+
loggedInUser.organization_id,
|
|
88
|
+
createdEntity.mapped_entity_id,
|
|
89
|
+
createdEntity.mapped_entity_type,
|
|
90
|
+
createdEntity.id,
|
|
91
|
+
createdEntity.entity_type,
|
|
92
|
+
relationData[0]?.relation_type,
|
|
93
|
+
],
|
|
94
|
+
);
|
|
95
|
+
}
|
|
73
96
|
}
|
|
74
97
|
}
|
|
75
98
|
}
|
|
@@ -128,8 +128,8 @@ export class CommTemplateService extends EntityServiceImpl {
|
|
|
128
128
|
async getResolvedTemplateMsg(payload: any) {
|
|
129
129
|
let commTemplate = await this.commTemplateRepository.findByCodeAndLevelIdAndLevelTypeAndAppCode(
|
|
130
130
|
payload.template_code,
|
|
131
|
-
payload.level_type,
|
|
132
131
|
payload.level_id,
|
|
132
|
+
payload.level_type,
|
|
133
133
|
payload.appcode,
|
|
134
134
|
);
|
|
135
135
|
|