Buchungsakte: Vorgang, naechster Schritt, Vertrag, Mailverlauf, Storno mit Mail, Archiv
Deploy FeWo mit PipelineManager / deploy (push) Successful in 3m38s
Deploy FeWo mit PipelineManager / deploy (push) Successful in 3m38s
- Buchungsseite zeigt Art des Vorgangs, Verlaufsleiste und den naechsten Schritt in Klartext - Vertragsabschnitt (Vorlage, Dokumente mit Pruefsumme, Zustellung) und Vertragstext-Ansicht - Reiter Aufgaben und Mailverlauf (jede Mail zur Buchung wird protokolliert) - Stornieren in der Verwaltung informiert Gast und Vermieter und legt eine Aufgabe fuer Stornokosten an - Stornierte/abgelehnte/abgelaufene Buchungen aus der Hauptliste, Filter Archiv anzeigen Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
89d569b6c8
commit
5baf39441f
15 files changed
+684
-7
No files matched your search
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Filament\Resources\Bookings\Pages;
|
||||
|
||||
use App\Actions\CancelBooking;
|
||||
use App\Actions\ConfirmBooking;
|
||||
use App\Actions\DeclineBooking;
|
||||
use App\Actions\SendOffer;
|
||||
@@ -189,6 +190,16 @@ protected function getHeaderActions(): array
|
||||
$notification = Notification::make()->title($sent ? 'Bestätigung gesendet' : 'Versand fehlgeschlagen');
|
||||
($sent ? $notification->success() : $notification->danger()->body('Details im Postfach.'))->send();
|
||||
}),
|
||||
Action::make('contractText')
|
||||
->label('Vertragstext ansehen')
|
||||
->icon(Heroicon::OutlinedDocumentMagnifyingGlass)
|
||||
->color('gray')
|
||||
->visible(fn (): bool => $this->record->offer_terms !== null)
|
||||
->modalHeading(fn (): string => 'Vertrag '.$this->record->reference)
|
||||
->modalContent(fn () => view('filament.booking-contract', ['booking' => $this->record]))
|
||||
->modalSubmitAction(false)
|
||||
->modalCancelActionLabel('Schließen')
|
||||
->modalWidth('4xl'),
|
||||
Action::make('contract')
|
||||
->label('Mietvertrag')
|
||||
->icon(Heroicon::OutlinedDocumentText)
|
||||
@@ -209,12 +220,23 @@ protected function getHeaderActions(): array
|
||||
->icon(Heroicon::OutlinedNoSymbol)
|
||||
->color('danger')
|
||||
->visible(fn (): bool => in_array($this->record->status, BookingStatus::occupying(), true))
|
||||
->requiresConfirmation()
|
||||
->modalDescription('Der Zeitraum wird wieder freigegeben. Der Gast wird nicht automatisch benachrichtigt.')
|
||||
->action(function (): void {
|
||||
$this->record->update(['status' => BookingStatus::Cancelled, 'cancelled_at' => now()]);
|
||||
->modalHeading('Buchung stornieren')
|
||||
->modalDescription('Der Zeitraum wird wieder freigegeben. Gast und Vermieter erhalten eine Stornierungs-E-Mail; die Stornokosten bleiben als Aufgabe offen.')
|
||||
->schema([
|
||||
Toggle::make('notify_guest')->label('Gast per E-Mail informieren')->default(true),
|
||||
Toggle::make('costs_task')->label('Aufgabe „Stornokosten prüfen“ anlegen')->default(true),
|
||||
])
|
||||
->action(function (array $data, CancelBooking $cancel): void {
|
||||
try {
|
||||
$informed = $cancel->handle($this->record, (bool) $data['notify_guest'], (bool) $data['costs_task'], auth()->user()->name);
|
||||
} catch (ReservationException $exception) {
|
||||
Notification::make()->title('Nicht möglich')->body($exception->getMessage())->danger()->send();
|
||||
|
||||
Notification::make()->title('Buchung storniert')->success()->send();
|
||||
return;
|
||||
}
|
||||
|
||||
$notification = Notification::make()->title('Buchung storniert');
|
||||
($informed ? $notification->success() : $notification->warning()->body('Die Mail an den Gast konnte nicht gesendet werden – bitte den Gast selbst informieren.'))->send();
|
||||
}),
|
||||
]),
|
||||
];
|
||||
|
||||
Reference in new issue
Block a user