- Gäste: Markierungen, Aufenthalte & Umsatz, Stammgast-/Einwilligungsfilter, CSV-Export, Anonymisierung (manuell + automatisch nach Aufbewahrungsfrist) - Werbe-Einwilligung per Double-Opt-in aus dem Anfrageformular, signierte Bestätigungs-/Abmeldelinks - Bewertungen: automatische Einladung nach Abreise, Bewertungsformular mit Kategorien und internem Feedback, Freigabe und öffentliche Antwort im Admin - Konzept: Rollen, Inhalte, Customer Voice, Architektur Portal-Sync/Buchungshoheit Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
40 lines
1.3 KiB
PHP
40 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\Guests\RelationManagers;
|
|
|
|
use App\Filament\Resources\Bookings\BookingResource;
|
|
use App\Models\Booking;
|
|
use Filament\Actions\ViewAction;
|
|
use Filament\Resources\RelationManagers\RelationManager;
|
|
use Filament\Tables\Columns\TextColumn;
|
|
use Filament\Tables\Table;
|
|
|
|
class BookingsRelationManager extends RelationManager
|
|
{
|
|
protected static string $relationship = 'bookings';
|
|
|
|
protected static ?string $title = 'Aufenthalte & Anfragen';
|
|
|
|
public function isReadOnly(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function table(Table $table): Table
|
|
{
|
|
return $table
|
|
->recordTitleAttribute('reference')
|
|
->columns([
|
|
TextColumn::make('reference')->label('Nr.'),
|
|
TextColumn::make('arrival')->label('Anreise')->date('d.m.Y'),
|
|
TextColumn::make('departure')->label('Abreise')->date('d.m.Y'),
|
|
TextColumn::make('guests')->label('Pers.'),
|
|
TextColumn::make('status')->label('Status')->badge(),
|
|
TextColumn::make('total')->label('Gesamt')->money('EUR', divideBy: 100, locale: 'de'),
|
|
])
|
|
->recordActions([
|
|
ViewAction::make()->url(fn (Booking $record): string => BookingResource::getUrl('view', ['record' => $record])),
|
|
]);
|
|
}
|
|
}
|