feat: v2.2 batch (calendar, self-service, sort, description, filename search, stats, collab, invoice) on pre-redesign base
This commit is contained in:
1 parent
453bece72c
commit
7204dd6b60
108 files changed
+10400
-105
No files matched your search
@@ -0,0 +1,66 @@
|
||||
import { PageHeader } from "@/components/ui/page-header";
|
||||
import { releaseNoteService, type ReleaseNoteAudience } from "@/modules/releases/service";
|
||||
|
||||
import { DeleteReleaseNoteButton } from "./DeleteReleaseNoteButton";
|
||||
import { ReleaseNoteForm } from "./ReleaseNoteForm";
|
||||
import { createReleaseNoteAction, deleteReleaseNoteAction } from "./actions";
|
||||
|
||||
const audienceLabels: Record<ReleaseNoteAudience, string> = {
|
||||
admin: "Admins",
|
||||
editorial: "Redaktionen",
|
||||
both: "Beide",
|
||||
};
|
||||
|
||||
export default async function AdminVersionsPage() {
|
||||
const notes = await releaseNoteService.listReleaseNotes();
|
||||
|
||||
return (
|
||||
<div className="space-y-8 max-w-7xl animate-in fade-in slide-in-from-bottom-4 duration-500">
|
||||
<PageHeader
|
||||
kicker="Portal"
|
||||
title="Versionshinweise"
|
||||
description="Was sich im Portal geändert hat, getrennt nach Zielgruppe. Redaktionen sehen ihre Hinweise unter Neuigkeiten. Jede Veröffentlichung im Portal bekommt hier einen Eintrag und eine fortlaufende Versionsnummer."
|
||||
/>
|
||||
|
||||
<ReleaseNoteForm action={createReleaseNoteAction} />
|
||||
|
||||
<section className="space-y-4" aria-labelledby="release-notes-list-title">
|
||||
<div className="flex items-baseline justify-between">
|
||||
<h2 id="release-notes-list-title" className="text-xl font-semibold">
|
||||
Alle Hinweise
|
||||
</h2>
|
||||
<p className="text-sm text-muted-foreground">{notes.length} insgesamt</p>
|
||||
</div>
|
||||
|
||||
{notes.length === 0 ? (
|
||||
<p className="text-muted-foreground py-8 text-center">
|
||||
Noch keine Versionshinweise vorhanden.
|
||||
</p>
|
||||
) : (
|
||||
<ul className="space-y-3">
|
||||
{notes.map((note) => (
|
||||
<li
|
||||
key={note.id}
|
||||
className="bg-card p-4 rounded-xl border border-border shadow-sm flex flex-col sm:flex-row sm:items-start gap-4 justify-between"
|
||||
>
|
||||
<div className="space-y-1 min-w-0">
|
||||
<p className="text-sm font-semibold">
|
||||
Version {note.version}
|
||||
<span className="ml-2 rounded-full bg-muted px-2.5 py-0.5 text-xs font-medium text-muted-foreground">
|
||||
{audienceLabels[note.audience]}
|
||||
</span>
|
||||
</p>
|
||||
<p className="text-sm whitespace-pre-line break-words">{note.body}</p>
|
||||
<p className="text-xs text-muted-foreground">
|
||||
{new Intl.DateTimeFormat("de-DE", { dateStyle: "medium" }).format(note.createdAt)}
|
||||
</p>
|
||||
</div>
|
||||
<DeleteReleaseNoteButton action={deleteReleaseNoteAction} noteId={note.id} />
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
)}
|
||||
</section>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user