improvement: task assignment notif added to notifications feature.

This commit is contained in:
2026-07-18 17:23:47 +03:30
parent 9941dca849
commit 408b2c3329
16 changed files with 76 additions and 18 deletions

View File

@@ -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],
});
}