add assigned to notes to permits
This commit is contained in:
@@ -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
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user