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/dist/module/workflow/repository/task.repository.d.ts +3 -1
- package/dist/module/workflow/repository/task.repository.js +8 -3
- package/dist/module/workflow/repository/task.repository.js.map +1 -1
- package/dist/module/workflow/service/workflow-meta.service.js +1 -1
- package/dist/module/workflow/service/workflow-meta.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/module/workflow/repository/task.repository.ts +18 -11
- package/src/module/workflow/service/workflow-meta.service.ts +1 -1
- package/.vscode/extensions.json +0 -5
package/package.json
CHANGED
|
@@ -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
|
}
|