feat: readonly room selection for single room types

This commit is contained in:
Björn Fromme
2025-10-16 09:36:04 +02:00
parent b1dbb15ad7
commit dc7ed0728a
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: