Add SEMI_MONTHLY frequency and enhance recurring rule features#8
Merged
Conversation
Add semiMonthlyDay, weekOfMonth, lastDayOfMonth, overrides fields to RecurringRule. Add scheduledDate and unique constraint on Transaction for duplicate detection.
Add SEMI_MONTHLY to frequency unions, semiMonthlyDay, weekOfMonth, lastDayOfMonth, overrides to RecurrenceConfig and RecurringRule types. Add schema refinements and skip/reschedule validation schemas.
…overrides Extend calculateNextRunAt with SEMI_MONTHLY alternating days, MONTHLY nth-weekday patterns (weekOfMonth), lastDayOfMonth mode, and override handling for skipped/rescheduled occurrences.
…and enhanced UI Router: pass new fields in create/update, add skipOccurrence and rescheduleOccurrence procedures, expand recurringRule select in list/getById queries. Inngest: use scheduledDate for transaction date, anchor nextRunAt computation to scheduled date, catch P2002 for duplicate prevention. UI: add frequency presets (bi-weekly, twice a month), conditional fields per frequency, monthly mode radio (specific day, day pattern, last day of month).
Remove all no-unnecessary-type-assertion violations and convert logical AND patterns to optional chaining across routers, forms, and utility files to satisfy CI ESLint config.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
🎉 This PR is included in version 1.3.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
This pull request introduces significant enhancements to the recurring transaction system, both in the database schema and in the user interface. The main focus is on supporting more flexible recurrence patterns, including a new "semi-monthly" frequency and advanced monthly options. Several minor code cleanups and type simplifications are also included.
Recurring Transaction Enhancements
RecurringFrequencyenum and schema, allowing transactions to recur on two specific days each month. (prisma/schema.prisma) [1] [2]RecurringRulemodel with new fields:semiMonthlyDay,weekOfMonth,lastDayOfMonth, andoverrides, enabling more complex recurrence patterns such as "2nd Tuesday" or "last day of month". (prisma/schema.prisma)scheduledDateand enforced a unique constraint on[recurringRuleId, scheduledDate]for better data integrity. (prisma/schema.prisma) [1] [2]Recurring Transaction Form UI Improvements
(
src/components/forms/transaction/steps/recurring-step.tsx) [1] [2] [3] [4]Type and Code Cleanups
src/components/forms/accounts/account-form.tsx,src/components/forms/categories/subcategory-form.tsx,src/components/pages/(protected)/profile/edit-profile-section.tsx,src/app/(public)/blog/[slug]/page.tsx,src/components/pages/(protected)/splits/group-detail/spending-radar-chart.tsx) [1] [2] [3] [4] src/app/(public)/blog/[slug]/page.tsxL31-R31, [5]src/components/forms/transaction/steps/category-step.tsx,src/app/(public)/blog/page.tsx,src/components/pages/(protected)/splits/group-detail/expense-form-sheet.tsx) [1] [2] [3]