rez_core 3.1.8 → 3.1.10
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/repository/saved-filter.repository.js +3 -0
- package/dist/module/filter/repository/saved-filter.repository.js.map +1 -1
- package/dist/module/workflow/service/task.service.js +15 -6
- package/dist/module/workflow/service/task.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/module/filter/repository/saved-filter.repository.ts +3 -0
- package/src/module/workflow/service/task.service.ts +24 -6
package/package.json
CHANGED
|
@@ -108,6 +108,9 @@ export class SavedFilterRepositoryService {
|
|
|
108
108
|
return filterDetails.map((detail) => ({
|
|
109
109
|
filter_attribute: detail.filter_attribute,
|
|
110
110
|
filter_operator: detail.filter_operator,
|
|
111
|
+
filter_attribute_data_type: detail.filter_attribute_data_type,
|
|
112
|
+
filter_attribute_name: detail.filter_attribute_name,
|
|
113
|
+
filter_entity_name: detail.filter_entity_name,
|
|
111
114
|
filter_value:
|
|
112
115
|
detail.data_type === 'multiselect'
|
|
113
116
|
? detail.filter_value?.trim() === ''
|
|
@@ -26,7 +26,6 @@ export class TaskService extends EntityServiceImpl {
|
|
|
26
26
|
name: string = 'add_task';
|
|
27
27
|
|
|
28
28
|
async execute(payload: any): Promise<any> {
|
|
29
|
-
console.log('BHUSHAN');
|
|
30
29
|
const { entity, user, config } = payload;
|
|
31
30
|
|
|
32
31
|
let toValue: string | null = null;
|
|
@@ -76,7 +75,7 @@ export class TaskService extends EntityServiceImpl {
|
|
|
76
75
|
if (entityData && typeof entityData['is_mandatory'] === 'string') {
|
|
77
76
|
entityData['is_mandatory'] = entityData['is_mandatory'] === '1';
|
|
78
77
|
}
|
|
79
|
-
const
|
|
78
|
+
const createdEntity = await super.createEntity(
|
|
80
79
|
entityData,
|
|
81
80
|
loggedInUser,
|
|
82
81
|
manager,
|
|
@@ -85,10 +84,10 @@ export class TaskService extends EntityServiceImpl {
|
|
|
85
84
|
|
|
86
85
|
try {
|
|
87
86
|
const logData = {
|
|
88
|
-
mapped_entity_id:
|
|
89
|
-
mapped_entity_type:
|
|
87
|
+
mapped_entity_id: createdEntity.mapped_entity_id,
|
|
88
|
+
mapped_entity_type: createdEntity.mapped_entity_type,
|
|
90
89
|
title: `Task added`,
|
|
91
|
-
description: `A new task ${
|
|
90
|
+
description: `A new task ${createdEntity.name} was added`,
|
|
92
91
|
category: ACTIVITY_CATEGORIES.TASK,
|
|
93
92
|
action: 'add',
|
|
94
93
|
appcode: loggedInUser.appcode,
|
|
@@ -102,7 +101,26 @@ export class TaskService extends EntityServiceImpl {
|
|
|
102
101
|
);
|
|
103
102
|
// Logging should not block main flow
|
|
104
103
|
}
|
|
105
|
-
|
|
104
|
+
|
|
105
|
+
let relationData = await this.dataSource.query(
|
|
106
|
+
`SELECT * FROM cr_entity_relation WHERE source_entity_type = ? AND target_entity_type = ?`,
|
|
107
|
+
[createdEntity.mapped_entity_type, createdEntity.entity_type],
|
|
108
|
+
);
|
|
109
|
+
|
|
110
|
+
if (relationData) {
|
|
111
|
+
await this.dataSource.query(
|
|
112
|
+
`INSERT INTO cr_entity_relation_data (source_entity_id, source_entity_type, target_entity_id, target_entity_type, relation_type) VALUES (?, ?, ?, ?, ?)`,
|
|
113
|
+
[
|
|
114
|
+
createdEntity.mapped_entity_id,
|
|
115
|
+
createdEntity.mapped_entity_type,
|
|
116
|
+
createdEntity.id,
|
|
117
|
+
createdEntity.entity_type,
|
|
118
|
+
relationData[0]?.relation_type,
|
|
119
|
+
],
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
return createdEntity;
|
|
106
124
|
}
|
|
107
125
|
|
|
108
126
|
async updateEntity(
|