fix: link album assignment and narrow errors
This commit is contained in:
1 parent
4af86f6eb9
commit
f6e6018cc1
5 files changed
+123
-42
No files matched your search
@@ -3,6 +3,7 @@ import { notFound } from "next/navigation";
|
||||
|
||||
import { db } from "@/db/client";
|
||||
import { albumGrants, editorialAccounts } from "@/db/schema";
|
||||
import { EditorialDetailContent } from "@/modules/editorials/admin-detail";
|
||||
|
||||
export default async function EditorialDetailPage({
|
||||
params,
|
||||
@@ -33,42 +34,5 @@ export default async function EditorialDetailPage({
|
||||
)
|
||||
.limit(1);
|
||||
|
||||
return (
|
||||
<section className="content-section" aria-labelledby="editorial-title">
|
||||
<p className="eyebrow">Redaktion</p>
|
||||
<h1 id="editorial-title">{editorial.name}</h1>
|
||||
<dl>
|
||||
<dt>Ansprechperson</dt>
|
||||
<dd>{editorial.contactName}</dd>
|
||||
<dt>Anmelde-E-Mail</dt>
|
||||
<dd>{editorial.loginEmail}</dd>
|
||||
<dt>Status</dt>
|
||||
<dd>{editorial.status}</dd>
|
||||
<dt>E-Mail bestätigt</dt>
|
||||
<dd>{editorial.emailVerifiedAt ? "Ja" : "Nein"}</dd>
|
||||
<dt>Individueller Nettopreis</dt>
|
||||
<dd>
|
||||
{editorial.currentPriceCents === null
|
||||
? "Noch nicht festgelegt"
|
||||
: formatCents(editorial.currentPriceCents)}
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<section aria-labelledby="approval-title">
|
||||
<h2 id="approval-title">Freigabe</h2>
|
||||
<button type="button" disabled aria-describedby="approval-help">
|
||||
Redaktion freigeben
|
||||
</button>
|
||||
<p id="approval-help">
|
||||
{grant
|
||||
? "Die Freigabe bleibt bis zur Verwaltungsoberfläche für Albumrechte deaktiviert."
|
||||
: "Eine Freigabe ist erst möglich, wenn mindestens ein aktives Albumrecht zugewiesen wurde. Die Verwaltung der Albumrechte folgt im nächsten Schritt."}
|
||||
</p>
|
||||
</section>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
||||
function formatCents(cents: number): string {
|
||||
return new Intl.NumberFormat("de-DE", { style: "currency", currency: "EUR" }).format(cents / 100);
|
||||
return <EditorialDetailContent editorial={editorial} hasActiveGrant={Boolean(grant)} />;
|
||||
}
|
||||
Reference in new issue
Block a user