feat: revert allow updating room assignments in edit mode
This commit is contained in:
1 parent
3e1d719512
commit
f9d420fecd
3 files changed
+5
-104
No files matched your search
@@ -1,29 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Form\Service\Condition;
|
||||
|
||||
use App\Form\Model\BookingDto;
|
||||
use App\Form\Service\Contract\FieldConditionInterface;
|
||||
|
||||
/**
|
||||
* Condition that checks if accommodation (room assignments) are mutable in the edit flow.
|
||||
*/
|
||||
class AccommodationMutabilityCondition implements FieldConditionInterface
|
||||
{
|
||||
public function evaluate(BookingDto $bookingDto, int $participantIndex, array $formData): bool
|
||||
{
|
||||
return false === $bookingDto->travel->roomsMutable;
|
||||
}
|
||||
|
||||
public function getDependentFields(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getDescription(): string
|
||||
{
|
||||
return 'Accommodation is not mutable (edit flow)';
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user