v0.11 U2: Angebots-Gate, gemeinsamer Fakteneingang mit Herkunft
- CaseRequirements: Vor einem eigenen verbindlichen Angebot und vor der verbindlichen Bestätigung eines Buchungswunsches müssen Vor- und Nachname, E-Mail, vollständige Anschrift mit Land, Personenzahl und Zeitraum vorliegen – harter Blocker, auch von Hand (G2a, B3). Die Auskunft unter Vorbehalt bleibt ohne dieses Gate. - ContributeCaseFacts (S5): jede Angabe mit Herkunft und Ergebnis in case_facts; fehlend → übernommen, gleich → bestätigt, abweichend vom Gast → Prüfaufgabe (Kartei bleibt), Vermieterin maßgeblich, Zeitraum und Personen → Änderungswunsch; idempotent; danach einmal CaseAutomation. - ProvideGuestContact und Webformular nutzen den Fakteneingang. - Land als ISO-Code mit „Deutschland“ als änderbarem Formularstandard; guests.country ohne stillen Standardwert (B4). - Testdaten bestehender Tests um Anschriften ergänzt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
799869c6a4
commit
ccac78a6c9
33 files changed
+1041
-47
No files matched your search
@@ -4,6 +4,7 @@
|
||||
|
||||
use App\Availability\AvailabilityChecker;
|
||||
use App\Enums\BookingStatus;
|
||||
use App\Enums\FactSource;
|
||||
use App\Enums\IntakeKind;
|
||||
use App\Exceptions\ReservationException;
|
||||
use App\Mail\NewReservation;
|
||||
@@ -103,6 +104,16 @@ private function create(Property $property, StayRequest $stay, array $guestData,
|
||||
]);
|
||||
});
|
||||
|
||||
if ($source === 'website') {
|
||||
// Evidence of what the guest typed (v0.11, S5): completed fields are confirmed, differing ones go to the
|
||||
// landlord as a conflict instead of only a note. The guest record itself was already handled above.
|
||||
$facts = collect(Arr::only($guestData, ['first_name', 'last_name', 'email', 'phone', 'street', 'postal_code', 'city', 'country']))
|
||||
->filter(fn (?string $value): bool => filled($value))
|
||||
->mapWithKeys(fn (string $value, string $field): array => ['guest.'.$field => $value])->all();
|
||||
app(ContributeCaseFacts::class)->handle($booking, $facts, FactSource::WebsiteForm, ['advance' => false, 'reference' => 'request']);
|
||||
$booking->refresh();
|
||||
}
|
||||
|
||||
if ($sendMails) {
|
||||
$this->sendMails($booking);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user