Files
immich-redaktions-plugin/src/app/admin/abrechnungen/[editorialId]/page.tsx
T
2026-08-10 18:19:13 +02:00

40 lines
1.2 KiB
TypeScript

import Link from "next/link";
import { notFound } from "next/navigation";
import { loadBillingSelection } from "./page-content";
import { BillingSelection } from "./BillingSelection";
export default async function BillingSelectionPage({
params,
searchParams,
}: Readonly<{
params: Promise<{ editorialId: string }>;
searchParams: Promise<Record<string, string | string[] | undefined>>;
}>) {
const { editorialId } = await params;
const sp = await searchParams;
const data = await loadBillingSelection(editorialId, sp);
if (!data) notFound();
return (
<section className="content-section" aria-labelledby="billing-selection-title">
<p className="eyebrow">Abrechnungen</p>
<h1 id="billing-selection-title">{data.editorial.name}</h1>
<p>
<Link href="/admin/abrechnungen">Zurück zur Übersicht</Link>
</p>
<BillingSelection
editorialId={data.editorial.id}
positions={data.positions}
repeatDownloads={data.repeatDownloads}
year={data.year}
month={data.month}
quarter={data.quarter}
isQuarter={data.isQuarter}
periodLabel={data.periodLabel}
reports={data.reports}
/>
</section>
);
}