feat(nav): הסרת פילי-טאבים ותגי-ניווט + הורדת "פסיקה חסרה" מהתפריט (#3/#4)
#3 — הסרת תגי-המספר הקטנים: - app-shell: הוסרו ApprovalsBadge ("מרכז אישורים") ו-MissingPrecedentsBadge. - precedents: הוסרו CountPill/PendingPill/PlansPendingPill/IncomingPill מהטאבים; הקו-תחתון-זהב לבדו נושא את מצב-הטאב-הפעיל. #4 — "פסיקה חסרה" ירדה מתפריט-הניווט "פסיקה" (כפולה לטאב "פסיקה נכנסת" ב-/precedents). הדף /missing-precedents נשאר נגיש מתוך אותו טאב. מאושר דרך שער-העיצוב (Claude Design 07-precedents). Invariants: G2 — הסרת תגים-מקבילים; INV-IA1 — מרכז-האישורים נשאר שער-יחיד (התג ירד, הדף לא). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -9,8 +9,6 @@ import { LibrarySearchPanel } from "@/components/precedents/library-search-panel
|
||||
import { HalachaReviewPanel } from "@/components/precedents/halacha-review-panel";
|
||||
import { PlansReviewPanel } from "@/components/precedents/plans-review-panel";
|
||||
import { LibraryStatsPanel } from "@/components/precedents/library-stats-panel";
|
||||
import { useHalachotPending } from "@/lib/api/precedent-library";
|
||||
import { usePlansPending } from "@/lib/api/plans";
|
||||
import { useMissingPrecedents } from "@/lib/api/missing-precedents";
|
||||
|
||||
/**
|
||||
@@ -27,39 +25,6 @@ import { useMissingPrecedents } from "@/lib/api/missing-precedents";
|
||||
* per-case precedent attacher (chair-attached quotes scoped to a case).
|
||||
*/
|
||||
|
||||
/** Colored count pill riding on a tab trigger (mockup 07: warn for review
|
||||
* queue, info for incoming). Returns null when the queue is empty. */
|
||||
function CountPill({ n, tone }: { n: number; tone: "warn" | "info" }) {
|
||||
if (!n) return null;
|
||||
const cls =
|
||||
tone === "warn"
|
||||
? "bg-warn text-white"
|
||||
: "bg-info text-white";
|
||||
return (
|
||||
<span
|
||||
className={`ms-1.5 inline-flex items-center justify-center rounded-full px-1.5 min-w-[1.15rem] h-[1.15rem] text-[0.68rem] font-semibold tabular-nums ${cls}`}
|
||||
>
|
||||
{n}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
||||
function PendingPill() {
|
||||
const { data } = useHalachotPending();
|
||||
return <CountPill n={data?.count ?? 0} tone="warn" />;
|
||||
}
|
||||
|
||||
function PlansPendingPill() {
|
||||
const { data } = usePlansPending();
|
||||
return <CountPill n={data?.count ?? 0} tone="warn" />;
|
||||
}
|
||||
|
||||
function IncomingPill() {
|
||||
// "פסיקה נכנסת" = open missing-precedents waiting for the chair to upload.
|
||||
const { data } = useMissingPrecedents({ status: "open", limit: 1 });
|
||||
return <CountPill n={data?.by_status?.open ?? 0} tone="info" />;
|
||||
}
|
||||
|
||||
const PRECEDENT_TABS = new Set(["library", "search", "review", "plans", "incoming", "stats"]);
|
||||
|
||||
export default function PrecedentsPage() {
|
||||
@@ -93,19 +58,16 @@ export default function PrecedentsPage() {
|
||||
</div>
|
||||
|
||||
{/* tabs as a dedicated row under the header — underline-style
|
||||
triggers with colored count pills (mockup 07). */}
|
||||
triggers; count pills removed (#3), the active underline alone
|
||||
carries state (mockup 07). */}
|
||||
<TabsList className="flex w-full justify-start gap-1 rounded-none border-0 border-b border-rule bg-transparent p-0 h-auto">
|
||||
{[
|
||||
{ value: "library", label: "ספרייה", pill: null },
|
||||
{ value: "search", label: "חיפוש בקורפוס", pill: null },
|
||||
{ value: "review", label: "תור הלכות", pill: <PendingPill /> },
|
||||
{ value: "plans", label: "תכניות", pill: <PlansPendingPill /> },
|
||||
{
|
||||
value: "incoming",
|
||||
label: "פסיקה נכנסת",
|
||||
pill: <IncomingPill />,
|
||||
},
|
||||
{ value: "stats", label: "סטטיסטיקה", pill: null },
|
||||
{ value: "library", label: "ספרייה" },
|
||||
{ value: "search", label: "חיפוש בקורפוס" },
|
||||
{ value: "review", label: "תור הלכות" },
|
||||
{ value: "plans", label: "תכניות" },
|
||||
{ value: "incoming", label: "פסיקה נכנסת" },
|
||||
{ value: "stats", label: "סטטיסטיקה" },
|
||||
].map((t) => (
|
||||
<TabsTrigger
|
||||
key={t.value}
|
||||
@@ -113,7 +75,6 @@ export default function PrecedentsPage() {
|
||||
className="rounded-none border-0 border-b-2 border-transparent bg-transparent px-4 py-2.5 -mb-px text-sm font-medium text-ink-muted shadow-none data-[state=active]:border-gold data-[state=active]:bg-transparent data-[state=active]:font-semibold data-[state=active]:text-navy data-[state=active]:shadow-none"
|
||||
>
|
||||
{t.label}
|
||||
{t.pill}
|
||||
</TabsTrigger>
|
||||
))}
|
||||
</TabsList>
|
||||
|
||||
Reference in New Issue
Block a user