rez_core 2.2.97 → 2.2.98

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": "2.2.97",
3
+ "version": "2.2.98",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -42,11 +42,11 @@ export class ActivityLogController {
42
42
  async getAllActivityCategory(
43
43
  @Req() req: Request & { user: any },
44
44
  @Body('entity_type') mapped_entity_type: string,
45
- // @Body('mapped_entity_id') mapped_entity_id: string,
45
+ @Body('mapped_entity_id') mapped_entity_id: string,
46
46
  ) {
47
47
  const loggedInUser = req.user.userData;
48
48
  const result = this.activityLogService.getAllActivityCategory(
49
- // mapped_entity_id,
49
+ mapped_entity_id,
50
50
  mapped_entity_type,
51
51
  loggedInUser,
52
52
  );
@@ -89,7 +89,7 @@ export class ActivityLogRepository {
89
89
  }
90
90
 
91
91
  async getAllActivityCategory(
92
- // mapped_entity_id: number | string,
92
+ mapped_entity_id: number | string,
93
93
  mapped_entity_type: string,
94
94
  loggedInUser: any,
95
95
  ) {
@@ -102,6 +102,9 @@ export class ActivityLogRepository {
102
102
  mapped_entity_type,
103
103
  })
104
104
  .andWhere('log.organization_id = :organization_id', { organization_id })
105
+ .andWhere('log.mapped_entity_id = :mapped_entity_id', {
106
+ mapped_entity_id,
107
+ })
105
108
 
106
109
  .getRawMany();
107
110
  return result.map((row) => {
@@ -93,12 +93,12 @@ export class ActivityLogService extends EntityServiceImpl {
93
93
  }
94
94
 
95
95
  async getAllActivityCategory(
96
- // mapped_entity_id: number | string,
96
+ mapped_entity_id: number | string,
97
97
  mapped_entity_type: string,
98
98
  loggedInUser,
99
99
  ) {
100
100
  const result = this.activityLogRepository.getAllActivityCategory(
101
- // mapped_entity_id,
101
+ mapped_entity_id,
102
102
  mapped_entity_type,
103
103
  loggedInUser,
104
104
  );
@@ -38,10 +38,10 @@ export class TaskService extends EntityServiceImpl {
38
38
 
39
39
  try {
40
40
  const logData = {
41
- mapped_entity_id: entityData.mapped_entity_id,
42
- mapped_entity_type: entityData.mapped_entity_type,
41
+ mapped_entity_id: result.mapped_entity_id,
42
+ mapped_entity_type: result.mapped_entity_type,
43
43
  title: `Task added`,
44
- description: `A new task ${entityData.name} was added`,
44
+ description: `A new task ${result.name} was added`,
45
45
  category: ACTIVITY_CATEGORIES.TASK,
46
46
  action: 'add',
47
47
  appcode: loggedInUser.appcode,
@@ -111,7 +111,7 @@ export class TaskService extends EntityServiceImpl {
111
111
  mapped_entity_id: updatedEntity.mapped_entity_id,
112
112
  mapped_entity_type: updatedEntity.mapped_entity_type,
113
113
  title: `Task edited`,
114
- description: `${entityData.name} was edited`,
114
+ description: `${updatedEntity.code} was edited`,
115
115
  category: ACTIVITY_CATEGORIES.TASK,
116
116
  action: 'edit',
117
117
  appcode: loggedInUser.appcode,
@@ -124,7 +124,7 @@ export class TaskService extends EntityServiceImpl {
124
124
  mapped_entity_id: updatedEntity.mapped_entity_id,
125
125
  mapped_entity_type: updatedEntity.mapped_entity_type,
126
126
  title: `Task completed`,
127
- description: `${entityData.name} was marked as completed`,
127
+ description: `${updatedEntity.code} was marked as completed`,
128
128
  category: ACTIVITY_CATEGORIES.TASK,
129
129
  action: 'completed',
130
130
  appcode: loggedInUser.appcode,