rez_core 4.0.150 → 4.0.152
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/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/service/task.service.js +5 -4
- 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/workflow/entity/action.entity.ts +3 -0
- package/src/module/workflow/service/task.service.ts +11 -5
package/package.json
CHANGED
|
@@ -11,6 +11,7 @@ import { ActionHandler } from 'src/module/workflow-automation/interface/action.d
|
|
|
11
11
|
import * as moment from 'moment';
|
|
12
12
|
import { ConfigService } from '@nestjs/config';
|
|
13
13
|
import axios from 'axios';
|
|
14
|
+
import { ChecksumAlgorithm } from '@aws-sdk/client-s3';
|
|
14
15
|
|
|
15
16
|
@Injectable()
|
|
16
17
|
@ActionHandler('add_task')
|
|
@@ -29,14 +30,19 @@ export class TaskService extends EntityServiceImpl {
|
|
|
29
30
|
name: string = 'add_task';
|
|
30
31
|
|
|
31
32
|
async execute(payload: any): Promise<any> {
|
|
32
|
-
|
|
33
33
|
let { entity, user, config } = payload;
|
|
34
|
-
|
|
34
|
+
|
|
35
|
+
const { organization_id, level_id, level_type } = entity;
|
|
35
36
|
|
|
36
37
|
if (entity.entity_type !== 'LEAD') {
|
|
37
38
|
entity = await this.getEntityData('LEAD', entity.parent_id, user);
|
|
38
39
|
}
|
|
39
|
-
|
|
40
|
+
let status = await this.dataSource.query(
|
|
41
|
+
`SELECT id FROM frm_list_master_items WHERE organization_id = ? AND level_id = ? AND level_type= ? AND listtype="TKST"`,
|
|
42
|
+
[organization_id, level_id, level_type],
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
const statusId = status[0].id;
|
|
40
46
|
|
|
41
47
|
// 3. Build entityData
|
|
42
48
|
const entityData = {
|
|
@@ -44,13 +50,13 @@ export class TaskService extends EntityServiceImpl {
|
|
|
44
50
|
mapped_entity_type: entity.entity_type,
|
|
45
51
|
task_owner: entity.lead_owner,
|
|
46
52
|
stage_id: entity.stageId,
|
|
47
|
-
status:
|
|
53
|
+
status: statusId,
|
|
48
54
|
due_date: Date.now() + 2,
|
|
49
55
|
due_time: Date.now(),
|
|
50
56
|
description: config.description,
|
|
51
57
|
is_mandatory: config.is_mandatory,
|
|
52
58
|
name: config.name,
|
|
53
|
-
entity_type:
|
|
59
|
+
entity_type: 'TASK',
|
|
54
60
|
};
|
|
55
61
|
|
|
56
62
|
return await this.createEntity(entityData, user);
|