Added status tracking & episode due dates
Deploy / deploy (push) Failing after 2m30s

This commit is contained in:
twotalesanimation
2026-06-03 14:49:12 +02:00
parent 15046892d1
commit e75a15132e
12 changed files with 915 additions and 25 deletions
+25
View File
@@ -459,6 +459,31 @@ export async function removeFootagePlate(plateId: string) {
return { success: true };
}
// ── Update Shot Notes ─────────────────────────────────────────────────────────
export async function updateShotNotes(shotId: string, notes: string) {
const session = await auth();
if (!session?.user) throw new Error("Unauthorized");
if (!["ADMIN", "PRODUCER", "SUPERVISOR"].includes(session.user.role)) {
throw new Error("Insufficient permissions");
}
const shot = await db.shot.findUnique({
where: { id: shotId },
select: { projectId: true },
});
if (!shot) throw new Error("Shot not found");
await db.shot.update({
where: { id: shotId },
data: { notes: notes.trim() || null },
});
revalidatePath(`/projects/${shot.projectId}`);
revalidatePath(`/shot-status`);
return { success: true };
}
export async function deleteShot(shotId: string) {
const session = await auth();
if (!session?.user) throw new Error("Unauthorized");