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
@@ -6,6 +6,7 @@
|
||||
use App\Enums\CaseType;
|
||||
use App\Enums\ContractDelivery;
|
||||
use App\Enums\DataRequestMode;
|
||||
use App\Enums\InquiryAnswer;
|
||||
use App\Enums\IntakeKind;
|
||||
use App\Enums\ProcessingMode;
|
||||
use App\Enums\ProcessSetting;
|
||||
@@ -35,6 +36,12 @@ final class ProcessProfile
|
||||
/** Fixed by a function template chosen for the channel (Schablonenkomposition). */
|
||||
public const TEMPLATE = 'template';
|
||||
|
||||
/** Suggested by a function template (lowest level above the built-in default; every explicit level wins). */
|
||||
public const TEMPLATE_DEFAULT = 'template_default';
|
||||
|
||||
/** Not set anywhere: derived from a related setting (the answer from the reservation, a sender from guest_messages). */
|
||||
public const DERIVED = 'derived';
|
||||
|
||||
/** Fixed by the case type (A6), not settable. */
|
||||
public const CASE_TYPE = 'case_type';
|
||||
|
||||
@@ -108,6 +115,27 @@ public function payments(): Responsibility
|
||||
return Responsibility::tryFrom((string) $this->value(ProcessSetting::Payments)) ?? Responsibility::Landlord;
|
||||
}
|
||||
|
||||
/**
|
||||
* How a request is answered first. Profiles frozen before the setting existed derive it from the reservation (an
|
||||
* information reserved nothing, an offer did) – exactly the former behaviour.
|
||||
*/
|
||||
public function inquiryAnswer(): InquiryAnswer
|
||||
{
|
||||
return InquiryAnswer::tryFrom((string) ($this->values[ProcessSetting::InquiryAnswer->value] ?? '')) ?? ($this->preReservation() ? InquiryAnswer::Offer : InquiryAnswer::Information);
|
||||
}
|
||||
|
||||
/** Who sends the arrival information; not set: whoever writes to the guest (guest_messages). */
|
||||
public function arrivalInfoSender(): Responsibility
|
||||
{
|
||||
return Responsibility::tryFrom((string) ($this->values[ProcessSetting::ArrivalInfoSender->value] ?? '')) ?? $this->guestMessages();
|
||||
}
|
||||
|
||||
/** Who asks for the review; not set: whoever writes to the guest (guest_messages). */
|
||||
public function reviewRequestSender(): Responsibility
|
||||
{
|
||||
return Responsibility::tryFrom((string) ($this->values[ProcessSetting::ReviewRequestSender->value] ?? '')) ?? $this->guestMessages();
|
||||
}
|
||||
|
||||
public function guestMessages(): Responsibility
|
||||
{
|
||||
return Responsibility::tryFrom((string) $this->value(ProcessSetting::GuestMessages)) ?? Responsibility::Landlord;
|
||||
@@ -199,6 +227,8 @@ public static function sourceLabel(string $source): string
|
||||
self::CASE_TYPE => 'fest für diese Vorgangsart',
|
||||
self::MODEL => 'festgelegt durch das gewählte Ablaufmodell',
|
||||
self::TEMPLATE => 'festgelegt durch die gewählte Funktionsschablone',
|
||||
self::TEMPLATE_DEFAULT => 'Vorschlag der gewählten Funktionsschablone',
|
||||
self::DERIVED => 'abgeleitet aus einer verwandten Einstellung',
|
||||
'migration' => 'aus dem bisherigen Stand übernommen',
|
||||
default => 'Grundeinstellung',
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user