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

@@ -70,10 +70,8 @@ const defaultProps = {
editorialId: "e1",
repeatDownloads: [] as RepeatDownloadPosition[],
year: 2026,
month: 8 as number | null,
quarter: null as number | null,
isQuarter: false,
periodLabel: "August 2026",
quarter: 3,
periodLabel: "Q3 2026",
reports: [] as FinalizedReportSummary[],
};
@@ -110,7 +108,7 @@ test("disables the checkbox for billed positions and shows report reference", ()
expect(screen.getByText(/RE-2026-042/)).toBeTruthy();
});
test("selects all open positions via Alle offenen im Monat", () => {
test("selects all open positions via Alle offenen im Quartal", () => {
render(
<BillingSelection
{...defaultProps}
@@ -118,7 +116,7 @@ test("selects all open positions via Alle offenen im Monat", () => {
/>,
);
fireEvent.click(screen.getByRole("button", { name: /Alle offenen im Monat/i }));
fireEvent.click(screen.getByRole("button", { name: /Alle offenen im Quartal/i }));
expect(getCheckbox("jubel.jpg").checked).toBe(true);
expect(getCheckbox("redaktion.jpg").checked).toBe(true);
@@ -149,7 +147,7 @@ test("displays selected count and cents-derived EUR total", () => {
/>,
);
fireEvent.click(screen.getByRole("button", { name: /Alle offenen im Monat/i }));
fireEvent.click(screen.getByRole("button", { name: /Alle offenen im Quartal/i }));
const summary = container.querySelector(".billing-summary");
expect(summary?.textContent ?? "").toMatch(/2 Nutzungen ausgewählt/);
@@ -180,30 +178,11 @@ test("shows empty state when no billable positions exist", () => {
expect(screen.getByText(/Keine abrechenbaren Nutzungen/)).toBeTruthy();
});
test("links to quarter view from month view", () => {
render(
<BillingSelection
{...defaultProps}
positions={[openPosition]}
/>,
);
test("offers only quarterly periods", () => {
render(<BillingSelection {...defaultProps} positions={[openPosition]} />);
const quarterLink = screen.getByRole("link", { name: /Ganzes Quartal/i });
expect(quarterLink.getAttribute("href") ?? "").toContain("quarter=3");
expect(screen.queryByRole("link", { name: /Monatsansicht/i })).toBeNull();
expect(screen.queryByText("Monat")).toBeNull();
expect(screen.getByText("Quartal")).toBeTruthy();
expect(screen.getByText(/Zeitraum: Q3 2026/)).toBeTruthy();
});
test("links to month view from quarter view", () => {
render(
<BillingSelection
{...defaultProps}
positions={[openPosition]}
month={null}
quarter={3}
isQuarter={true}
periodLabel="Q3 2026"
/>,
);
const monthLink = screen.getByRole("link", { name: /Monatsansicht/i });
expect(monthLink.getAttribute("href") ?? "").toContain("month=");
});