feat(dashboard): owner calendar booking with fixed time slots#77
Merged
Conversation
added 4 commits
April 2, 2026 10:46
… subscription counting - Change BUSINESS_HOURS_END from 18 to 16 (customer requirement) - Add TimeSlot choices (MORNING/MIDDAY/AFTERNOON) with SLOT_TIMES mapping - Add time_slot field to Inspection model - Make inspector FK nullable (null=True, blank=True, on_delete=SET_NULL) for owner-booked inspections where inspector is assigned later - Add apartment-day duplicate validation (no two inspections same apt same day) - Fix get_inspections_used_this_month() to count all non-cancelled inspections (SCHEDULED + IN_PROGRESS + COMPLETED) instead of only COMPLETED - Audit all inspector references for None safety across admin, tasks, templates - Update scheduling tests for new business hours and same-day validation
- Add BookingApartmentForm for apartment selection - Add booking_calendar view with weekly grid and HTMX week navigation - Add book_slot view for creating inspections from slot selection - Add URL routes: /dashboard/buchen/ and /dashboard/buchen/slot/ - Add booking_calendar.html with desktop grid and mobile vertical layout - Add _calendar_week.html HTMX partial for week navigation - Add _booking_success.html and _booking_error.html response partials - Add send_booking_notification task and admin email templates - Update sidebar and bottom nav with "Termin buchen" link - Fix test_cascade_delete_inspector for SET_NULL behavior - 34 new tests covering auth, validation, slot times, subscription limits
- Batch per-day booking queries into single query with __date__in - Cap week_offset to max 52 weeks ahead - Use Inspection.TimeSlot enum for SLOT_TIMES lookup instead of raw string
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.
Summary
Closes #66
Changes
get_inspections_used_this_month()to count all non-cancelled inspections (SCHEDULED + IN_PROGRESS + COMPLETED), not just COMPLETEDbooking_calendar(weekly grid with HTMX navigation),book_slot(HTMX POST endpoint)Validation
make lintpassesmake testpasses (931 tests, 34 new)make manage CMD="check"passesReview Notes
Co-Authored-By: Claude noreply@anthropic.com