v0.11: Angebot wartet sichtbar auf Pflichtangaben; Postfach prüfen; Eingangsmails am Vorgang
Deploy FeWo mit PipelineManager / deploy (push) Successful in 5m10s

- Vorgang: „Angebot prüfen und senden“ wird erst angeboten, wenn alle
  Pflichtangaben da sind („erst wenn alle Angaben da sind“); ebenso wartet
  „Buchungswunsch bestätigen?“. Die harte Sperre in SendOffer, AutoOffer
  und DecideBookingWish bestand bereits; jetzt stimmt auch die Anzeige.
- System › Betrieb: „Postfach prüfen“ (Verbindung, Anzahl Nachrichten der
  letzten Tage, nichts wird gelesen oder markiert) und Stand des Abrufs.
- Posteingang zeigt letzten erfolgreichen Abruf und letzten Fehler.
- Vorgang: neuer Bereich „Eingegangene E-Mails“ mit Lesen und Erkanntem;
  „Mailverlauf“ heißt jetzt „Gesendete E-Mails“.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
LarsandClaude Opus 5.5 committed 2026-11-03 15:03:11 +01:00
1 parent 6862dec201
commit 3a039e5c50
10 files changed
+206 -3

No files matched your search

+17
View File
@@ -84,6 +84,23 @@ public function test_approval_mode_prepares_the_question_and_the_landlord_releas
$this->assertSame(DataRequest::OPEN, $request->fresh()->status);
}
/** G2a: while the guest is asked, the offer is not offered as the next step – neither by hand nor automatically. */
public function test_the_offer_waits_for_the_answer_even_when_the_steps_are_released_by_hand(): void
{
Settings::tenant()->update(['process_defaults' => ['processing' => 'manual', 'data_request_mode' => 'automatic']]);
$booking = $this->request();
$this->assertSame(DataRequest::OPEN, $booking->openDataRequest()->status);
$this->assertNotSame('sendOffer', CaseActivities::next($booking)?->action);
$offer = collect(CaseActivities::for($booking))->firstWhere('key', 'offer');
$this->assertSame(['erst wenn alle Angaben da sind', null], [$offer->detail, $offer->action]);
app(ContributeCaseFacts::class)->handle($booking, ['guest.street' => 'Strandweg 1', 'guest.postal_code' => '18225', 'guest.city' => 'Kühlungsborn', 'guest.country' => 'DE'], FactSource::GuestLink, ['reference' => 'link']);
$this->assertSame('sendOffer', CaseActivities::next($booking->fresh())?->action, 'complete: now the landlord releases the offer');
$this->assertSame(BookingStatus::Reserved, $booking->fresh()->status, 'manual processing: nothing sent by itself');
}
public function test_manual_mode_leaves_the_question_to_the_landlord(): void
{
Settings::tenant()->update(['process_defaults' => ['data_request_mode' => 'manual']]);
+18
View File
@@ -8,6 +8,8 @@
use App\Channels\Mail\PortalMail;
use App\Enums\BookingTaskKind;
use App\Filament\Pages\Operations;
use App\Filament\Resources\Bookings\Pages\ViewBooking;
use App\Filament\Resources\Bookings\RelationManagers\InboundMessagesRelationManager;
use App\Filament\Resources\InboundMessages\Pages\ListInboundMessages;
use App\Mail\DataRequested;
use App\Models\Booking;
@@ -182,6 +184,22 @@ public function test_the_mailbox_is_kept_as_a_record_and_full_mode_reads_every_m
$this->assertNotNull($mailbox->fresh()->last_fetched_at);
}
public function test_the_mailbox_can_be_checked_and_incoming_mails_show_on_the_case(): void
{
$this->actingAs(User::factory()->create());
Mailbox::query()->create(['tenant_id' => Settings::tenant()->id, 'host' => 'imap.example.org', 'username' => 'anfragen@example.org', 'password' => 'x', 'mode' => Mailbox::FULL, 'is_active' => true]);
$reader = Mockery::mock(MailboxReader::class);
$reader->shouldReceive('probe')->once()->andReturn(7);
$this->app->instance(MailboxReader::class, $reader);
Livewire::test(Operations::class)->call('checkMailbox')->assertNotified('Verbindung in Ordnung');
$booking = $this->request();
$this->receive(from: 'gesa@example.org', subject: 'Frage zu '.$booking->reference, text: 'Hallo');
Livewire::test(InboundMessagesRelationManager::class, ['ownerRecord' => $booking, 'pageClass' => ViewBooking::class])
->assertSee('Frage zu '.$booking->reference);
}
private function request(string $arrival = '2026-11-07', string $departure = '2026-11-10'): Booking
{
return app(CreateReservation::class)->handle($this->property->fresh(), new StayRequest(CarbonImmutable::parse($arrival), CarbonImmutable::parse($departure), 2), ['first_name' => 'Gesa', 'last_name' => 'Gast', 'email' => 'gesa@example.org'])->fresh();