add assigned to notes to permits

This commit is contained in:
2025-06-03 18:44:58 +05:30
parent e25c9e5f92
commit e52df864ab

View File

@@ -12,6 +12,7 @@ import {
} from "./notification.schema";
import { getUser } from "../user/user.service";
import { createNote } from "../note/note.service";
import { permitModel } from "../permit/permit.schema";
export async function createNotification(
input: CreateNotificationInput,
@@ -68,6 +69,14 @@ export async function updateNotification(
notifId,
user
);
if (key === "assignedTo") {
await createNote(
{ content: msg },
updateNotificationResult.permitId,
user
);
}
}
}
}