feat: force booking status 'O' for selection id 1473

addresses #869d79q0r
This commit is contained in:
Björn Fromme committed 2026-06-11 15:53:56 +02:00
1 parent bcf75ce3c3
commit d207bc74cb
9 files changed
+318 -5

No files matched your search

@@ -0,0 +1,41 @@
<?php
declare(strict_types=1);
namespace App\BusProNet\Service\StatusRule;
use App\BusProNet\Service\Contract\BookingStatusRuleInterface;
use App\Form\Model\BookingDto;
/**
* Status rule for travels containing selection 1473.
*
* Forces Option status when the travel contains the CRM selection
* "NICHT-automatisch bestätigen".
*/
class Selection1473StatusRule implements BookingStatusRuleInterface
{
private const STATUS = 'O';
private const PRIORITY = 200;
private const SELECTION_ID = 1473;
public function evaluate(BookingDto $bookingDto): bool
{
return $bookingDto->travel->hasSelectionId(self::SELECTION_ID);
}
public function getStatus(): string
{
return self::STATUS;
}
public function getPriority(): int
{
return self::PRIORITY;
}
public function getDescription(): string
{
return 'Assigns Option status when selection 1473 is present';
}
}