feat(presets): Halbjährliche Wiederholung für Vorlagen#19
Merged
Conversation
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>
There was a problem hiding this comment.
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ährlichals 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ü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
halbjährlichzum Drizzle-recurrence-Enum, den drei Preset-Typ-Unions und den Zod-Request-Schemas ergänzt.text-Spalte besitzt keinen CHECK-Constraint, das Drizzle-enumwirkt nur auf Typebene – die Snapshot-DDL ändert sich nicht.matchesEveryNMonths()-Factory umgebaut undhalbjährlichals „alle 6 Monate ab Startmonat" registriert.formatRecurrence, neue Option in den Anlegen-/Bearbeiten-/Filter-Selects sowie eine eigene Badge-Variante im „Aus Vorlagen befüllen"-Dialog.Verifikation
bun test→ 580 passedvitest run→ 73 passedoxlint --type-aware→ cleanastro check→ 0 errorsvue-tsc --noEmit→ exit 0fallow audit→ keine neuen Findings (Gate bestanden)halbjährlich) gefunden und behoben.🤖 Generated with Claude Code