Files
LarsandClaude Sonnet 5.5 5baf39441f
Deploy FeWo mit PipelineManager / deploy (push) Successful in 3m38s
Buchungsakte: Vorgang, naechster Schritt, Vertrag, Mailverlauf, Storno mit Mail, Archiv
- 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>
2026-10-30 16:16:42 +01:00

49 lines
1.6 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
namespace App\Filament\Resources\Bookings\RelationManagers;
use App\Enums\BookingTaskStatus;
use App\Models\BookingTask;
use Filament\Actions\Action;
use Filament\Resources\RelationManagers\RelationManager;
use Filament\Support\Icons\Heroicon;
use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Table;
/**
* Tasks of this booking (payment reminders, cancellation requests and costs).
*/
class TasksRelationManager extends RelationManager
{
protected static string $relationship = 'tasks';
protected static ?string $title = 'Aufgaben';
public function isReadOnly(): bool
{
return false;
}
public function table(Table $table): Table
{
return $table
->recordTitleAttribute('kind')
->defaultSort('created_at', 'desc')
->emptyStateHeading('Keine Aufgaben zu dieser Buchung')
->columns([
TextColumn::make('kind')->label('Aufgabe')->badge(),
TextColumn::make('status')->label('Status')->badge(),
TextColumn::make('due_on')->label('Seit / fällig')->date('d.m.Y')->placeholder('–'),
TextColumn::make('note')->label('Hinweis')->wrap()->placeholder('–'),
])
->recordActions([
Action::make('done')
->label('Erledigt')
->icon(Heroicon::OutlinedCheck)
->color('success')
->visible(fn (BookingTask $record): bool => $record->status === BookingTaskStatus::Open)
->action(fn (BookingTask $record) => $record->complete(auth()->user()->name)),
]);
}
}