* feat: Configure cancellation reason * fix: use enums * tests: add unit tests * fix: type error * chore: remove duplicate dialog * fix: type erro * refator: improvements * refator: improvements --------- Co-authored-by: Keith Williams <keithwillcode@gmail.com> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
1.2 KiB
1.2 KiB
Cancellation Reason Requirement Implementation
Status: complete
Completed
- Added CancellationReasonRequirement enum to schema.prisma (line 129)
- Added requiresCancellationReason column to EventType model (line 269)
- Created database migration (20260115111819_add_cancellation_reason_require)
- Added translation keys to English locale (common.json)
- Added dropdown setting in EventAdvancedTab (lines 691-719)
- Added requiresCancellationReason to getEventTypesFromDB select (apps/web/lib/booking.ts)
- Passed requiresCancellationReason prop through:
- bookings-single-view.tsx → CancelBooking
- CancelBookingDialog.tsx → CancelBooking
- Updated CancelBooking component Props and validation logic
- Added server-side validation in handleCancelBooking
- Added requiresCancellationReason to getBookingToDelete select
- Fixed dynamic label to show "(optional)" only when isReasonRequiredForUser() returns false
In Progress
Blocked
Next Steps
- Test the feature end-to-end
- Verify all dropdown options work correctly
- Verify dynamic label shows "(optional)" only when appropriate
Session Notes
- Enum and column were already added to schema during planning phase
- Migration was already created