All checks were successful
G12 Leak-Guard / leak-guard (pull_request) Successful in 8s
מעבר מלא על שאר 13 הדפים מול מוקאפי-Claude-Design המאושרים. **UI/className בלבד — שום hook/query/mutation/טאב/טופס/לוגיקה לא נגע** (אומת: 0 הסרות-hook/import ב-diff). שונו (פער-ויזואלי אמיתי): - archive — pill-ספירה ב-gold-wash + breadcrumb (הוסר טקסט-ספירה כפול בכרטיס). - feedback — CTA "סמן כיושם" gold-filled + תיבת-לקח עם גבול-זהב-לוגי. - methodology — כותרת קנונית (breadcrumb + h1 text-navy + gradient divider). - missing-precedents — pill open-count (warn-bg, tabular-nums). - precedents/[id] — ציטוט-מפתח gold-wash + border-s לוגי; צ'יפי-מטא צבעוניים (domain=info/level=gold/binding=success). - skills — נקודות-סטטוס צבעוניות בתוך ה-pills. - scripts — breadcrumb + gradient divider. - components/precedents: library-search-panel (border לוגי, "קטע"=info, צ'יפ "הלכות מאושרות בלבד"), halacha-meta (binding=success/persuasive=gold-wash). parity — ללא שינוי (כבר תואמים): graph, training, settings, digests, precedents(shell), cases/[n], operations, compose. בדיקות: npx tsc --noEmit ✓ · eslint ✓ (לבד מ-learning-panel:109 קיים-מראש). מסכם את תרגום 17 הדפים לפרודקשן (צרור-1 #211 = approvals+home). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
55 lines
1.8 KiB
TypeScript
55 lines
1.8 KiB
TypeScript
"use client";
|
|
/**
|
|
* Shared halacha-classification labels + badge (INV-DM7 — two orthogonal axes).
|
|
*
|
|
* rule_type holds the rule ROLE (what KIND of statement). authority (binding vs
|
|
* persuasive) is a SEPARATE, DERIVED axis (where it came from) — rendered as a
|
|
* distinct read-only badge, never mixed into the role label.
|
|
*/
|
|
import { Badge } from "@/components/ui/badge";
|
|
|
|
/** rule ROLE labels. Legacy authority values (binding/persuasive) are kept as a
|
|
* fallback so pre-backfill rows still render a Hebrew word during rollout. */
|
|
export const RULE_TYPE_LABELS: Record<string, string> = {
|
|
holding: "עיקרון מהותי",
|
|
interpretive: "פרשני",
|
|
procedural: "פרוצדורלי",
|
|
application: "יישום",
|
|
obiter: "אמרת אגב",
|
|
// legacy (pre-split) — fold to role wording until backfill completes
|
|
binding: "עיקרון מהותי",
|
|
persuasive: "פרשני",
|
|
};
|
|
|
|
export function ruleTypeLabel(t: string | null | undefined): string {
|
|
return (t && RULE_TYPE_LABELS[t]) || t || "—";
|
|
}
|
|
|
|
export const AUTHORITY_LABELS: Record<string, string> = {
|
|
binding: "מחייב",
|
|
persuasive: "משכנע",
|
|
};
|
|
|
|
/** Read-only authority badge — derived from the source, the chair never sets it. */
|
|
export function AuthorityBadge({
|
|
authority,
|
|
}: {
|
|
authority?: string | null;
|
|
}) {
|
|
if (!authority || !AUTHORITY_LABELS[authority]) return null;
|
|
const isBinding = authority === "binding";
|
|
return (
|
|
<Badge
|
|
variant="outline"
|
|
title="דרגת-המחייבות נגזרת אוטומטית מזהות הערכאה"
|
|
className={
|
|
isBinding
|
|
? "text-[0.65rem] bg-success-bg text-success border-transparent"
|
|
: "text-[0.65rem] bg-gold-wash text-gold-deep border-rule"
|
|
}
|
|
>
|
|
{AUTHORITY_LABELS[authority]}
|
|
</Badge>
|
|
);
|
|
}
|