feat: add cross-album search, auto-rules, album UI redesign, editorial archiving and pdf download
This commit is contained in:
1 parent
9c0d43b1ec
commit
375e5b8b7d
23 files changed
+1153
-43
No files matched your search
@@ -13,19 +13,23 @@ export default async function EditorialsPage() {
|
||||
status: editorialAccounts.status,
|
||||
currentPriceCents: editorialAccounts.currentPriceCents,
|
||||
createdAt: editorialAccounts.createdAt,
|
||||
archivedAt: editorialAccounts.archivedAt,
|
||||
})
|
||||
.from(editorialAccounts)
|
||||
.orderBy(desc(editorialAccounts.createdAt));
|
||||
|
||||
const activeEditorials = editorials.filter((e) => !e.archivedAt);
|
||||
const archivedEditorials = editorials.filter((e) => e.archivedAt);
|
||||
|
||||
return (
|
||||
<section className="content-section" aria-labelledby="editorials-title">
|
||||
<p className="eyebrow">Kontoverwaltung</p>
|
||||
<h1 id="editorials-title">Redaktionen</h1>
|
||||
{editorials.length === 0 ? (
|
||||
<p>Noch keine Redaktionen registriert.</p>
|
||||
{activeEditorials.length === 0 ? (
|
||||
<p>Noch keine aktiven Redaktionen registriert.</p>
|
||||
) : (
|
||||
<ul>
|
||||
{editorials.map((editorial) => (
|
||||
{activeEditorials.map((editorial) => (
|
||||
<li key={editorial.id}>
|
||||
<a href={`/admin/redaktionen/${editorial.id}`}>{editorial.name}</a>
|
||||
<p>
|
||||
@@ -38,6 +42,27 @@ export default async function EditorialsPage() {
|
||||
))}
|
||||
</ul>
|
||||
)}
|
||||
|
||||
{archivedEditorials.length > 0 && (
|
||||
<details className="mt-8">
|
||||
<summary className="cursor-pointer text-sm font-semibold text-gray-500 uppercase tracking-widest">
|
||||
Archivierte Redaktionen ({archivedEditorials.length})
|
||||
</summary>
|
||||
<ul className="mt-4 opacity-75">
|
||||
{archivedEditorials.map((editorial) => (
|
||||
<li key={editorial.id}>
|
||||
<a href={`/admin/redaktionen/${editorial.id}`} className="text-gray-600">
|
||||
{editorial.name}
|
||||
</a>
|
||||
<p className="text-gray-500">
|
||||
{editorial.contactName} · {editorial.loginEmail} · Archiviert am:{" "}
|
||||
{editorial.archivedAt?.toLocaleDateString("de-DE")}
|
||||
</p>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</details>
|
||||
)}
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user