Gästeverzeichnis und Customer Voice
- 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>
This commit is contained in:
1 parent
bb7eb62782
commit
2892e6aeab
44 files changed
+1505
-23
No files matched your search
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Reviews\Tables;
|
||||
|
||||
use App\Enums\ReviewStatus;
|
||||
use App\Models\Review;
|
||||
use Filament\Actions\Action;
|
||||
use Filament\Actions\EditAction;
|
||||
use Filament\Support\Icons\Heroicon;
|
||||
use Filament\Tables\Columns\IconColumn;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Tables\Filters\SelectFilter;
|
||||
use Filament\Tables\Table;
|
||||
|
||||
class ReviewsTable
|
||||
{
|
||||
public static function configure(Table $table): Table
|
||||
{
|
||||
return $table
|
||||
->defaultSort('created_at', 'desc')
|
||||
->columns([
|
||||
TextColumn::make('rating')
|
||||
->label('Sterne')
|
||||
->formatStateUsing(fn (int $state): string => str_repeat('★', $state).str_repeat('☆', 5 - $state))
|
||||
->color('warning')
|
||||
->sortable(),
|
||||
TextColumn::make('display_name')
|
||||
->label('Gast')
|
||||
->description(fn (Review $record): ?string => $record->title)
|
||||
->searchable(['display_name', 'title', 'body']),
|
||||
TextColumn::make('status')->label('Status')->badge(),
|
||||
IconColumn::make('publish_consent')->label('Darf veröffentlicht werden')->boolean(),
|
||||
TextColumn::make('source')->label('Quelle'),
|
||||
TextColumn::make('stayed_on')->label('Aufenthalt')->date('m/Y')->sortable(),
|
||||
])
|
||||
->filters([
|
||||
SelectFilter::make('status')->label('Status')->options(ReviewStatus::class),
|
||||
])
|
||||
->recordActions([
|
||||
Action::make('approve')
|
||||
->label('Freigeben')
|
||||
->icon(Heroicon::OutlinedCheck)
|
||||
->color('success')
|
||||
->visible(fn (Review $record): bool => $record->status !== ReviewStatus::Approved)
|
||||
->action(fn (Review $record) => $record->update(['status' => ReviewStatus::Approved])),
|
||||
Action::make('reject')
|
||||
->label('Ablehnen')
|
||||
->icon(Heroicon::OutlinedXMark)
|
||||
->color('gray')
|
||||
->visible(fn (Review $record): bool => $record->status === ReviewStatus::Pending)
|
||||
->action(fn (Review $record) => $record->update(['status' => ReviewStatus::Rejected])),
|
||||
EditAction::make(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user