Modellwahl über Kanalfähigkeiten mit erklärten Einschränkungen, Abgleich alter Werte, Ausführungsvarianten je Modul, getrennte Vertrags-/Buchungsinformation, Warten auf die Portalbestätigung mit Eskalation und Wiederaufnahme (Fälle C und D getestet). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
39 lines
1.3 KiB
PHP
39 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace App\Enums;
|
|
|
|
use Filament\Support\Contracts\HasLabel;
|
|
|
|
/**
|
|
* What happens with the contract document of a booking that is binding (docs/Prozessarchitektur/V2.1/02 §4): creating
|
|
* and filing it is separate from sending it to the guest. `Follow` keeps the behaviour of V2: it goes out the way the case
|
|
* is processed (automatically or by the landlord's hand).
|
|
*/
|
|
enum ContractDelivery: string implements HasLabel
|
|
{
|
|
case Follow = 'follow';
|
|
case Automatic = 'automatic';
|
|
case Manual = 'manual';
|
|
case Internal = 'internal';
|
|
|
|
public function getLabel(): string
|
|
{
|
|
return match ($this) {
|
|
self::Follow => 'wie die übrige Bearbeitung',
|
|
self::Automatic => 'automatisch erstellen und an den Gast senden',
|
|
self::Manual => 'von Hand prüfen und senden',
|
|
self::Internal => 'erstellen und nur intern ablegen (nicht senden)',
|
|
};
|
|
}
|
|
|
|
/** The mode as the document step sees it: automatic when the case is processed automatically or the delivery says so. */
|
|
public function sendsAutomatically(ProcessingMode $processing): bool
|
|
{
|
|
return match ($this) {
|
|
self::Follow => $processing === ProcessingMode::Automatic,
|
|
self::Automatic => true,
|
|
self::Manual, self::Internal => false,
|
|
};
|
|
}
|
|
}
|