-
Notifications
You must be signed in to change notification settings - Fork 0
Room Booking Workflow
This document describes the end-to-end process for booking meeting rooms within the Effective Office system, covering both the tablet client interface and backend Google Calendar integration. The workflow encompasses room selection, time scheduling, conflict validation, and calendar event creation.
For information about real-time availability updates and push notifications, see Real-time Availability System. For details about the quick reservation feature, see Fast Booking Feature.
The room booking workflow enables users to reserve meeting rooms through a tablet interface. The system validates availability, checks for conflicts, and synchronizes bookings with Google Calendar. The process supports both new booking creation and modification of existing bookings, with comprehensive validation and error handling throughout.
The BookingEditorComponent
manages complex state transitions during the booking process:
State Field | Purpose | Validation |
---|---|---|
duration |
Meeting duration in minutes | Must be positive |
date |
Selected date and time | Cannot be in the past |
selectOrganizer |
Chosen meeting organizer | Must exist in system |
isBusyEvent |
Indicates scheduling conflicts | Blocks booking creation |
enableUpdateButton |
Controls action button state | Based on all validations |
isTimeInPastError |
Past time validation flag | Shows snackbar error |
The conflict detection algorithm checks for time overlap using:
newEventStart < existingEventEnd && newEventEnd > existingEventStart
The GoogleCalendarProvider
handles the core booking operations:
Method | Purpose | Returns |
---|---|---|
createEvent() |
Creates new Google Calendar event |
Booking with assigned ID |
updateEvent() |
Modifies existing calendar event | Updated Booking
|
deleteEvent() |
Removes calendar event | Unit |
checkBookingAvailability() |
Validates time slot availability | Boolean |
findEventsByWorkspace() |
Retrieves room's existing bookings | List<Booking> |
The booking workflow implements comprehensive error handling:
Error Type | Trigger | User Feedback |
---|---|---|
isTimeInPastError |
Selected time is in the past | Snackbar with localized message |
isInputError |
Invalid organizer selection | Form field validation highlight |
isBusyEvent |
Room unavailable at selected time | Disabled booking button |
isErrorCreate |
Backend booking creation failed | Button shows "Error creating event" |
isErrorUpdate |
Backend booking update failed | Button shows "Error" |
isErrorDelete |
Backend booking deletion failed | Button shows "Error deleting event" |
The GoogleCalendarProvider
throws specific exceptions:
-
OverlappingBookingException
for scheduling conflicts -
GoogleJsonResponseException
for Google API errors -
NullPointerException
for failed event creation
The system performs several data transformations throughout the booking workflow:
-
EventInfo
- Client-side representation of a booking event -
Organizer
- User who organizes the meeting -
RoomInfo
- Meeting room details
-
Booking
- Core domain model for room reservations -
User
- System user with email and role information -
Workspace
- Physical meeting room or space
-
BookingRequestDTO
- Client booking creation request -
BookingResponseDTO
- Server booking response -
UserDTO
- User information in API responses