diff --git a/src/app/(app)/projects/[projectId]/deliverables/[deliverableId]/review/page.tsx b/src/app/(app)/projects/[projectId]/deliverables/[deliverableId]/review/page.tsx index 40e6c36..ece9fb6 100644 --- a/src/app/(app)/projects/[projectId]/deliverables/[deliverableId]/review/page.tsx +++ b/src/app/(app)/projects/[projectId]/deliverables/[deliverableId]/review/page.tsx @@ -1,13 +1,16 @@ "use client"; -import { use } from "react"; +import { use, useState } from "react"; import Link from "next/link"; -import { ArrowLeft, AlertCircle } from "lucide-react"; +import { ArrowLeft } from "lucide-react"; +import { useQueryClient } from "@tanstack/react-query"; import { useDeliverable } from "@/hooks/use-deliverables"; import { useRevisions } from "@/hooks/use-revisions"; +import { useCurrentUser } from "@/hooks/use-current-user"; import { formatRevisionLabel } from "@/lib/format-revision-label"; import { Button } from "@/components/ui/button"; import { Badge } from "@/components/ui/badge"; +import { AssetUploadZone } from "@/components/review/asset-upload-zone"; // Phase 5 transitional page. The HP-style annotation surface is being // rebuilt against the single-asset revision model. For now, this page @@ -46,6 +49,17 @@ export default function DeliverableReviewPage({ params, searchParams }: PageProp const revisions = (revData as RevisionLike[] | undefined) ?? []; const latest = revisions[0]; + const { data: me } = useCurrentUser(); + const canEdit = !!me && (me as any).role !== "CLIENT_VIEWER"; + + const queryClient = useQueryClient(); + const [showReplace, setShowReplace] = useState(false); + const refreshRevisions = () => { + queryClient.invalidateQueries({ queryKey: ["revisions", stageId] }); + queryClient.invalidateQueries({ queryKey: ["deliverable", projectId, deliverableId] }); + setShowReplace(false); + }; + return (
Full annotation + comparison surface is being rebuilt against the - new single-asset revision model. For now, all review actions - (Approve, Request changes, Send to client, New revision) live in - the in-row panel on the deliverable detail page. + new single-asset revision model. For now, the in-row panel on the + deliverable detail page is where Approve / Request changes / Send + to client / New revision live.