Buchungsakte: Vorgang, naechster Schritt, Vertrag, Mailverlauf, Storno mit Mail, Archiv
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>
This commit is contained in:
LarsandClaude Sonnet 5.5 committed 2026-10-30 16:16:42 +01:00
1 parent 89d569b6c8
commit 5baf39441f
15 files changed
+684 -7

No files matched your search

@@ -3,24 +3,68 @@
namespace App\Filament\Resources\Bookings\Schemas;
use App\Models\Booking;
use App\Support\BookingProgress;
use App\Support\Money;
use Carbon\CarbonImmutable;
use Filament\Infolists\Components\RepeatableEntry;
use Filament\Infolists\Components\RepeatableEntry\TableColumn;
use Filament\Infolists\Components\TextEntry;
use Filament\Schemas\Components\Grid;
use Filament\Schemas\Components\Section;
use Filament\Schemas\Schema;
use Illuminate\Support\HtmlString;
class BookingInfolist
{
/**
* The steps of the process as a row of chips.
*/
private static function timeline(Booking $booking): HtmlString
{
$style = [
'done' => 'background:#dcfce7;color:#14532d',
'current' => 'background:#fef3c7;color:#78350f;font-weight:700',
'todo' => 'background:#f3f4f6;color:#4b5563',
'skipped' => 'background:#f3f4f6;color:#9ca3af;text-decoration:line-through',
];
$icon = ['done' => '✓ ', 'current' => '● ', 'todo' => '', 'skipped' => ''];
return new HtmlString('<div style="display:flex;flex-wrap:wrap;gap:.4rem">'.collect(BookingProgress::steps($booking))->map(fn (array $step): string => '<span style="padding:.25rem .6rem;border-radius:999px;font-size:.8rem;'.$style[$step['state']].'">'.$icon[$step['state']].e($step['label']).($step['detail'] ? ' · '.e($step['detail']) : '').'</span>')->implode('').'</div>');
}
public static function configure(Schema $schema): Schema
{
return $schema
->columns(3)
->components([
Section::make('Vorgang')
->columnSpanFull()
->schema([
TextEntry::make('process')->label('Art des Vorgangs')->state(fn (Booking $record): string => BookingProgress::kindLabel($record)),
TextEntry::make('next')
->label(fn (Booking $record): string => 'Nächster Schritt: '.BookingProgress::next($record)['title'])
->state(fn (Booking $record): string => BookingProgress::next($record)['text'])
->color(fn (Booking $record): string => BookingProgress::next($record)['color'])
->weight('bold'),
TextEntry::make('steps')
->label('Verlauf')
->state(fn (Booking $record): HtmlString => self::timeline($record))
->html()
->columnSpanFull(),
]),
Grid::make(1)
->columnSpan(2)
->schema([
Section::make('Vertrag')
->columns(2)
->schema([
TextEntry::make('contract_template')->label('Vorlage')->state(fn (Booking $record): string => isset($record->offer_terms['template']) ? $record->offer_terms['template']['name'].' (Version '.$record->offer_terms['template']['version'].')' : ($record->offer_terms ? 'Texte der Webseite (Stand '.CarbonImmutable::parse($record->offer_terms['captured_at'])->format('d.m.Y').')' : 'Noch kein Angebot / Vertrag')),
TextEntry::make('contract_state')->label('Dokumente')->state(fn (Booking $record): string => collect([
$record->offer_path ? 'Angebot (PDF) Version '.$record->offer_version : null,
$record->contract_path ? 'Mietvertrag (PDF, unveränderlich, Prüfsumme '.substr((string) $record->contract_pdf_sha256, 0, 10).')' : null,
])->filter()->implode(' · ') ?: 'Noch kein Dokument – der Vertrag entsteht mit dem Angebot bzw. der Bestätigung'),
TextEntry::make('contract_mail')->label('Zustellung')->state(fn (Booking $record): string => $record->confirmation_sent_at ? 'Bestätigung mit Vertrag gesendet am '.$record->confirmation_sent_at->format('d.m.Y, H:i') : ($record->confirmation_failed_at ? 'Versand fehlgeschlagen' : 'Noch nicht gesendet'))->columnSpanFull(),
]),
Section::make('Aufenthalt')
->columns(3)
->schema([