add assigned to notes to permits
This commit is contained in:
@@ -12,6 +12,7 @@ import {
|
|||||||
} from "./notification.schema";
|
} from "./notification.schema";
|
||||||
import { getUser } from "../user/user.service";
|
import { getUser } from "../user/user.service";
|
||||||
import { createNote } from "../note/note.service";
|
import { createNote } from "../note/note.service";
|
||||||
|
import { permitModel } from "../permit/permit.schema";
|
||||||
|
|
||||||
export async function createNotification(
|
export async function createNotification(
|
||||||
input: CreateNotificationInput,
|
input: CreateNotificationInput,
|
||||||
@@ -68,6 +69,14 @@ export async function updateNotification(
|
|||||||
notifId,
|
notifId,
|
||||||
user
|
user
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (key === "assignedTo") {
|
||||||
|
await createNote(
|
||||||
|
{ content: msg },
|
||||||
|
updateNotificationResult.permitId,
|
||||||
|
user
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user