feat: conditionally render room assignment field in participant edit form
This commit is contained in:
@@ -263,8 +263,11 @@ class CreateFieldStateProvider extends AbstractFieldStateProvider
|
||||
'required' => new ApplicantCondition(),
|
||||
];
|
||||
|
||||
// Render assignedRoomId field as static text when only one room type is selected (auto-assigned by RoomAssignmentService)
|
||||
// Room assignment field:
|
||||
// - Hidden until date of birth is provided (age determines room eligibility, e.g., Baby rooms)
|
||||
// - Rendered as static text when only one room type is selected (auto-assigned by RoomAssignmentService)
|
||||
$this->fieldStateConditions['assignedRoomId'] = [
|
||||
'hidden' => CompositeCondition::not($dateOfBirthProvidedCondition),
|
||||
'static_text' => new SingleRoomTypeCondition(),
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user