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 type { ReactNode } from "react";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { usePathname } from "next/navigation";
|
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.
|
* Ezer Mishpati navigation shell.
|
||||||
@@ -91,17 +114,49 @@ export function AppShell({ children }: { children: ReactNode }) {
|
|||||||
})}
|
})}
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<a
|
<DropdownMenu>
|
||||||
href="https://pc.nautilus.marcusgroup.org/CMPA/dashboard"
|
<DropdownMenuTrigger
|
||||||
target="_blank"
|
className="
|
||||||
rel="noreferrer noopener"
|
flex items-baseline gap-2 px-3 py-1.5 rounded
|
||||||
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"
|
transition-colors outline-none
|
||||||
>
|
text-parchment/80 hover:text-parchment hover:bg-navy-soft/60
|
||||||
<span className="font-display text-[1.45rem] font-bold tracking-[0.02em] text-parchment">
|
focus-visible:ring-2 focus-visible:ring-gold/60
|
||||||
ניהול סוכנים
|
data-[state=open]:bg-navy-soft/80 data-[state=open]:text-parchment
|
||||||
</span>
|
"
|
||||||
<span className="text-gold-soft text-sm font-medium">CMPA</span>
|
aria-label="ניהול סוכנים — בחר ועדה"
|
||||||
</a>
|
>
|
||||||
|
<span className="font-display text-[1.45rem] font-bold tracking-[0.02em] text-parchment">
|
||||||
|
ניהול סוכנים
|
||||||
|
</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>
|
</header>
|
||||||
|
|
||||||
<main
|
<main
|
||||||
|
|||||||
Reference in New Issue
Block a user