new Approval Updates
Deploy / deploy (push) Failing after 3m34s

This commit is contained in:
twotalesanimation
2026-06-11 12:30:28 +02:00
parent b9610454d9
commit 3f0c5d1dbe
19 changed files with 2015 additions and 70 deletions
+36 -5
View File
@@ -26,6 +26,9 @@ import {
AlertCircle,
ArrowUpRight,
Copy,
ShieldCheck,
Share2,
Eye,
} from "lucide-react";
import type { ShotWithDetails } from "@/types";
import { duplicateShot } from "@/actions/shots";
@@ -42,11 +45,19 @@ const STATUS_CONFIG: Record<
string,
{ label: string; color: string; icon: React.ElementType }
> = {
WAITING: { label: "Waiting", color: "bg-zinc-500/10 text-zinc-400 border-zinc-500/20", icon: Clock },
IN_PROGRESS: { label: "In Progress", color: "bg-blue-500/10 text-blue-400 border-blue-500/20", icon: Film },
IN_REVIEW: { label: "In Review", color: "bg-purple-500/10 text-purple-400 border-purple-500/20", icon: AlertCircle },
REVISIONS: { label: "Revisions", color: "bg-orange-500/10 text-orange-400 border-orange-500/20", icon: AlertCircle },
COMPLETE: { label: "Complete", color: "bg-emerald-500/10 text-emerald-400 border-emerald-500/20", icon: CheckCircle2 },
WAITING: { label: "Waiting", color: "bg-zinc-500/10 text-zinc-400 border-zinc-500/20", icon: Clock },
IN_PROGRESS: { label: "In Progress", color: "bg-blue-500/10 text-blue-400 border-blue-500/20", icon: Film },
INTERNAL_REVIEW: { label: "Internal Review", color: "bg-purple-500/10 text-purple-400 border-purple-500/20", icon: AlertCircle },
READY_FOR_CLIENT: { label: "Ready for Client", color: "bg-sky-500/10 text-sky-400 border-sky-500/20", icon: ShieldCheck },
CLIENT_REVIEW: { label: "Client Review", color: "bg-indigo-500/10 text-indigo-400 border-indigo-500/20", icon: Eye },
REVISIONS: { label: "Revisions", color: "bg-orange-500/10 text-orange-400 border-orange-500/20", icon: AlertCircle },
COMPLETE: { label: "Complete", color: "bg-emerald-500/10 text-emerald-400 border-emerald-500/20", icon: CheckCircle2 },
};
const APPROVAL_BADGE: Record<string, { label: string; color: string }> = {
PENDING: { label: "Pending Internal Approval", color: "bg-zinc-500/10 text-zinc-400 border-zinc-500/20" },
INTERNALLY_APPROVED: { label: "Internally Approved", color: "bg-sky-500/10 text-sky-400 border-sky-500/20" },
CLIENT_APPROVED: { label: "Client Approved", color: "bg-emerald-500/10 text-emerald-400 border-emerald-500/20" },
};
const PRIORITY_DOT: Record<string, string> = {
@@ -79,6 +90,8 @@ export function ShotCard({ shot, projectId, compact = false, canManage = false }
}
};
const approvalCfg = APPROVAL_BADGE[shot.shotApprovalStatus] ?? APPROVAL_BADGE.PENDING;
if (compact) {
return (
<div className="flex items-center gap-3 px-3 py-2.5 rounded-lg border border-border hover:border-border/80 transition-colors group">
@@ -209,6 +222,24 @@ export function ShotCard({ shot, projectId, compact = false, canManage = false }
</span>
)}
</div>
{/* Approval + sharing badges */}
<div className="flex flex-wrap gap-1.5 mt-2">
<span className={cn("text-[10px] px-1.5 py-0.5 rounded border", approvalCfg.color)}>
{approvalCfg.label}
</span>
{shot.shotApprovalStatus === "INTERNALLY_APPROVED" && (
<span className={cn(
"text-[10px] px-1.5 py-0.5 rounded border flex items-center gap-1",
shot.sharedWithClient
? "bg-indigo-500/10 text-indigo-400 border-indigo-500/20"
: "bg-zinc-500/10 text-zinc-500 border-zinc-600/20"
)}>
<Share2 className="h-2.5 w-2.5" />
{shot.sharedWithClient ? "Shared With Client" : "Not Shared"}
</span>
)}
</div>
</CardContent>
<CardFooter className="pt-2 flex items-center justify-between">
+4 -2
View File
@@ -25,7 +25,7 @@ import { Upload, X, Film, ImageIcon, Trash2 } from "lucide-react";
const settingsSchema = z.object({
shotCode: z.string().min(1, "Required").max(120).regex(/^[A-Z0-9_]+$/i, "Alphanumeric and underscores only"),
description: z.string().optional(),
status: z.enum(["WAITING", "IN_PROGRESS", "IN_REVIEW", "REVISIONS", "COMPLETE"]),
status: z.enum(["WAITING", "IN_PROGRESS", "INTERNAL_REVIEW", "READY_FOR_CLIENT", "CLIENT_REVIEW", "REVISIONS", "COMPLETE"]),
priority: z.enum(["LOW", "NORMAL", "HIGH", "URGENT"]),
fps: z.coerce.number().min(1).max(240),
frameStart: z.coerce.number().int().optional().or(z.literal("")),
@@ -197,7 +197,9 @@ export function ShotSettingsTab({ shot, artists, onSaved }: ShotSettingsTabProps
<SelectContent>
<SelectItem value="WAITING">Waiting</SelectItem>
<SelectItem value="IN_PROGRESS">In Progress</SelectItem>
<SelectItem value="IN_REVIEW">In Review</SelectItem>
<SelectItem value="INTERNAL_REVIEW">Internal Review</SelectItem>
<SelectItem value="READY_FOR_CLIENT">Ready for Client</SelectItem>
<SelectItem value="CLIENT_REVIEW">Client Review</SelectItem>
<SelectItem value="REVISIONS">Revisions</SelectItem>
<SelectItem value="COMPLETE">Complete</SelectItem>
</SelectContent>