Anfrage-Basisprozess inquiry.request mit Schablonen für Antwort und Gastkommunikation
Antwortart (Auskunft/Angebot) und Reservierung sind entkoppelt (neue Einstellung inquiry_answer; pre_reservation bleibt die Reservierungsstrategie). Anlass-bezogene Absender für Anreise-Information und Bewertungsbitte; Schablonen liefern Standardwerte unterhalb aller einstellbaren Ebenen. A1/A2 bleiben Voreinstellungen und Altfassungen. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e40f8639b3
commit
221ce8ca81
51 files changed
+773
-73
No files matched your search
@@ -29,6 +29,9 @@ enum ProcessSetting: string
|
||||
case BookingNotice = 'booking_notice';
|
||||
case AwaitPortalConfirmation = 'await_portal_confirmation';
|
||||
case PortalConfirmationWaitHours = 'portal_confirmation_wait_hours';
|
||||
case InquiryAnswer = 'inquiry_answer';
|
||||
case ArrivalInfoSender = 'arrival_info_sender';
|
||||
case ReviewRequestSender = 'review_request_sender';
|
||||
|
||||
/**
|
||||
* Built-in default (the behaviour before any landlord setting existed).
|
||||
@@ -54,6 +57,8 @@ public function default(): string|int|bool|null
|
||||
self::BookingNotice => BookingNoticeMode::Off->value,
|
||||
self::AwaitPortalConfirmation => false,
|
||||
self::PortalConfirmationWaitHours => 48,
|
||||
// Not set: derived (ProcessSettings) – the answer from the reservation, the senders from guest_messages.
|
||||
self::InquiryAnswer, self::ArrivalInfoSender, self::ReviewRequestSender => null,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -83,6 +88,9 @@ public function question(): string
|
||||
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?',
|
||||
self::InquiryAnswer => 'Womit wird eine Anfrage zuerst beantwortet?',
|
||||
self::ArrivalInfoSender => 'Wer schickt dem Gast die Anreise-Informationen?',
|
||||
self::ReviewRequestSender => 'Wer bittet den Gast nach dem Aufenthalt um eine Bewertung?',
|
||||
};
|
||||
}
|
||||
|
||||
@@ -94,7 +102,8 @@ public function question(): string
|
||||
public function channelIntakes(): array
|
||||
{
|
||||
return match ($this) {
|
||||
self::Processing, self::Payments, self::GuestMessages, self::ContractTemplate => [IntakeKind::Inquiry, IntakeKind::Booking],
|
||||
self::Processing, self::Payments, self::GuestMessages, self::ContractTemplate, self::ArrivalInfoSender, self::ReviewRequestSender => [IntakeKind::Inquiry, IntakeKind::Booking],
|
||||
self::InquiryAnswer => [IntakeKind::Inquiry],
|
||||
self::PreReservation, self::HoldHours => [IntakeKind::Inquiry],
|
||||
self::Documents, self::ContractDelivery, self::BookingNotice, self::AwaitPortalConfirmation, self::PortalConfirmationWaitHours => [IntakeKind::Booking],
|
||||
self::ArrivalInfoDaysBefore, self::GuestLinkValidDays => [],
|
||||
@@ -108,7 +117,7 @@ public function channelIntakes(): array
|
||||
*/
|
||||
public function isLandlordSetting(): bool
|
||||
{
|
||||
return $this !== self::ContractTemplate;
|
||||
return ! in_array($this, [self::ContractTemplate, self::InquiryAnswer], true);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -122,7 +131,8 @@ 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::Documents, self::Payments, self::GuestMessages, self::ArrivalInfoSender, self::ReviewRequestSender => ($value instanceof Responsibility ? $value : Responsibility::tryFrom((string) $value))?->value,
|
||||
self::InquiryAnswer => ($value instanceof InquiryAnswer ? $value : InquiryAnswer::tryFrom((string) $value))?->value,
|
||||
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,
|
||||
@@ -141,7 +151,8 @@ public function describe(string|int|bool|null $value): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::Processing => ProcessingMode::tryFrom((string) $value)?->getLabel() ?? '–',
|
||||
self::Documents, self::Payments, self::GuestMessages => Responsibility::tryFrom((string) $value)?->getLabel() ?? '–',
|
||||
self::Documents, self::Payments, self::GuestMessages, self::ArrivalInfoSender, self::ReviewRequestSender => Responsibility::tryFrom((string) $value)?->getLabel() ?? '–',
|
||||
self::InquiryAnswer => InquiryAnswer::tryFrom((string) $value)?->getLabel() ?? '–',
|
||||
self::PreReservation => $value ? 'ja' : 'nein',
|
||||
self::HoldHours => $value.' Stunden',
|
||||
self::ArrivalInfoDaysBefore => $value.' Tage vor Anreise',
|
||||
|
||||
Reference in new issue
Block a user