rez_core 4.0.129 → 4.0.131

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.129",
3
+ "version": "4.0.131",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -2,12 +2,14 @@ import { BadRequestException, Injectable } from '@nestjs/common';
2
2
  import { InjectRepository } from '@nestjs/typeorm';
3
3
  import { TaskDataEntity } from '../entity/task-data.entity';
4
4
  import { DataSource, Repository } from 'typeorm';
5
+ import { EntityDynamicService } from 'src/module/meta/service/entity-dynamic.service';
5
6
 
6
7
  @Injectable()
7
8
  export class TaskRepository {
8
9
  constructor(
9
10
  @InjectRepository(TaskDataEntity)
10
11
  private readonly TaskRepository: Repository<TaskDataEntity>,
12
+ private readonly entityDynamicService: EntityDynamicService,
11
13
  private readonly dataSource: DataSource,
12
14
  ) {}
13
15
 
@@ -53,23 +55,27 @@ export class TaskRepository {
53
55
  const now = new Date();
54
56
  const dueDateTime = new Date(now);
55
57
  dueDateTime.setDate(dueDateTime.getDate() + 2);
56
-
58
+
57
59
  // Force conversion to IST
58
- const istFormatterDate = new Intl.DateTimeFormat('en-CA', {
59
- timeZone: 'Asia/Kolkata'
60
+ const istFormatterDate = new Intl.DateTimeFormat('en-CA', {
61
+ timeZone: 'Asia/Kolkata',
60
62
  });
61
- const istFormatterTime = new Intl.DateTimeFormat('en-US', {
62
- timeZone: 'Asia/Kolkata',
63
- hour: '2-digit',
64
- minute: '2-digit',
65
- hour12: true
63
+ const istFormatterTime = new Intl.DateTimeFormat('en-US', {
64
+ timeZone: 'Asia/Kolkata',
65
+ hour: '2-digit',
66
+ minute: '2-digit',
67
+ hour12: true,
66
68
  });
67
-
69
+
68
70
  const due_date = istFormatterDate.format(dueDateTime); // YYYY-MM-DD in IST
69
71
  const due_time = istFormatterTime.format(dueDateTime); // e.g. "03:14 AM"
70
-
72
+
71
73
  console.log({ due_date, due_time });
72
-
74
+
75
+ const taskCode = await this.entityDynamicService.getCode(
76
+ 'TASK',
77
+ loggedInUser,
78
+ );
73
79
 
74
80
  const taskData = this.TaskRepository.create({
75
81
  stage_id: act.stage_id,
@@ -89,6 +95,7 @@ export class TaskRepository {
89
95
  status: todoListMasterItemId[0]?.id,
90
96
  category: act?.action_category_code,
91
97
  task_owner: leadData[0]?.lead_owner,
98
+ code: taskCode,
92
99
  });
93
100
  await this.TaskRepository.save(taskData);
94
101
  }
@@ -273,7 +273,7 @@ export class WorkflowMetaService extends EntityServiceImpl {
273
273
  is_current: 'Y',
274
274
  });
275
275
 
276
- this.populateActionService(
276
+ await this.populateActionService(
277
277
  stageData.nextStage.id,
278
278
  loggedInUser,
279
279
  mapped_entity_id,
@@ -1,5 +0,0 @@
1
- {
2
- "recommendations": [
3
- "dbaeumer.vscode-eslint"
4
- ]
5
- }