rez_core 2.2.81 → 2.2.82
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/activity-log.repository.d.ts +1 -1
- package/dist/module/workflow/repository/activity-log.repository.js +6 -2
- package/dist/module/workflow/repository/activity-log.repository.js.map +1 -1
- package/dist/module/workflow/service/activity-log.service.js +23 -15
- package/dist/module/workflow/service/activity-log.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -1
- package/src/module/workflow/repository/activity-log.repository.ts +6 -2
- package/src/module/workflow/service/activity-log.service.ts +27 -17
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rez_core",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.82",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "",
|
|
6
6
|
"private": false,
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"exceljs": "^4.4.0",
|
|
45
45
|
"handlebars": "^4.7.8",
|
|
46
46
|
"moment": "^2.30.1",
|
|
47
|
+
"moment-timezone": "^0.6.0",
|
|
47
48
|
"multer": "^1.4.5-lts.2",
|
|
48
49
|
"mysql2": "^3.12.0",
|
|
49
50
|
"nodemailer": "^7.0.5",
|
|
@@ -15,7 +15,7 @@ export const ACTIVITY_CATEGORIES = {
|
|
|
15
15
|
STATUS: 'STATUS',
|
|
16
16
|
TASK: 'TASK',
|
|
17
17
|
LEAD: 'LEAD',
|
|
18
|
-
STAGEGROUP: '
|
|
18
|
+
STAGEGROUP: 'STAGE_GROUP',
|
|
19
19
|
} as const;
|
|
20
20
|
|
|
21
21
|
export type ActivityCategoryType = keyof typeof ACTIVITY_CATEGORIES;
|
|
@@ -104,8 +104,12 @@ export class ActivityLogRepository {
|
|
|
104
104
|
|
|
105
105
|
.getRawMany();
|
|
106
106
|
return result.map((row) => {
|
|
107
|
+
const formattedLabel = row.category
|
|
108
|
+
.toLowerCase() // stage_group
|
|
109
|
+
.replace(/_/g, ' ') // stage group
|
|
110
|
+
.replace(/\b\w/g, (char) => char.toUpperCase()); // Stage Group
|
|
107
111
|
return {
|
|
108
|
-
label:
|
|
112
|
+
label: formattedLabel,
|
|
109
113
|
value: row.category,
|
|
110
114
|
};
|
|
111
115
|
});
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { Injectable } from '@nestjs/common';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
ACTIVITY_CATEGORIES,
|
|
4
|
+
ActivityLogRepository,
|
|
5
|
+
} from '../repository/activity-log.repository';
|
|
3
6
|
import { ActivityLog } from '../entity/activity-log.entity';
|
|
4
7
|
import { log } from 'console';
|
|
5
8
|
import { EntityServiceImpl } from 'src/module/meta/service/entity-service-impl.service';
|
|
@@ -7,43 +10,50 @@ import { UserData } from 'src/module/user/entity/user.entity';
|
|
|
7
10
|
|
|
8
11
|
function enrichData(category: string, logData: any): any {
|
|
9
12
|
switch (category) {
|
|
10
|
-
case
|
|
11
|
-
logData.color = '#
|
|
13
|
+
case ACTIVITY_CATEGORIES.STAGE:
|
|
14
|
+
logData.color = '#06aed4';
|
|
12
15
|
logData.icon = 'stage';
|
|
13
16
|
break;
|
|
14
|
-
case
|
|
17
|
+
case ACTIVITY_CATEGORIES.INTERACTION:
|
|
15
18
|
logData.color = '#7a5af8';
|
|
16
19
|
logData.icon = 'interaction';
|
|
17
20
|
break;
|
|
18
|
-
case
|
|
21
|
+
case ACTIVITY_CATEGORIES.FORM:
|
|
19
22
|
logData.color = '#eaaa08';
|
|
20
23
|
logData.icon = 'form';
|
|
21
24
|
break;
|
|
22
|
-
case
|
|
25
|
+
case ACTIVITY_CATEGORIES.ASSIGN:
|
|
23
26
|
logData.color = '#16b364';
|
|
24
27
|
logData.icon = 'assign';
|
|
25
28
|
break;
|
|
26
|
-
case
|
|
27
|
-
logData.color = '#
|
|
29
|
+
case ACTIVITY_CATEGORIES.MEETING:
|
|
30
|
+
logData.color = '#7a5af8';
|
|
28
31
|
logData.icon = 'meeting';
|
|
29
32
|
break;
|
|
30
|
-
case
|
|
31
|
-
logData.color = '#
|
|
33
|
+
case ACTIVITY_CATEGORIES.PROCESS:
|
|
34
|
+
logData.color = '#06aed4';
|
|
32
35
|
logData.icon = 'process';
|
|
33
36
|
break;
|
|
34
|
-
case
|
|
35
|
-
logData.color = '#
|
|
37
|
+
case ACTIVITY_CATEGORIES.STATUS:
|
|
38
|
+
logData.color = '#06aed4';
|
|
36
39
|
logData.icon = 'status';
|
|
37
40
|
break;
|
|
38
|
-
case
|
|
39
|
-
logData.color = '#
|
|
41
|
+
case ACTIVITY_CATEGORIES.TASK:
|
|
42
|
+
logData.color = '#f63d68';
|
|
40
43
|
logData.icon = 'task';
|
|
41
44
|
break;
|
|
42
|
-
case
|
|
43
|
-
logData.color = '#
|
|
45
|
+
case ACTIVITY_CATEGORIES.LEAD:
|
|
46
|
+
logData.color = '#16b364';
|
|
44
47
|
logData.icon = 'lead';
|
|
45
48
|
break;
|
|
46
|
-
|
|
49
|
+
case ACTIVITY_CATEGORIES.ASSESSMENT:
|
|
50
|
+
logData.color = '#f63d68';
|
|
51
|
+
logData.icon = 'assessment';
|
|
52
|
+
break;
|
|
53
|
+
case ACTIVITY_CATEGORIES.STAGEGROUP:
|
|
54
|
+
logData.color = '#06aed4';
|
|
55
|
+
logData.icon = 'stage_group';
|
|
56
|
+
break;
|
|
47
57
|
default:
|
|
48
58
|
logData.color = '#ff0000';
|
|
49
59
|
logData.icon = 'DEFAULT';
|