V2.1: Kanalfähigkeiten, Ausführungsvarianten, Dokumentenentkopplung, Portalbestätigung

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>
This commit is contained in:
LarsandClaude Sonnet 5.5 committed 2026-11-05 07:54:11 +01:00
1 parent ef1635e59a
commit 8442d0a3d8
62 files changed
+1818 -69

No files matched your search

+32
View File
@@ -0,0 +1,32 @@
<?php
namespace App\Enums;
use Filament\Support\Contracts\HasLabel;
/**
* Whether the guest of a binding booking gets a short booking information (without contract) from us (docs/
* Prozessarchitektur/V2.1/02 §4) – independent of the contract documentation, which stays with its own step.
*/
enum BookingNoticeMode: string implements HasLabel
{
case Off = 'off';
case Automatic = 'automatic';
case AutomaticUnlessPortalConfirmed = 'automatic_unless_portal_confirmed';
case Manual = 'manual';
public function getLabel(): string
{
return match ($this) {
self::Off => 'keine eigene Buchungsinformation',
self::Automatic => 'automatisch senden',
self::AutomaticUnlessPortalConfirmed => 'automatisch senden – außer das Portal hat nachweislich bestätigt',
self::Manual => 'von Hand senden',
};
}
public function isAutomatic(): bool
{
return in_array($this, [self::Automatic, self::AutomaticUnlessPortalConfirmed], true);
}
}
+2
View File
@@ -23,6 +23,7 @@ enum BookingTaskKind: string implements HasLabel
case PortalCancellation = 'portal_cancellation';
case PortalCancellationReported = 'portal_cancel_reported';
case PortalChangeReported = 'portal_change_reported';
case PortalConfirmationMissing = 'portal_confirmation_missing';
case RefundCheck = 'refund_check';
case BookingWish = 'booking_wish';
case ArrivalDetails = 'arrival_details';
@@ -47,6 +48,7 @@ public function getLabel(): string
self::PortalCancellation => 'Stornierung im Portal veranlassen bzw. prüfen',
self::PortalCancellationReported => 'Das Portal meldet eine Stornierung – bitte prüfen',
self::PortalChangeReported => 'Das Portal meldet eine Änderung – bitte prüfen',
self::PortalConfirmationMissing => 'Bestätigungsmail des Portals fehlt – bitte beim Portal prüfen',
self::RefundCheck => 'Erstattung an den Gast prüfen',
self::BookingWish => 'Buchungswunsch bestätigen?',
self::ArrivalDetails => 'Anreisedaten beim Gast erfragen',
+38
View File
@@ -0,0 +1,38 @@
<?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,
};
}
}
+34
View File
@@ -0,0 +1,34 @@
<?php
namespace App\Enums;
use Filament\Support\Contracts\HasLabel;
/**
* The ways a task of the process may be fulfilled (docs/Prozessarchitektur/V2.1/02 §2). What is business-mandatory stays
* mandatory; the question is not „can I switch it off?“ but „which admissible ways do I have?“. A module names its ways,
* the process model narrows them for its archetype.
*/
enum Execution: string implements HasLabel
{
case Automatic = 'automatic';
case Approval = 'approval';
case Manual = 'manual';
case Portal = 'portal';
case ServiceProvider = 'service_provider';
case External = 'external';
case NotRequired = 'not_required';
public function getLabel(): string
{
return match ($this) {
self::Automatic => 'automatisch durch FewoPortal',
self::Approval => 'vorbereitet, nach Ihrer Freigabe',
self::Manual => 'von Ihnen von Hand',
self::Portal => 'durch das Portal',
self::ServiceProvider => 'durch einen Dienstleister',
self::External => 'bereits extern erledigt (mit Nachweis)',
self::NotRequired => 'nicht erforderlich',
};
}
}
+21 -3
View File
@@ -25,6 +25,10 @@ enum ProcessSetting: string
case DataRequestReminderHours = 'data_request_reminder_hours';
case GuestLinkValidDays = 'guest_link_valid_days';
case FormRequiresAddress = 'form_requires_address';
case ContractDelivery = 'contract_delivery';
case BookingNotice = 'booking_notice';
case AwaitPortalConfirmation = 'await_portal_confirmation';
case PortalConfirmationWaitHours = 'portal_confirmation_wait_hours';
/**
* Built-in default (the behaviour before any landlord setting existed).
@@ -46,6 +50,10 @@ public function default(): string|int|bool|null
self::DataRequestReminderHours => 24,
self::GuestLinkValidDays => 14,
self::FormRequiresAddress => false,
self::ContractDelivery => ContractDelivery::Follow->value,
self::BookingNotice => BookingNoticeMode::Off->value,
self::AwaitPortalConfirmation => false,
self::PortalConfirmationWaitHours => 48,
};
}
@@ -71,6 +79,10 @@ public function question(): string
self::DataRequestReminderHours => 'Nach wie vielen Stunden ohne Antwort wird erinnert?',
self::GuestLinkValidDays => 'Wie lange gilt der Link, über den der Gast Angaben ergänzt?',
self::FormRequiresAddress => 'Muss die vollständige Anschrift schon im Anfrageformular der Webseite angegeben werden?',
self::ContractDelivery => 'Was geschieht mit dem Vertragsdokument einer verbindlichen Buchung?',
self::BookingNotice => 'Bekommt der Gast von uns eine Buchungsinformation (ohne Vertrag)?',
self::AwaitPortalConfirmation => 'Sollen Unterlagen und Nachrichten erst nach der Bestätigungsmail des Portals gehen?',
self::PortalConfirmationWaitHours => 'Wie lange wird auf die Bestätigungsmail des Portals gewartet, bevor Sie benachrichtigt werden?',
};
}
@@ -84,7 +96,7 @@ public function channelIntakes(): array
return match ($this) {
self::Processing, self::Payments, self::GuestMessages, self::ContractTemplate => [IntakeKind::Inquiry, IntakeKind::Booking],
self::PreReservation, self::HoldHours => [IntakeKind::Inquiry],
self::Documents => [IntakeKind::Booking],
self::Documents, self::ContractDelivery, self::BookingNotice, self::AwaitPortalConfirmation, self::PortalConfirmationWaitHours => [IntakeKind::Booking],
self::ArrivalInfoDaysBefore, self::GuestLinkValidDays => [],
self::ClarificationHoldAutoMinutes, self::ClarificationHoldManualMinutes, self::FormRequiresAddress => [IntakeKind::Inquiry],
self::DataRequest, self::DataRequestRemindersMax, self::DataRequestFollowupsMax, self::DataRequestReminderHours => [IntakeKind::Inquiry, IntakeKind::Booking],
@@ -111,12 +123,14 @@ public function normalize(mixed $value): string|int|bool|null
return match ($this) {
self::Processing => ($value instanceof ProcessingMode ? $value : ProcessingMode::tryFrom((string) $value))?->value,
self::Documents, self::Payments, self::GuestMessages => ($value instanceof Responsibility ? $value : Responsibility::tryFrom((string) $value))?->value,
self::PreReservation, self::FormRequiresAddress => is_bool($value) ? $value : filter_var($value, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE),
self::PreReservation, self::FormRequiresAddress, self::AwaitPortalConfirmation => is_bool($value) ? $value : filter_var($value, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE),
self::HoldHours, self::ArrivalInfoDaysBefore, self::ContractTemplate => is_numeric($value) ? (int) $value : null,
self::DataRequest => ($value instanceof DataRequestMode ? $value : DataRequestMode::tryFrom((string) $value))?->value,
self::ContractDelivery => ($value instanceof ContractDelivery ? $value : ContractDelivery::tryFrom((string) $value))?->value,
self::BookingNotice => ($value instanceof BookingNoticeMode ? $value : BookingNoticeMode::tryFrom((string) $value))?->value,
// 0 is a value of its own: no clarification hold, no reminder, no follow-up question.
self::ClarificationHoldAutoMinutes, self::ClarificationHoldManualMinutes, self::DataRequestRemindersMax, self::DataRequestFollowupsMax => is_numeric($value) ? max(0, (int) $value) : null,
self::DataRequestReminderHours, self::GuestLinkValidDays => is_numeric($value) ? max(1, (int) $value) : null,
self::DataRequestReminderHours, self::GuestLinkValidDays, self::PortalConfirmationWaitHours => is_numeric($value) ? max(1, (int) $value) : null,
};
}
@@ -139,6 +153,10 @@ public function describe(string|int|bool|null $value): string
self::DataRequestReminderHours => 'nach '.$value.' Stunden',
self::GuestLinkValidDays => $value.' Tage',
self::FormRequiresAddress => $value ? 'ja, Pflichtangabe' : 'nein, kann nachgefragt werden',
self::ContractDelivery => ContractDelivery::tryFrom((string) $value)?->getLabel() ?? '–',
self::BookingNotice => BookingNoticeMode::tryFrom((string) $value)?->getLabel() ?? '–',
self::AwaitPortalConfirmation => $value ? 'ja, erst nach der Bestätigungsmail' : 'nein',
self::PortalConfirmationWaitHours => $value.' Stunden',
};
}
}