Skip to content

feat(presets): Halbjährliche Wiederholung für Vorlagen#19

Merged
florivdg merged 1 commit into
mainfrom
feat/half-yearly-recurrence
Jun 27, 2026
Merged

feat(presets): Halbjährliche Wiederholung für Vorlagen#19
florivdg merged 1 commit into
mainfrom
feat/half-yearly-recurrence

Conversation

@florivdg

Copy link
Copy Markdown
Owner

Überblick

Fügt eine neue Wiederholungsoption „Halbjährlich" (alle sechs Monate) für Transaktionsvorlagen hinzu – neben den bestehenden Optionen einmalig / monatlich / vierteljährlich / jährlich.

Änderungen

  • Schema & Typen: halbjährlich zum Drizzle-recurrence-Enum, den drei Preset-Typ-Unions und den Zod-Request-Schemas ergänzt.
  • Keine DB-Migration nötig: Die text-Spalte besitzt keinen CHECK-Constraint, das Drizzle-enum wirkt nur auf Typebene – die Snapshot-DDL ändert sich nicht.
  • Matching-Logik: Den Quartals-Matcher in eine wiederverwendbare matchesEveryNMonths()-Factory umgebaut und halbjährlich als „alle 6 Monate ab Startmonat" registriert.
  • UI: Label „Halbjährlich" in formatRecurrence, neue Option in den Anlegen-/Bearbeiten-/Filter-Selects sowie eine eigene Badge-Variante im „Aus Vorlagen befüllen"-Dialog.
  • Tests: Neue Fälle für Matching (alle 6 Monate) und Formatierung.

Verifikation

  • bun test → 580 passed
  • vitest run → 73 passed
  • oxlint --type-aware → clean
  • astro check → 0 errors
  • vue-tsc --noEmit → exit 0
  • fallow audit → keine neuen Findings (Gate bestanden)
  • Code-Review (medium) durchgeführt: ein Finding (fehlende Badge-Variante für halbjährlich) gefunden und behoben.

🤖 Generated with Claude Code

Add a new "halbjährlich" recurrence interval (every six months) for
transaction presets, alongside the existing einmalig/monatlich/
vierteljährlich/jährlich options.

- Extend the recurrence enum in the Drizzle schema, the preset type
  unions, and the Zod request schemas (no SQL migration needed: the
  text column carries no CHECK constraint).
- Refactor the quarterly matcher into a reusable matchesEveryNMonths()
  factory and register halbjährlich as every-6-months matching.
- Add the German label "Halbjährlich" to formatRecurrence and an option
  to the create/edit/filter selects, plus a distinct badge variant in
  the fill dialog.
- Cover the new interval with matching and formatting tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 27, 2026 13:04

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Diese Änderung erweitert DimeTime um die Wiederholungsart „Halbjährlich“ für Transaktionsvorlagen und führt sie konsistent durch API-Schemas, DB-Typen/Enums, Matching-Logik, UI sowie Tests.

Changes:

  • halbjährlich als neue Recurrence-Option in Drizzle-Enum, API-Validierung (Zod) und TypeScript-Typen ergänzt.
  • Recurrence-Matching von „vierteljährlich“ auf eine generische matchesEveryNMonths()-Factory umgestellt und „halbjährlich“ als 6-Monats-Intervall implementiert.
  • UI-Auswahl/Anzeige (Selects, Labels, Badge-Variante) sowie Tests für Matching und Formatierung erweitert.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/pages/api/presets/index.ts Query-Validierung um halbjährlich erweitert (Filter/GET).
src/pages/api/presets/_schema.ts Zod-Request-Schemas um halbjährlich ergänzt (Create/Update).
src/lib/presets.ts Öffentliche Input-/Query-Typen um halbjährlich erweitert.
src/lib/presets.test.ts Matching-Testfall für „alle 6 Monate ab Startmonat“ hinzugefügt.
src/lib/preset-matching.ts Matcher-Factory matchesEveryNMonths() eingeführt und halbjährlich registriert.
src/lib/format.ts formatRecurrence() um deutsches Label „Halbjährlich“ ergänzt.
src/lib/format.test.ts Formatierungs-Test für halbjährlich hinzugefügt.
src/db/schema/plans.ts Drizzle-Enum für transactionPreset.recurrence um halbjährlich erweitert.
src/components/presets/PresetManager.vue UI-Filter/Select-Option für halbjährlich ergänzt.
src/components/presets/PresetEditDialog.vue Edit-Dialog: Typunion + Select-Option für halbjährlich ergänzt.
src/components/presets/PresetCreateDialog.vue Create-Dialog: Typunion + Select-Option für halbjährlich ergänzt.
src/components/presets/FillFromPresetsDialog.vue Badge-Variant-Mapping um halbjährlich erweitert.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@florivdg florivdg merged commit 4a561d7 into main Jun 27, 2026
1 check passed
@florivdg florivdg deleted the feat/half-yearly-recurrence branch June 27, 2026 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants