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

@@ -13,6 +13,7 @@ import {
import { getUser } from "../user/user.service";
import { createNote } from "../note/note.service";
import { permitModel } from "../permit/permit.schema";
import { createAlert } from "../alert/alert.service";
export async function createNotification(
input: CreateNotificationInput,
@@ -76,6 +77,15 @@ export async function updateNotification(
updateNotificationResult.permitId,
user
);
await createAlert(
user.tenantId,
``,
"user",
user.userId,
updateNotificationResult.permitId,
"permits"
);
}
}
}