From 7a6ee316cdb5eaab61cbc535defa0b06912f7733 Mon Sep 17 00:00:00 2001 From: Lars Stommer Date: Thu, 22 Oct 2026 21:46:34 +0200 Subject: [PATCH] Admin: show the offer link (e.g. to share it, or on staging where mails go to the log) Co-Authored-By: Claude Opus 5.5 --- .../Resources/Bookings/Pages/ViewBooking.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/Filament/Resources/Bookings/Pages/ViewBooking.php b/app/Filament/Resources/Bookings/Pages/ViewBooking.php index 4e979fc..deed588 100644 --- a/app/Filament/Resources/Bookings/Pages/ViewBooking.php +++ b/app/Filament/Resources/Bookings/Pages/ViewBooking.php @@ -105,6 +105,18 @@ protected function getHeaderActions(): array fn () => $send->handle($this->record, $this->offerChanges($data)), 'Angebot gesendet', )), + Action::make('offerLink') + ->label('Angebotslink') + ->icon(Heroicon::OutlinedLink) + ->color('gray') + ->visible(fn (): bool => $this->record->status === BookingStatus::OfferSent && $this->record->hold_expires_at?->isFuture()) + ->modalHeading('Link zum Angebot') + ->modalDescription('Derselbe Link wie in der Angebots-E-Mail – z. B. zum Weitergeben per Messenger. Gültig bis zum Ende der Angebotsfrist.') + ->schema([ + TextInput::make('url')->label('Link')->default(fn (SendOffer $send): string => $send->offerUrl($this->record))->readOnly()->copyable(), + ]) + ->modalSubmitAction(false) + ->modalCancelActionLabel('Schließen'), Action::make('offerPdf') ->label('Angebot (PDF)') ->icon(Heroicon::OutlinedDocumentText)