import { taxonomy } from "@/lib/admin/queries"; import { requireUserPage } from "@/lib/auth/guard"; import { csrfToken } from "@/lib/auth/session"; import { taxonomyAction } from "@/lib/admin/actions"; import { Check, Csrf, Field, Notice, PageTitle, Select } from "@/components/admin-ui"; export default async function Taxonomy({ searchParams }: { searchParams: Promise> }) { const sp = await searchParams; const u = await requireUserPage(); const csrf = csrfToken(u); const tax = await taxonomy(); const Del = ({ kind, id }: { kind: string; id: number }) =>
; return (

Authors, research domains and topics, methods, datasets and series. Editing a name updates every paper that uses it. Deleting a topic/method/dataset removes its assignments; authors with papers cannot be deleted.

Authors ({tax.authors.length})

{tax.authors.map((a) =>
{a.display_name}{a.is_primary ? primary : null}
)}
+ New author

Domains and topics ({tax.topics.length})

{tax.topics.map((t) =>
{t.kind === "domain" ? "◆ " : ""}{t.name_en} · {t.n}
)}
+ New method

Datasets ({tax.datasets.length})

{tax.datasets.map((d) =>
{d.name_en} · {d.n}
)}
+ New dataset

Series ({tax.series.length})

{tax.series.map((s) =>
{s.code} — {s.name_en}
)}
+ New series
); }