From 935a293777af57a9d4deaded1b407c228a87267c Mon Sep 17 00:00:00 2001 From: twotalesanimation <80506065+twotalesanimation@users.noreply.github.com> Date: Thu, 25 Jun 2026 19:13:32 +0200 Subject: [PATCH] sharing logic --- actions/shots.ts | 2 +- app/(dashboard)/projects/[id]/shots/[shotId]/page.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/actions/shots.ts b/actions/shots.ts index ededc53..d1f9f46 100644 --- a/actions/shots.ts +++ b/actions/shots.ts @@ -632,7 +632,7 @@ export async function shareWithClient(shotId: string) { }, }); if (!shot) throw new Error("Shot not found"); - if (shot.shotApprovalStatus !== "INTERNALLY_APPROVED") { + if (!(["INTERNALLY_APPROVED", "CLIENT_APPROVED"] as string[]).includes(shot.shotApprovalStatus)) { throw new Error("Shot must be internally approved before sharing with client"); } diff --git a/app/(dashboard)/projects/[id]/shots/[shotId]/page.tsx b/app/(dashboard)/projects/[id]/shots/[shotId]/page.tsx index bb5966c..7a1aa7e 100644 --- a/app/(dashboard)/projects/[id]/shots/[shotId]/page.tsx +++ b/app/(dashboard)/projects/[id]/shots/[shotId]/page.tsx @@ -272,7 +272,7 @@ export default function ShotDetailPage() { )} {/* Client sharing badge */} - {shot.shotApprovalStatus === "INTERNALLY_APPROVED" && ( + {["INTERNALLY_APPROVED", "CLIENT_APPROVED"].includes(shot.shotApprovalStatus) && (