kanban share with client enabled
Deploy / deploy (push) Successful in 2m32s

This commit is contained in:
twotalesanimation
2026-05-24 18:15:06 +02:00
parent 2020f59152
commit 5c452a7512
+20
View File
@@ -267,6 +267,26 @@ export async function updateTaskStatus(taskId: string, status: TaskStatus) {
}).catch(() => {}); }).catch(() => {});
} }
// When moved to CLIENT_REVIEW, mark the latest version as client-visible
// (same effect as clicking "Share with Client" on the video player page)
if (status === "CLIENT_REVIEW") {
const latestVersion = await db.version.findFirst({
where: { taskId, isLatest: true },
select: { id: true, isClientVisible: true },
});
if (latestVersion && !latestVersion.isClientVisible) {
await db.version.update({
where: { id: latestVersion.id },
data: {
isClientVisible: true,
sharedAt: new Date(),
sharedById: session.user.id,
},
});
revalidatePath(`/review/${latestVersion.id}`);
}
}
// Recalculate shot status from task states // Recalculate shot status from task states
if (task.shot) { if (task.shot) {
await recalcShotStatus(task.shot.id).catch(() => {}); await recalcShotStatus(task.shot.id).catch(() => {});