feat: conditionally render room assignment field in participant edit form

This commit is contained in:
Björn Fromme committed 2026-03-16 11:59:12 +01:00
1 parent b872f2a5db
commit f230b36382
4 files changed
+70 -21

No files matched your search

@@ -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(),
];