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)