+1
-1
@@ -632,7 +632,7 @@ export async function shareWithClient(shotId: string) {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
if (!shot) throw new Error("Shot not found");
|
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");
|
throw new Error("Shot must be internally approved before sharing with client");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -272,7 +272,7 @@ export default function ShotDetailPage() {
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
{/* Client sharing badge */}
|
{/* Client sharing badge */}
|
||||||
{shot.shotApprovalStatus === "INTERNALLY_APPROVED" && (
|
{["INTERNALLY_APPROVED", "CLIENT_APPROVED"].includes(shot.shotApprovalStatus) && (
|
||||||
<Badge variant="outline" className={cn(
|
<Badge variant="outline" className={cn(
|
||||||
"text-[11px]",
|
"text-[11px]",
|
||||||
shot.sharedWithClient
|
shot.sharedWithClient
|
||||||
@@ -361,7 +361,7 @@ export default function ShotDetailPage() {
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
{/* Share / Unshare with client */}
|
{/* Share / Unshare with client */}
|
||||||
{canInternallyApprove && shot.shotApprovalStatus === "INTERNALLY_APPROVED" && !shot.sharedWithClient && (
|
{canInternallyApprove && ["INTERNALLY_APPROVED", "CLIENT_APPROVED"].includes(shot.shotApprovalStatus) && !shot.sharedWithClient && (
|
||||||
<Button
|
<Button
|
||||||
variant="outline"
|
variant="outline"
|
||||||
size="sm"
|
size="sm"
|
||||||
|
|||||||
Reference in New Issue
Block a user