feat(ui): convert agent-mgmt link to dropdown for both Paperclip boards
All checks were successful
Build & Deploy / build-and-deploy (push) Successful in 35s
All checks were successful
Build & Deploy / build-and-deploy (push) Successful in 35s
Replaces the hardcoded CMPA link with a dropdown listing both Paperclip boards (CMP = רישוי ובניה, CMPA = היטלי השבחה). Fixes the mislabeling where the original link pointed to the wrong board, and gives the user a single entry point that scales if a third board is added later. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -3,6 +3,29 @@
|
||||
import type { ReactNode } from "react";
|
||||
import Link from "next/link";
|
||||
import { usePathname } from "next/navigation";
|
||||
import { ChevronDown } from "lucide-react";
|
||||
|
||||
import {
|
||||
DropdownMenu,
|
||||
DropdownMenuContent,
|
||||
DropdownMenuItem,
|
||||
DropdownMenuLabel,
|
||||
DropdownMenuSeparator,
|
||||
DropdownMenuTrigger,
|
||||
} from "@/components/ui/dropdown-menu";
|
||||
|
||||
type AgentBoard = {
|
||||
prefix: string;
|
||||
label: string;
|
||||
hint: string;
|
||||
};
|
||||
|
||||
const AGENT_BOARDS: AgentBoard[] = [
|
||||
{ prefix: "CMP", label: "רישוי ובניה", hint: "תיקי 1xxx" },
|
||||
{ prefix: "CMPA", label: "היטלי השבחה", hint: "תיקי 8xxx / 9xxx" },
|
||||
];
|
||||
|
||||
const PAPERCLIP_BASE = "https://pc.nautilus.marcusgroup.org";
|
||||
|
||||
/**
|
||||
* Ezer Mishpati navigation shell.
|
||||
@@ -91,17 +114,49 @@ export function AppShell({ children }: { children: ReactNode }) {
|
||||
})}
|
||||
</nav>
|
||||
|
||||
<a
|
||||
href="https://pc.nautilus.marcusgroup.org/CMPA/dashboard"
|
||||
target="_blank"
|
||||
rel="noreferrer noopener"
|
||||
className="flex items-baseline gap-2 px-3 py-1.5 rounded transition-colors text-parchment/80 hover:text-parchment hover:bg-navy-soft/60"
|
||||
<DropdownMenu>
|
||||
<DropdownMenuTrigger
|
||||
className="
|
||||
flex items-baseline gap-2 px-3 py-1.5 rounded
|
||||
transition-colors outline-none
|
||||
text-parchment/80 hover:text-parchment hover:bg-navy-soft/60
|
||||
focus-visible:ring-2 focus-visible:ring-gold/60
|
||||
data-[state=open]:bg-navy-soft/80 data-[state=open]:text-parchment
|
||||
"
|
||||
aria-label="ניהול סוכנים — בחר ועדה"
|
||||
>
|
||||
<span className="font-display text-[1.45rem] font-bold tracking-[0.02em] text-parchment">
|
||||
ניהול סוכנים
|
||||
</span>
|
||||
<span className="text-gold-soft text-sm font-medium">CMPA</span>
|
||||
<ChevronDown className="size-4 self-center text-gold-soft" aria-hidden="true" />
|
||||
</DropdownMenuTrigger>
|
||||
|
||||
<DropdownMenuContent
|
||||
align="end"
|
||||
sideOffset={10}
|
||||
className="min-w-[220px]"
|
||||
>
|
||||
<DropdownMenuLabel className="text-xs text-muted-foreground">
|
||||
פתח דאשבורד Paperclip
|
||||
</DropdownMenuLabel>
|
||||
<DropdownMenuSeparator />
|
||||
{AGENT_BOARDS.map((board) => (
|
||||
<DropdownMenuItem key={board.prefix} asChild>
|
||||
<a
|
||||
href={`${PAPERCLIP_BASE}/${board.prefix}/dashboard`}
|
||||
target="_blank"
|
||||
rel="noreferrer noopener"
|
||||
className="flex items-baseline justify-between gap-3 cursor-pointer"
|
||||
>
|
||||
<span className="font-medium">{board.label}</span>
|
||||
<span className="text-xs text-muted-foreground tracking-wide">
|
||||
{board.prefix} · {board.hint}
|
||||
</span>
|
||||
</a>
|
||||
</DropdownMenuItem>
|
||||
))}
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
</header>
|
||||
|
||||
<main
|
||||
|
||||
Reference in New Issue
Block a user