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:
LarsandClaude Opus 5.5 committed 2026-11-03 13:07:18 +01:00
1 parent 799869c6a4
commit ccac78a6c9
33 files changed
+1041 -47

No files matched your search

+4 -4
View File
@@ -104,7 +104,7 @@ public function test_missing_data_stops_the_case_with_a_task_and_it_continues_au
Livewire::test(CreateBooking::class)
->fillForm([
'kind' => BookingForm::INQUIRY, 'property_id' => $this->property->id, 'guests' => 2,
'arrival' => '2026-11-07', 'departure' => '2026-11-10', 'first_name' => 'Paul', 'last_name' => 'Telefon', 'send_mails' => true,
'arrival' => '2026-11-07', 'departure' => '2026-11-10', 'first_name' => 'Paul', 'last_name' => 'Telefon', 'street' => 'Strandweg 1', 'postal_code' => '18225', 'city' => 'Kühlungsborn', 'country' => 'DE', 'send_mails' => true,
])
->call('create')
->assertHasNoFormErrors();
@@ -116,7 +116,7 @@ public function test_missing_data_stops_the_case_with_a_task_and_it_continues_au
Mail::assertNotSent(OfferMade::class);
Livewire::test(ViewBooking::class, ['record' => $booking->getRouteKey()])
->callAction(TestAction::make('provideContact')->arguments([]), ['guest' => ['first_name' => 'Paul', 'last_name' => 'Telefon', 'email' => 'paul@example.org'], 'process' => ProvideGuestContact::AUTOMATIC, 'guest_confirmed' => false])
->callAction(TestAction::make('provideContact')->arguments([]), ['guest' => ['first_name' => 'Paul', 'last_name' => 'Telefon', 'email' => 'paul@example.org', 'street' => 'Strandweg 1', 'postal_code' => '18225', 'city' => 'Kühlungsborn', 'country' => 'DE'], 'process' => ProvideGuestContact::AUTOMATIC, 'guest_confirmed' => false])
->assertNotified('Kontaktdaten gespeichert, Angebot gesendet');
$this->assertSame(BookingStatus::OfferSent, $booking->fresh()->status);
@@ -202,7 +202,7 @@ public function test_nationality_is_never_a_reason_to_stop(): void
$foreign = app(CreateReservation::class)->handle(
$this->property->fresh(),
new StayRequest(CarbonImmutable::parse('2026-11-07'), CarbonImmutable::parse('2026-11-10'), 2),
['first_name' => 'Ayşe', 'last_name' => 'Yılmaz', 'email' => 'ayse@example.com.tr', 'country' => 'TR', 'city' => 'İzmir'],
['first_name' => 'Ayşe', 'last_name' => 'Yılmaz', 'email' => 'ayse@example.com.tr', 'country' => 'TR', 'city' => 'İzmir', 'street' => 'Strandweg 1', 'postal_code' => '18225', 'city' => 'Kühlungsborn', 'country' => 'DE'],
);
$this->assertSame(BookingStatus::OfferSent, $foreign->status);
@@ -243,7 +243,7 @@ private function request(string $email = 'gesa@example.org', bool $sendMails = f
return app(CreateReservation::class)->handle(
$this->property->fresh(),
new StayRequest(CarbonImmutable::parse('2026-11-07'), CarbonImmutable::parse('2026-11-10'), 2),
['first_name' => 'Gesa', 'last_name' => 'Gast', 'email' => $email],
['first_name' => 'Gesa', 'last_name' => 'Gast', 'email' => $email, 'street' => 'Strandweg 1', 'postal_code' => '18225', 'city' => 'Kühlungsborn', 'country' => 'DE'],
sendMails: $sendMails,
);
}