feat: readonly room selection for single room types

This commit is contained in:
Björn Fromme
2026-03-16 11:59:11 +01:00
parent d20215929d
commit b882175f36
3 changed files with 213 additions and 0 deletions
@@ -15,6 +15,7 @@ use App\Form\Service\Condition\FieldValueCondition;
use App\Form\Service\Condition\RentalSelectionCondition;
use App\Form\Service\Condition\RoomSelectionCondition;
use App\Form\Service\Condition\ServiceSubTypeCondition;
use App\Form\Service\Condition\SingleRoomTypeCondition;
use App\Form\Service\Condition\SkiPassSelectionCondition;
use App\Service\ParticipantEligibilityService;
@@ -204,6 +205,11 @@ class CreateFieldStateProvider extends AbstractFieldStateProvider
'required' => new ApplicantCondition(),
];
// Make assignedRoomId readonly when only one room type is selected
$this->fieldStateConditions['assignedRoomId'] = [
'readonly' => new SingleRoomTypeCondition(),
];
// Example field state conditions would be registered here
// For demonstration purposes, here are some example patterns: