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:
Lars StommerandClaude Opus 5.5 committed 2026-10-22 10:26:11 +02:00
1 parent bb7eb62782
commit 2892e6aeab
44 files changed
+1505 -23

No files matched your search

@@ -0,0 +1,67 @@
<?php
namespace App\Filament\Resources\Reviews\Schemas;
use App\Enums\ReviewStatus;
use App\Models\Property;
use App\Models\Review;
use Filament\Forms\Components\DatePicker;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\Textarea;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Components\Toggle;
use Filament\Schemas\Components\Section;
use Filament\Schemas\Schema;
class ReviewForm
{
public static function configure(Schema $schema): Schema
{
$stars = [1 => '★', 2 => '★★', 3 => '★★★', 4 => '★★★★', 5 => '★★★★★'];
return $schema
->columns(3)
->components([
Section::make('Bewertung')
->columnSpan(2)
->columns(2)
->schema([
TextInput::make('display_name')->label('Angezeigter Name')->required()->maxLength(80),
DatePicker::make('stayed_on')->label('Aufenthalt'),
Select::make('rating')->label('Gesamt')->options($stars)->required(),
...collect(Review::CATEGORIES)->map(fn (string $label, string $field) => Select::make($field)->label($label)->options($stars))->values()->all(),
TextInput::make('title')->label('Überschrift')->maxLength(120)->columnSpanFull(),
Textarea::make('body')->label('Text')->rows(5)->columnSpanFull(),
Textarea::make('private_feedback')
->label('Nur für die Gastgeber')
->rows(3)
->disabled(fn (?Review $record): bool => $record?->source === 'website')
->columnSpanFull(),
]),
Section::make('Freigabe')
->columnSpan(1)
->schema([
Select::make('status')->label('Status')->options(ReviewStatus::class)->default(ReviewStatus::Approved)->required(),
Toggle::make('publish_consent')
->label('Gast hat Veröffentlichung erlaubt')
->disabled(fn (?Review $record): bool => $record?->source === 'website'),
TextInput::make('source')
->label('Quelle')
->helperText('„website“ = über den Bewertungslink. Bei übernommenen Bewertungen das Portal eintragen.')
->default('manuell')
->disabled(fn (?Review $record): bool => $record?->source === 'website')
->required(),
Select::make('property_id')
->label('Wohnung')
->options(fn (): array => Property::query()->pluck('name', 'id')->all())
->default(fn (): ?int => Property::query()->value('id'))
->required(),
]),
Section::make('Öffentliche Antwort der Gastgeber')
->columnSpanFull()
->schema([
Textarea::make('response')->hiddenLabel()->rows(3)->placeholder('Optional – erscheint unter der Bewertung.'),
]),
]);
}
}