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>
49 lines
1.6 KiB
PHP
49 lines
1.6 KiB
PHP
<?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)),
|
||
]);
|
||
}
|
||
}
|