Add booking system with calendar and email notifications (v0.3.0)
All checks were successful
Create Release Package / build-release (push) Successful in 1m5s

- Booking Custom Post Type with full management features
- Room and guest relationship tracking
- Check-in/check-out date management with validation
- Booking status workflow (pending, confirmed, checked_in, checked_out, cancelled)
- Automatic price calculation using existing Calculator
- Availability system with real-time conflict detection
- AJAX endpoint for instant availability validation
- Calendar admin page with monthly view and room/building filters
- Color-coded booking status display with legend
- Email notifications for new bookings, confirmations, and cancellations
- HTML email templates with placeholder-based system
- Auto-generated booking references (BNB-YYYY-NNNNN)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-31 14:37:48 +01:00
parent dabfe1e826
commit 0c601df568
11 changed files with 3419 additions and 28 deletions

View File

@@ -5,6 +5,73 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.3.0] - 2026-01-31
### Added
- Booking System with full management features:
- Custom Post Type: Bookings (`bnb_booking`)
- Room and guest relationship tracking
- Check-in/check-out date management
- Booking status workflow (pending, confirmed, checked_in, checked_out, cancelled)
- Status transitions with validation
- Automatic price calculation using existing Calculator
- Price override option for manual adjustments
- Guest information storage (name, email, phone, notes)
- Guest count tracking (adults, children)
- Internal notes field for staff
- Auto-generated booking references (BNB-YYYY-NNNNN)
- Availability System (`src/Booking/Availability.php`)
- Real-time availability checking
- Conflict detection for overlapping bookings
- AJAX endpoint for instant availability validation
- Calendar data generation for rooms and buildings
- Support for excluding booking from conflict check (for editing)
- Utility methods: get upcoming bookings, current bookings, today's check-ins/outs
- Calendar Admin Page (WP BnB > Calendar)
- Monthly calendar view with availability visualization
- Room and building filter dropdowns
- Color-coded booking status display
- Month navigation (previous/next/today)
- Click-to-edit booking functionality
- Hover tooltips with booking details
- Legend for status colors
- Single room and multi-room views
- Email Notifications (`src/Booking/EmailNotifier.php`)
- Admin notification for new bookings
- Guest confirmation email on booking confirmation
- Admin notification on booking confirmation
- Cancellation emails to guest and admin
- HTML email templates with styling
- Placeholder-based template system
- Filter hooks for customizing recipients, subject, and content
- Booking Admin List Enhancements
- Custom columns: room, guest, dates, nights, price, status
- Status badges with color coding
- Filter by room and status
- Sortable columns for dates, guest, status
- Price override indicator
- Booking Meta Boxes
- Room & Dates: room selection, date pickers, nights display, availability check
- Guest Information: contact details, guest count, notes
- Pricing: calculated price, breakdown display, recalculate button, override
- Status & Notes: status dropdown with preview, internal notes
### Changed
- Plugin.php enhanced with AJAX handlers and component initialization
- Admin JavaScript updated with booking form functionality
- Admin CSS updated with booking and calendar styles
- Asset enqueuing now includes Booking post type screens
### Security
- Conflict detection prevents double-booking
- Date validation ensures check-out is after check-in
- Status transition validation prevents invalid state changes
- Nonce verification on availability AJAX requests
- Capability checks on all booking operations
## [0.2.0] - 2026-01-31
### Added
@@ -124,6 +191,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Input sanitization and output escaping
- Server secret masking in license settings
[0.3.0]: https://src.bundespruefstelle.ch/magdev/wp-bnb/releases/tag/v0.3.0
[0.2.0]: https://src.bundespruefstelle.ch/magdev/wp-bnb/releases/tag/v0.2.0
[0.1.0]: https://src.bundespruefstelle.ch/magdev/wp-bnb/releases/tag/v0.1.0
[0.0.1]: https://src.bundespruefstelle.ch/magdev/wp-bnb/releases/tag/v0.0.1