create alerts when user is assignedTo a resource

This commit is contained in:
2025-06-21 17:59:41 +05:30
parent e821c8d11d
commit ad24708f85
5 changed files with 45 additions and 6 deletions

View File

@@ -213,7 +213,7 @@ export async function updateRts(
.populate({ path: "client", select: "pid name avatar" })
.populate({ path: "assignedTo", select: "pid name avatar" });
if (input.assignedTo) {
if (updatedRts && input.assignedTo) {
await createAlert(
user.tenantId,
`You are assigned to RTS`,