Comprehensive Booking Management System Specification

📄 General
← Back to Documentation
# Comprehensive Booking Management System Specification ## Overview A complete booking control panel for managers to handle all aspects of a booking from creation to checkout, including payments, guest management, check-in/out, services, and more. ## 1. Stats Dashboard (Top Section) Display key metrics at a glance: - **Total Amount**: €X,XXX.XX (Primary color, large font) - **Amount Paid**: €X,XXX.XX (Success/green color) - **Outstanding Balance**: €X,XXX.XX (Danger/red color) - **Total Guests**: X adults + X children ## 2. Quick Action Buttons Horizontal action bar with: ### Payment Actions - **Accept Payment (MyPos)** - Icon: Credit card - Action: Trigger MyPos terminal payment - Visible: When payment_status !== 'paid' - Integration: Dispatch event to MyPos service ### ID Management - **Scan ID Card** - Icon: Identification card - Action: Open ID scanner modal - Auto-fill: Name, ID number, nationality, DOB - Technology: OCR/MRZ reader integration ### Check-in/Check-out - **Generate Check-in QR Code** - Icon: QR code - Action: Generate unique QR for self-check-in - Contains: Booking ID, verification token - Visible: When status !== 'checked_in' - **Check In Button** - Icon: Arrow right on rectangle - Action: Mark as checked_in, set checked_in_at timestamp - Visible: When status === 'confirmed' - **Check Out Button** - Icon: Arrow left on rectangle - Action: Mark as checked_out, set checked_out_at timestamp - Calculate final bill with additional services - Visible: When status === 'checked_in' ## 3. Tabbed Interface ### Tab 1: Basic Information **Booking Details Section:** - Booking Number (auto-generated, read-only) - Client/Customer (searchable select) - Venue (searchable select) - Check-in Date & Time - Check-out Date & Time - Number of Adults - Number of Children - Total Guests (calculated) **Status Section:** - Booking Status (pending/confirmed/checked_in/checked_out/cancelled/completed) - Payment Status (pending/paid/partially_paid/refunded/failed) - Special Requests (textarea) ### Tab 2: Guest Information **Primary Guest (from client):** - Full Name - Email - Phone - ID/Passport Number - Nationality - Date of Birth - ID Document Upload **Additional Guests (Repeater):** For each additional guest: - Full Name - ID/Passport Number - Nationality - Date of Birth - Room Assignment (if rental type) - Notes ### Tab 3: Rooms & Accommodations **For Rental-type Bookings:** **Room Assignments (Repeater):** - Venue Object/Room (select from available) - Number of Nights - Price per Night - Subtotal - Assigned Guests (multi-select from guest list) - Room Notes **Summary:** - Total Rooms: X - Total Nights: X - Accommodation Subtotal: €X,XXX.XX ### Tab 4: Services & Packages **Additional Services (Repeater):** - Service Name (select) - Service Provider (if applicable) - Quantity - Unit Price - Subtotal - Scheduled Date/Time - Status (pending/confirmed/completed) **Packages (Repeater):** - Package Name (select) - Quantity - Price - Included Services (display only) **Services Summary:** - Total Services: X - Services Subtotal: €X,XXX.XX ### Tab 5: Payments & Billing **Payment History (Repeater/Table):** - Payment Date - Amount - Payment Method (MyPos/Cash/Card/Bank Transfer) - Transaction ID - Payment Reference - Status (pending/completed/failed/refunded) - Receipt/Invoice Link **Add Payment Button:** - Opens modal to record new payment - MyPos integration button - Manual payment entry **Billing Summary:** - Accommodation: €X,XXX.XX - Services: €X,XXX.XX - Packages: €X,XXX.XX - Subtotal: €X,XXX.XX - Tax (VAT): €X,XXX.XX - Service Fee: €X,XXX.XX - **Total Amount: €X,XXX.XX** - **Paid: €X,XXX.XX** - **Outstanding: €X,XXX.XX** ### Tab 6: Check-in/Check-out **Check-in Section:** - Check-in QR Code (display/generate) - QR Code Instructions - Terms & Conditions Acceptance - Checkbox: "Guest accepted T&C" - Timestamp: Accepted at - IP Address: (if self-check-in) - Actual Check-in Time - Check-in Notes - Staff Member (who processed) **Check-out Section:** - Expected Check-out Time - Actual Check-out Time - Final Bill Review - Additional Charges - Damage/Incident Report - Check-out Notes - Staff Member (who processed) ### Tab 7: Documents & Communication **Documents:** - Booking Confirmation (PDF) - Invoice/Receipt - Check-in Confirmation - Check-out Summary - ID Documents (uploaded) **Communication Log:** - Email history - SMS history - Notes/Comments (with timestamps and staff member) ### Tab 8: Activity Log **Audit Trail:** - Timestamp - Action (created/updated/checked_in/payment_received/etc.) - User (staff member) - Changes (before/after values) - IP Address ## 4. Technical Implementation ### Database Fields Required ```sql -- Add to bookings table: checked_in_at TIMESTAMP checked_out_at TIMESTAMP terms_accepted_at TIMESTAMP terms_accepted_ip VARCHAR(45) checkin_qr_token VARCHAR(255) UNIQUE paid_amount DECIMAL(10,2) DEFAULT 0 ``` ### New Tables **booking_guests:** - id - booking_id - full_name - id_number - nationality - date_of_birth - id_document_path - room_assignment (venue_object_id) - notes - created_at, updated_at **booking_payments:** - id - booking_id - amount - payment_method - payment_reference - transaction_id - mypos_transaction_data (JSON) - status - processed_by (user_id) - processed_at - created_at, updated_at **booking_activity_log:** - id - booking_id - action - user_id - changes (JSON) - ip_address - created_at ### Livewire Events **MyPos Payment:** ```php $livewire->dispatch('process-mypos-payment', bookingId: $record->id); ``` **ID Scanner:** ```php $livewire->dispatch('open-id-scanner'); // Returns: name, id_number, nationality, dob ``` **QR Code Generation:** ```php $livewire->dispatch('generate-checkin-qr', bookingId: $record->id); // Generates: unique token, QR code image ``` ### Frontend Components Needed 1. **MyPos Payment Modal** (resources/views/livewire/mypos-payment-modal.blade.php) 2. **ID Scanner Modal** (resources/views/livewire/id-scanner-modal.blade.php) 3. **QR Code Display** (resources/views/livewire/checkin-qr-display.blade.php) 4. **Self Check-in Page** (resources/views/web/self-checkin.blade.php) ### API Endpoints **Self Check-in API:** ```php POST /api/checkin/{token} - Validates QR token - Marks booking as checked_in - Records terms acceptance - Returns success/error ``` **ID Scanner Integration:** ```php POST /api/scan-id - Accepts image upload - OCR processing - Returns structured data ``` ## 5. User Experience Flow ### Manager Flow: 1. Opens booking → Sees stats dashboard 2. Clicks "Scan ID Card" → Auto-fills guest info 3. Assigns rooms to guests 4. Adds services/packages 5. Clicks "Generate Check-in QR" → Shows QR to client 6. Client scans QR → Self check-in 7. During stay: Add services → Auto-updates total 8. Check-out: Reviews final bill → Processes payment via MyPos 9. Marks as checked out → Generates final invoice ### Client Self Check-in Flow: 1. Receives QR code (email/SMS/shown at desk) 2. Scans QR with phone 3. Reviews booking details 4. Accepts terms & conditions 5. Confirms check-in 6. Receives digital confirmation ## 6. Security Considerations - QR tokens expire after 24 hours - Rate limiting on check-in API - Validate booking status before check-in - Log all payment transactions - Encrypt sensitive guest data - GDPR compliance for ID documents ## 7. Integration Points - **MyPos Terminal**: Existing payment gateway - **ID Scanner**: OCR library (Tesseract/Cloud Vision API) - **QR Generator**: SimpleSoftwareIO/simple-qrcode - **PDF Generation**: DomPDF/Snappy - **Email/SMS**: Existing notification system ## 8. Next Steps 1. Update Booking model with new fields 2. Create migration for new tables 3. Build Livewire components for modals 4. Implement MyPos payment integration 5. Create ID scanner component 6. Build QR generation service 7. Create self-check-in frontend page 8. Add API endpoints 9. Update BookingForm with tabs 10. Add relation managers for guests/payments 11. Implement activity logging 12. Create PDF templates This specification provides a complete booking management control panel that gives managers full control over every aspect of a booking.