improvement: task assignment notif added to notifications feature.
This commit is contained in:
@@ -486,13 +486,20 @@ export class CasesService {
|
||||
},
|
||||
});
|
||||
|
||||
if (assigneeUserId && assigneeUserId !== actorUserId) {
|
||||
if (assigneeUserId) {
|
||||
await this.labCaseActivity.record({
|
||||
labCaseId,
|
||||
type: LabCaseActivityType.TASK_ASSIGNED,
|
||||
actorUserId,
|
||||
payload: { taskId, assigneeUserId },
|
||||
});
|
||||
|
||||
void this.userNotifications.notify({
|
||||
organizationId: labOrganizationId,
|
||||
type: UserNotificationType.TASK_ASSIGNED,
|
||||
href: `/tasks?taskId=${encodeURIComponent(taskId)}&labCaseId=${encodeURIComponent(labCaseId)}`,
|
||||
actorUserId,
|
||||
payload: { labCaseId, taskId },
|
||||
payload: { labCaseId, taskId, assigneeUserId },
|
||||
recipientUserIds: [assigneeUserId],
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user