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
@@ -5,6 +5,7 @@
|
||||
use App\Actions\AcceptOffer;
|
||||
use App\Actions\SendOffer;
|
||||
use App\Enums\BookingStatus;
|
||||
use App\Enums\InquiryAnswer;
|
||||
use App\Enums\IntakeKind;
|
||||
use App\Process\Tester\SandboxContext;
|
||||
|
||||
@@ -40,7 +41,7 @@ public function events(array $inputs): array
|
||||
new ScenarioEvent('Gast fragt mit allen Angaben an', fn (SandboxContext $context) => $context->request(['street' => 'Teststraße 1', 'postal_code' => '18225', 'city' => 'Kühlungsborn', 'country' => 'DE'])),
|
||||
new ScenarioEvent('Sie senden das Angebot (falls es nicht automatisch ging)', function (SandboxContext $context): void {
|
||||
$booking = $context->booking->fresh();
|
||||
if ($booking->status === BookingStatus::Reserved && $booking->offer_version === 0 && $booking->process()->preReservation()) {
|
||||
if ($booking->status === BookingStatus::Reserved && $booking->offer_version === 0 && $booking->process()->inquiryAnswer() === InquiryAnswer::Offer) {
|
||||
app(SendOffer::class)->handle($booking);
|
||||
}
|
||||
}),
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
use App\Actions\SendOffer;
|
||||
use App\Enums\BookingStatus;
|
||||
use App\Enums\InquiryAnswer;
|
||||
use App\Enums\IntakeKind;
|
||||
use App\Models\Booking;
|
||||
use App\Models\Guest;
|
||||
@@ -55,7 +56,7 @@ public function events(array $inputs): array
|
||||
new ScenarioEvent('Gast fragt mit allen Angaben an', fn (SandboxContext $context) => $context->request(['street' => 'Teststraße 1', 'postal_code' => '18225', 'city' => 'Kühlungsborn', 'country' => 'DE'])),
|
||||
new ScenarioEvent('Sie senden das Angebot (falls es nicht automatisch ging)', function (SandboxContext $context): void {
|
||||
$booking = $context->booking->fresh();
|
||||
if ($booking->status === BookingStatus::Reserved && $booking->offer_version === 0 && $booking->process()->preReservation()) {
|
||||
if ($booking->status === BookingStatus::Reserved && $booking->offer_version === 0 && $booking->process()->inquiryAnswer() === InquiryAnswer::Offer) {
|
||||
app(SendOffer::class)->handle($booking);
|
||||
}
|
||||
}),
|
||||
|
||||
Reference in new issue
Block a user