feat: remove room selection field entirely for single room type
addresses #869axcukn
This commit is contained in:
@@ -85,7 +85,8 @@ The room assignment system allows participants to freely select any room from St
|
||||
|
||||
**Key Features:**
|
||||
- **Flexible Selection**: All rooms from Step 1 always appear in participant dropdown, regardless of current capacity
|
||||
- **Auto-Assignment**: When exactly ONE room type selected, all participants auto-assigned and dropdown disabled
|
||||
- **Auto-Assignment**: When exactly ONE room type selected, all participants auto-assigned via `RoomAssignmentService`
|
||||
- **Field Display**: Single room type hides dropdown field entirely, displays room label as read-only text
|
||||
- **Conflict Resolution**: When participant selects room at capacity, system automatically unassigns minimum participants needed
|
||||
- **Unassignment Priority**: Highest index participants unassigned first (keeps applicant and early participants stable)
|
||||
- **User Notifications**: Unassigned participants receive warning notifications via toast system
|
||||
@@ -96,8 +97,11 @@ The room assignment system allows participants to freely select any room from St
|
||||
- `detectRoomCapacityConflict()`: Calculates if assignment would exceed capacity
|
||||
- `resolveRoomCapacityConflict()`: Unassigns minimum participants (highest index first)
|
||||
- Generates notifications for unassigned participants only (not for user-initiated assignment)
|
||||
- `RoomAssignmentService`: Unchanged - still auto-assigns when single room type selected
|
||||
- `ParticipantFieldOptionsProvider`: Unchanged - disables dropdown when single room type (auto-assigned)
|
||||
- Handles missing field gracefully when single room type (field excluded from form)
|
||||
- `RoomAssignmentService`: Auto-assigns when single room type selected at DTO level
|
||||
- `CreateFieldStateProvider`: Hides `assignedRoomId` field when `SingleRoomTypeCondition` is true
|
||||
- `BookingDto::getSingleRoomLabel()`: Returns room label for template display when single room type
|
||||
- Template: Conditionally renders dropdown (multiple rooms) or read-only label (single room)
|
||||
|
||||
**Example Scenario:**
|
||||
- User selects 1x "Doppelzimmer" (capacity 2), 3 participants
|
||||
@@ -248,6 +252,13 @@ Critical for correct pricing and auto-reassignment:
|
||||
- `BulkInsuranceBookingCondition` hides dependent participant insurance fields
|
||||
- Uses `InsuranceService::batchAssignInsuranceToParticipants()` for price tier matching
|
||||
|
||||
### Room Assignment Field
|
||||
- **Single room type**: Field completely hidden, room label displayed as read-only text
|
||||
- **Multiple room types**: Dropdown shown with all selected rooms from Step 1
|
||||
- `SingleRoomTypeCondition` controls field visibility in `CreateFieldStateProvider`
|
||||
- Auto-assignment by `RoomAssignmentService` happens at DTO level, independent of form field
|
||||
- Field handler gracefully handles missing field when excluded from form
|
||||
|
||||
## Data Flow
|
||||
|
||||
### Create Flow
|
||||
|
||||
Reference in New Issue
Block a user