Skip to content

Booking Features

Radch-enko edited this page Jul 24, 2025 · 1 revision

Booking Features

This document covers the booking-related features in the Effective Office tablet client application. These features enable users to create, modify, and manage room reservations through various interfaces including a full booking editor, fast booking for immediate needs, and room release functionality.

For information about the backend booking management system, see Booking Management. For details about room display and availability visualization, see Room Display & Slot Management.

Overview

The booking features are implemented as three main feature modules in the tablet client:

Feature Purpose Primary Component
Booking Editor Create and edit detailed bookings BookingEditorComponent
Fast Booking Quick room reservations FastBookingComponent
Room Release Free up occupied rooms FreeSelectRoomComponent

These features integrate with the core domain layer for business logic and use shared UI components for consistent user experience.

Booking Editor Feature

The booking editor provides a comprehensive interface for creating new bookings and modifying existing ones. It supports full customization of booking parameters including date, time, duration, and organizer selection.

Component Architecture

component-architecture.svg

Key Capabilities

The BookingEditorComponent handles several core responsibilities:

  • Event Creation and Updates: Creates new bookings via createBookingUseCase and updates existing ones via updateBookingUseCase
  • Conflict Detection: Uses checkBookingUseCase to identify scheduling conflicts with existing bookings
  • Organizer Management: Loads and filters organizers through organizersInfoUseCase with autocomplete functionality
  • Validation: Validates booking parameters including time constraints and organizer selection

Modal States

The booking editor operates through different modal configurations defined in BookingEditorComponent.ModalConfig:

Modal Type Purpose Trigger
UpdateModal Main editing interface Default state
SuccessModal Booking confirmation Successful creation/update
FailureModal Error handling Booking conflicts or errors

State Management

The booking editor state is managed through a comprehensive State data class that tracks:

state-management.svg

Fast Booking Feature

Fast booking enables immediate room reservations with minimal user interaction. It automatically finds available rooms and creates bookings with predefined durations.

Component Workflow

component-workflow.svg

Auto-Selection Logic

The fast booking feature implements intelligent room selection through the SelectRoomUseCase:

  1. Primary Selection: Attempts to book the currently selected room if available for the requested duration
  2. Fallback Selection: If the primary room is unavailable, finds the next available room from the room list
  3. Wait Time Calculation: When no rooms are immediately available, calculates the shortest wait time until a room becomes free

Duration Options

Fast booking supports predefined duration options accessible through the main interface:

Duration Use Case
15 minutes Brief meetings, quick calls
30 minutes Standard short meetings
60 minutes Extended discussions

Room Release Feature

The room release feature allows users to immediately free up occupied rooms by canceling active bookings.

Component Structure

component-structure.svg

The FreeSelectRoomComponent provides a simple interface for room release:

  • Accepts an EventInfo object representing the booking to cancel
  • Uses DeleteBookingUseCase to remove the booking from the system
  • Manages loading state during the deletion process
  • Automatically closes the interface upon successful completion

User Interaction Patterns

Booking Creation Flow

booking-creation-flow.svg

Error Handling and Recovery

All booking features implement comprehensive error handling:

  • Validation Errors: Time in past, invalid organizer selection, scheduling conflicts
  • Network Errors: Backend communication failures during booking operations
  • Business Logic Errors: Room availability conflicts, booking permission issues

Error states are managed through dedicated boolean flags in each component's state and displayed through appropriate modal interfaces.

Clone this wiki locally