rez_core 2.2.84 → 2.2.85

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.84",
3
+ "version": "2.2.85",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -38,12 +38,7 @@ export class ActivityLogRepository {
38
38
  const query = this.activityLogRepository
39
39
  .createQueryBuilder('log')
40
40
  .leftJoin('cr_user', 'user', 'log.created_by = user.id')
41
- .leftJoin(
42
- 'eth_user_profile',
43
- 'profile',
44
- 'profile.parent_id = user.id AND profile.parent_id = :loggedInUserId',
45
- { loggedInUserId },
46
- )
41
+ .leftJoin('eth_user_profile', 'profile', 'profile.parent_id = user.id')
47
42
  .addSelect('user.name', 'user_name')
48
43
  .addSelect('profile.profile_image', 'profile_image') // media ID
49
44
  .where('log.mapped_entity_type = :mapped_entity_type', {
@@ -73,11 +68,14 @@ export class ActivityLogRepository {
73
68
  );
74
69
  }
75
70
 
71
+ const formattedLabel = entity.category
72
+ .toLowerCase() // stage_group
73
+ .replace(/_/g, ' ') // stage group
74
+ .replace(/\b\w/g, (char) => char.toUpperCase()); // Stage Group
75
+
76
76
  return {
77
77
  ...entity,
78
- category:
79
- entity.category.slice(0, 1).toUpperCase() +
80
- entity.category.slice(1).toLowerCase(),
78
+ category: formattedLabel,
81
79
  user_name: rows.raw[i].user_name,
82
80
  profile, // whole JSON from media service
83
81
  created_date: entity.created_date
@@ -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.code} was edited`,
114
+ description: `${entityData.name} 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.code} was marked as completed`,
127
+ description: `${entityData.name} was marked as completed`,
128
128
  category: ACTIVITY_CATEGORIES.TASK,
129
129
  action: 'completed',
130
130
  appcode: loggedInUser.appcode,
@@ -344,7 +344,7 @@ export class TaskService extends EntityServiceImpl {
344
344
  mapped_entity_id: task.mapped_entity_id,
345
345
  mapped_entity_type: task.mapped_entity_type,
346
346
  title: `Task deleted`,
347
- description: `${task.code} was deleted`,
347
+ description: `${task.name} was deleted`,
348
348
  category: ACTIVITY_CATEGORIES.TASK,
349
349
  action: 'delete',
350
350
  appcode: loggedInUser.appcode,