Release 2.2.1: quarterly billing and Sakani form polish

- Billing is always quarterly: the billing page opens the current
  quarter, the month view is gone, old ?month= links land in their
  quarter and invalid quarters no longer throw.
- Calendar and release-note forms and the RSVP buttons use Sakani
  components (Card, Input, Textarea, FormSelect, Button, Alert).
- Sidebar logo stays visible in dark mode (Sakani's logo tile is light).
- Release notes for 2.2.1 seeded via custom migration 0004; popup
  version bumped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Leon TonhäuserandClaude Opus 5.5 committed 2026-11-30 22:38:32 +01:00
1 parent c0c2425dda
commit 71110208a9
16 files changed
+2653 -274

No files matched your search

+36 -56
View File
@@ -2,8 +2,10 @@
import { useId, useState, useTransition } from "react";
import { Alert, Input } from "@sakaniui/react";
import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input";
import { Card, FormSelect } from "@/components/ui/sakani";
import type { CalendarActionResult } from "./actions";
@@ -18,7 +20,6 @@ export function CalendarEventForm({
}>) {
const titleId = useId();
const dateId = useId();
const albumId = useId();
const [state, setState] = useState<CalendarActionResult>({ ok: true, message: "" });
const [pending, startTransition] = useTransition();
const [title, setTitle] = useState("");
@@ -34,66 +35,45 @@ export function CalendarEventForm({
};
return (
<form
action={handleSubmit}
className="bg-card p-4 rounded-xl border border-border shadow-sm space-y-4"
>
<div className="space-y-2">
<label htmlFor={titleId} className="text-sm font-medium">
Titel (Spielpaarung oder Event)
</label>
<Card title="Neuer Termin">
<form action={handleSubmit} className="flex flex-col gap-4">
<Input
description="Ohne direkte Album-Auswahl wird automatisch verknüpft, sobald ein Album exakt „{Titel}“ oder „{Titel} | TT.MM.JJJJ“ heißt (Datum dieses Termins)."
id={titleId}
name="title"
value={title}
onChange={(event) => setTitle(event.target.value)}
label="Titel (Spielpaarung oder Event)"
maxLength={200}
required
name="title"
onChange={(event) => setTitle(event.target.value)}
placeholder="z. B. Hamburger SV - VfL Wolfsburg"
required
value={title}
/>
<p className="text-xs text-muted-foreground">
Ohne direkte Album-Auswahl wird automatisch verknüpft, sobald ein Album exakt
{" „{Titel}“ "}oder{" „{Titel} | TT.MM.JJJJ“ "}heißt (Datum dieses Termins).
</p>
</div>
<div className="flex flex-col sm:flex-row gap-4">
<div className="space-y-2">
<label htmlFor={dateId} className="text-sm font-medium">
Datum
</label>
<Input id={dateId} type="date" name="eventDate" defaultValue={defaultEventDate} required className="sm:w-48" />
<div className="flex flex-col gap-4 sm:flex-row">
<div className="sm:w-48">
<Input defaultValue={defaultEventDate} id={dateId} label="Datum" name="eventDate" required type="date" />
</div>
<div className="flex-1">
<FormSelect
label="Album direkt verknüpfen (optional)"
name="immichAlbumId"
options={[
{ label: "Automatisch über den Namen", value: "" },
...albums.map((album) => ({ label: album.albumName, value: album.id })),
]}
/>
</div>
</div>
<div className="space-y-2 flex-1">
<label htmlFor={albumId} className="text-sm font-medium">
Album direkt verknüpfen (optional)
</label>
<select
id={albumId}
name="immichAlbumId"
defaultValue=""
className="flex h-10 w-full rounded-md border border-border bg-background px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary-500"
>
<option value="">Automatisch über den Namen</option>
{albums.map((album) => (
<option key={album.id} value={album.id}>
{album.albumName}
</option>
))}
</select>
<div>
<Button type="submit" disabled={pending}>
{pending ? "Wird angelegt …" : "Termin anlegen"}
</Button>
</div>
</div>
<Button type="submit" disabled={pending}>
{pending ? "Wird angelegt…" : "Termin anlegen"}
</Button>
{state.message ? (
<p
role="status"
aria-live="polite"
className={state.ok ? "text-sm text-green-600 dark:text-green-400" : "text-sm text-destructive"}
>
{state.message}
</p>
) : null}
</form>
{state.message ? (
<div aria-live="polite">
<Alert color={state.ok ? "success" : "danger"} description={state.message} />
</div>
) : null}
</form>
</Card>
);
}