@@ -14,6 +14,9 @@ import {
|
||||
Package,
|
||||
CalendarDays,
|
||||
CheckCircle2,
|
||||
AlertCircle,
|
||||
ShieldCheck,
|
||||
Eye,
|
||||
} from "lucide-react";
|
||||
import { ShotStatus } from "@prisma/client";
|
||||
import { formatDistanceToNow } from "date-fns";
|
||||
@@ -22,11 +25,13 @@ const STATUS_CONFIG: Record<
|
||||
ShotStatus,
|
||||
{ label: string; color: string }
|
||||
> = {
|
||||
WAITING: { label: "Waiting", color: "bg-zinc-500/10 text-zinc-400 border-zinc-500/20" },
|
||||
IN_PROGRESS: { label: "In Progress", color: "bg-blue-500/10 text-blue-400 border-blue-500/20" },
|
||||
IN_REVIEW: { label: "In Review", color: "bg-purple-500/10 text-purple-400 border-purple-500/20" },
|
||||
REVISIONS: { label: "Revisions", color: "bg-orange-500/10 text-orange-400 border-orange-500/20" },
|
||||
COMPLETE: { label: "Complete", color: "bg-emerald-500/10 text-emerald-400 border-emerald-500/20" },
|
||||
WAITING: { label: "Waiting", color: "bg-zinc-500/10 text-zinc-400 border-zinc-500/20" },
|
||||
IN_PROGRESS: { label: "In Progress", color: "bg-blue-500/10 text-blue-400 border-blue-500/20" },
|
||||
INTERNAL_REVIEW: { label: "Internal Review", color: "bg-purple-500/10 text-purple-400 border-purple-500/20" },
|
||||
READY_FOR_CLIENT: { label: "Ready for Client", color: "bg-sky-500/10 text-sky-400 border-sky-500/20" },
|
||||
CLIENT_REVIEW: { label: "Client Review", color: "bg-indigo-500/10 text-indigo-400 border-indigo-500/20" },
|
||||
REVISIONS: { label: "Revisions", color: "bg-orange-500/10 text-orange-400 border-orange-500/20" },
|
||||
COMPLETE: { label: "Complete", color: "bg-emerald-500/10 text-emerald-400 border-emerald-500/20" },
|
||||
};
|
||||
|
||||
const PRIORITY_DOT: Record<string, string> = {
|
||||
|
||||
@@ -12,6 +12,8 @@ import {
|
||||
AlertCircle,
|
||||
Film,
|
||||
MessageSquare,
|
||||
ShieldCheck,
|
||||
Eye,
|
||||
} from "lucide-react";
|
||||
import type { ShotWithDetails } from "@/types";
|
||||
|
||||
@@ -22,19 +24,23 @@ interface ShotQueueProps {
|
||||
}
|
||||
|
||||
const STATUS_STYLES: Record<string, string> = {
|
||||
WAITING: "text-zinc-400",
|
||||
IN_PROGRESS: "text-blue-400",
|
||||
IN_REVIEW: "text-purple-400",
|
||||
REVISIONS: "text-orange-400",
|
||||
COMPLETE: "text-emerald-400",
|
||||
WAITING: "text-zinc-400",
|
||||
IN_PROGRESS: "text-blue-400",
|
||||
INTERNAL_REVIEW: "text-purple-400",
|
||||
READY_FOR_CLIENT: "text-sky-400",
|
||||
CLIENT_REVIEW: "text-indigo-400",
|
||||
REVISIONS: "text-orange-400",
|
||||
COMPLETE: "text-emerald-400",
|
||||
};
|
||||
|
||||
const STATUS_ICONS: Record<string, React.ElementType> = {
|
||||
WAITING: Clock,
|
||||
IN_PROGRESS: Film,
|
||||
IN_REVIEW: AlertCircle,
|
||||
REVISIONS: AlertCircle,
|
||||
COMPLETE: CheckCircle2,
|
||||
WAITING: Clock,
|
||||
IN_PROGRESS: Film,
|
||||
INTERNAL_REVIEW: AlertCircle,
|
||||
READY_FOR_CLIENT: ShieldCheck,
|
||||
CLIENT_REVIEW: Eye,
|
||||
REVISIONS: AlertCircle,
|
||||
COMPLETE: CheckCircle2,
|
||||
};
|
||||
|
||||
const PRIORITY_DOT: Record<string, string> = {
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user