fix(graph): lower year-filter floor to 1980, dynamic ceiling
The /graph "משנה / עד שנה" dropdown was hardcoded to 1994–2026, so dated precedents below 1994 were unreachable by the year filter. After backfilling decision dates, the corpus now has precedents from 1982 (ע"א 725/81), 1988 (910/86) and 1990 (בג"ץ 1578/90). Floor → 1980 (covers the oldest); ceiling → current year via getFullYear() so the range never ages out. Pure UI-logic change — same year_from/year_to params, no new data path (G2), no backend touch. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -48,7 +48,14 @@ export type GraphControls = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const ALL = "__all__";
|
const ALL = "__all__";
|
||||||
const YEARS = Array.from({ length: 2026 - 1994 + 1 }, (_, i) => 2026 - i);
|
// Floor covers the oldest dated precedent in the corpus (currently ע"א 725/81 →
|
||||||
|
// 1982); ceiling tracks the current year so the range never ages out.
|
||||||
|
const YEAR_FLOOR = 1980;
|
||||||
|
const CURRENT_YEAR = new Date().getFullYear();
|
||||||
|
const YEARS = Array.from(
|
||||||
|
{ length: CURRENT_YEAR - YEAR_FLOOR + 1 },
|
||||||
|
(_, i) => CURRENT_YEAR - i,
|
||||||
|
);
|
||||||
|
|
||||||
const COLOR_BY: { value: ColorBy; label: string }[] = [
|
const COLOR_BY: { value: ColorBy; label: string }[] = [
|
||||||
{ value: "type", label: "סוג נקודה" },
|
{ value: "type", label: "סוג נקודה" },
|
||||||
|
|||||||
Reference in New Issue
Block a user