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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rez_core",
3
- "version": "4.0.150",
3
+ "version": "4.0.152",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -47,4 +47,7 @@ export class ActionEntity extends BaseEntity {
47
47
 
48
48
  @Column({ type: 'varchar', nullable: true })
49
49
  template: string;
50
+
51
+ @Column({ type: 'varchar', nullable: true })
52
+ pdf_template: string;
50
53
  }
@@ -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
- console.log(entity)
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
- console.log(entity);
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: entity.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: "TASK",
59
+ entity_type: 'TASK',
54
60
  };
55
61
 
56
62
  return await this.createEntity(entityData, user);