rez_core 5.0.205 → 5.0.206

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": "5.0.205",
3
+ "version": "5.0.206",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -5,7 +5,6 @@ import { LessThan, Repository } from 'typeorm';
5
5
  import { UserData } from 'src/module/user/entity/user.entity';
6
6
  import { TaskDataEntity } from '../entity/task-data.entity';
7
7
  import { EntityServiceImpl } from 'src/module/meta/service/entity-service-impl.service';
8
- import { FORM_STATUS_TO_BE_SENT } from 'src/constant/global.constant';
9
8
  import { ConfigService } from '@nestjs/config';
10
9
  import axios from 'axios';
11
10
  import { WorkflowAutomationEngineService } from 'src/module/workflow-automation/service/workflow-automation-engine.service';
@@ -40,7 +39,7 @@ export class ActionDataRepository extends EntityServiceImpl {
40
39
  this.reflectionHelper.getRepoService('ListMasterItems');
41
40
  const is_mandatory = await listMasterItemsRepo.findOne({
42
41
  where: {
43
- id: act.action_requirement
42
+ id: act.action_requirement,
44
43
  },
45
44
  });
46
45
 
@@ -82,6 +81,14 @@ export class ActionDataRepository extends EntityServiceImpl {
82
81
  const istOffset = 5.5 * 60; // IST is UTC +5:30 in minutes
83
82
  const istDate = new Date(now.getTime() + istOffset * 60 * 1000);
84
83
 
84
+ const formStatus = await listMasterItemsRepo.findOne({
85
+ where: {
86
+ value: 'TO_BE_SENT',
87
+ enterprise_id: loggedInUser.enterprise_id,
88
+ },
89
+ select: ['id'],
90
+ });
91
+
85
92
  const data = {
86
93
  entity_type: 'LFRM',
87
94
  name: viewMaster?.name,
@@ -90,7 +97,7 @@ export class ActionDataRepository extends EntityServiceImpl {
90
97
  mapped_entity_id,
91
98
  view_id: act.form_id,
92
99
  form_url: dynamicFormURL,
93
- status: FORM_STATUS_TO_BE_SENT,
100
+ status: formStatus?.id,
94
101
  action_id: act.id,
95
102
  created_date: istDate,
96
103
  pdf_template: act.pdf_template,