Own chart back on the Képletem menu; persons get their own menu, page and a tile
CI / test (push) Failing after 41s
CI / build (push) Skipped
CI / deploy (push) Skipped

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
feco
2026-11-17 11:20:26 +00:00
co-authored by Claude Opus 5.5
parent fef1605848
commit 0791998c13
9 changed files with 114 additions and 92 deletions
@@ -1,4 +1,5 @@
import type { Metadata } from "next";
import Link from "next/link";
import { notFound } from "next/navigation";
import { AspectGrid, AspectList, BigThree, PositionTables } from "@/components/ChartTables";
@@ -29,6 +30,7 @@ export default async function ChartPage({ params }: { params: Promise<{ id: stri
backendGet<{ charts: ChartListItem[] }>("/v1/charts"),
]);
const charts = chartList?.charts ?? [];
const persons = charts.filter((c) => c.kind === "person");
if (!chart) notFound();
const list = analyses?.analyses ?? [];
const summary = list.find((a) => a.kind === "summary" && a.status !== "failed") ?? null;
@@ -50,7 +52,7 @@ export default async function ChartPage({ params }: { params: Promise<{ id: stri
title={chart.is_primary ? "Születési képletem" : chart.label}
currentId={chart.id}
own={charts.find((c) => c.is_primary) ?? null}
persons={charts.filter((c) => c.kind === "person")}
persons={persons}
canAdd={me.persons.left !== 0}
/>
<p className="muted">
@@ -114,6 +116,22 @@ export default async function ChartPage({ params }: { params: Promise<{ id: stri
)}
</div>
)}
{chart.is_primary && (
<Link href="/szemelyek" className="card persons-tile">
<span className="eyebrow">Személyek</span>
<strong>
{persons.length > 0 ? `${persons.length} felvett személy` : "Társad, családod képlete"}
</strong>
<span className="muted">
{persons.length > 0
? persons.slice(0, 3).map((p) => p.label).join(", ") + (persons.length > 3 ? "…" : "")
: "Vedd fel őket, és nézd meg az ő képletüket és elemzésüket is."}
</span>
<span className="persons-tile-arrow" aria-hidden="true">
→
</span>
</Link>
)}
</div>
</section>