Vorgang: Schritte im Ablauf anklickbar – was geschah, Herkunft der Angaben, korrigieren
Deploy FeWo mit PipelineManager / deploy (push) Successful in 5m13s

- Ein Klick auf einen Schritt im „Ablauf“ öffnet seine Einzelheiten: die
  Verlaufseinträge dieses Schritts und bei den Gastangaben jede Angabe mit
  Wert, Herkunft (Webseite, Link, E-Mail, KI, Sie), Zeitpunkt, Belegstelle,
  Sicherheit und offenen Abweichungen.
- „Angaben korrigieren“ öffnet den Eintragsdialog: Ihre Eingabe gilt, der
  vorherige Wert bleibt im Nachweis; „Diesen Schritt ausführen“ führt
  direkt zur Aktion des Schritts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
LarsandClaude Opus 5.5 committed 2026-11-03 18:03:36 +01:00
1 parent ad63db78f3
commit 7e4e208d18
5 files changed
+219 -2

No files matched your search

+28
View File
@@ -5,6 +5,7 @@
use App\Actions\ContributeCaseFacts;
use App\Actions\CreateReservation;
use App\Actions\DecideBookingWish;
use App\Actions\ProvideGuestContact;
use App\Actions\SendInformation;
use App\Actions\SendOffer;
use App\Actions\SubmitBookingWish;
@@ -15,23 +16,28 @@
use App\Enums\DocumentKind;
use App\Enums\FactSource;
use App\Exceptions\ReservationException;
use App\Filament\Resources\Bookings\Pages\ViewBooking;
use App\Models\Booking;
use App\Models\BookingTask;
use App\Models\CaseFact;
use App\Models\Channel;
use App\Models\Guest;
use App\Models\Property;
use App\Models\User;
use App\Pricing\StayRequest;
use App\Process\ActivityDetails;
use App\Process\CaseRequirements;
use App\Support\Content;
use App\Support\Settings;
use Carbon\CarbonImmutable;
use Database\Seeders\PropertySeeder;
use Database\Seeders\SiteSeeder;
use Filament\Actions\Testing\TestAction;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Facades\Mail;
use Illuminate\Support\Facades\Storage;
use Livewire\Livewire;
use Tests\TestCase;
/**
@@ -206,6 +212,28 @@ public function test_completing_the_address_continues_an_automatic_case(): void
$this->assertSame(BookingStatus::OfferSent, $booking->fresh()->status);
}
/** A step of the progress list shows where each detail came from and lets the landlord correct it. */
public function test_the_progress_list_shows_the_source_of_each_detail_and_the_landlord_corrects_it(): void
{
$this->actingAs(User::factory()->create());
$booking = $this->request();
app(ContributeCaseFacts::class)->handle($booking, ['guest.street' => 'Lindenallee 12'], FactSource::Extraction, ['reference' => 'message:1', 'evidence' => ['guest.street' => 'unsere Anschrift: Lindenallee 12'], 'confidence' => ['guest.street' => 0.9]]);
Livewire::test(ViewBooking::class, ['record' => $booking->getRouteKey()])
->assertSeeHtml('mountAction(&#039;activityDetails&#039;, { key: &#039;contact&#039; })')
->mountAction(TestAction::make('activityDetails')->arguments(['key' => 'contact']))
->assertActionMounted('activityDetails')
->assertMountedActionModalSee(['Angaben und ihre Herkunft', 'Lindenallee 12', 'aus einer Nachricht erkannt (KI)', 'Sicherheit 90 %', 'unsere Anschrift: Lindenallee 12', 'Anfrageformular der Webseite']);
Livewire::test(ViewBooking::class, ['record' => $booking->getRouteKey()])
->callAction(TestAction::make('provideContact')->arguments([]), ['guest' => ['first_name' => 'Gesa', 'last_name' => 'Gast', 'email' => 'gesa@example.org', 'street' => 'Lindenallee 21'], 'process' => ProvideGuestContact::MANUAL, 'guest_confirmed' => false]);
$this->assertSame('Lindenallee 21', $booking->guest->fresh()->street);
$row = collect(ActivityDetails::facts($booking->fresh()))->firstWhere('field', 'guest.street');
$this->assertSame(['Lindenallee 21', 'von Ihnen eingetragen'], [$row['value'], $row['source']]);
$this->assertSame('Lindenallee 12', CaseFact::query()->where('field', 'guest.street')->where('source', FactSource::Landlord)->sole()->previous_value, 'the corrected value stays in the evidence');
}
/**
* @param array<string, ?string> $address
*/