Vorgangskern und geführte Vorgangsbearbeitung (Pakete 1 und 2, Prozessarchitektur v0.10)

- Buchung ist der einheitliche Vorgang: Eingangsart, Vorgangsart A1–A6, eingefrorenes
  Abwicklungsprofil, gespeicherter Verlauf (booking_events); Gast, Personen und Beträge
  dürfen unbekannt sein, Platzhalter-Gäste werden migriert und nicht mehr angelegt
- Einstellungen in Ebenen: Vermieterstandard (So arbeite ich), Abweichung der Wohnung
  (Experte), Abweichung je Portal und Eingangsart; ersetzt booking_model als Steuergröße
- Ein Weg für extern verbindliche Buchungen (TakeOverExternalBooking) statt
  RecordPortalBooking und "Akte anlegen"; Portalpreis als belegte Gesamtposition
- Startseite "Zu erledigen", neue Vorgangsseite mit nächstem Schritt, Automatik-Schalter,
  "Beenden" mit Storno statt Statusumschaltung; Status von Hand nur im Expertenmodus
- Migration übernimmt bisheriges Verhalten unverändert (abweichende Wohnungswerte bleiben
  als Abweichung), Bericht: php artisan process:settings-report

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
LarsandClaude Opus 5.5 committed 2026-11-01 16:25:46 +01:00
1 parent 9005c12164
commit 3a728c3255
78 files changed
+4296 -1180

No files matched your search

@@ -2,13 +2,17 @@
namespace App\Filament\Resources\Properties\Schemas;
use App\Enums\AdminMode;
use App\Enums\CancellationMode;
use App\Enums\OfferMode;
use App\Enums\ProcessSetting;
use App\Filament\Forms\Components\EuroInput;
use App\Filament\Forms\ProcessSettingFields;
use App\Filament\Pages\HandlingSettings;
use App\ImageWorlds\ImageWorldRegistry;
use App\Models\ContractTemplate;
use App\Models\Site;
use Closure;
use App\Models\User;
use App\Support\Settings;
use Filament\Forms\Components\KeyValue;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\TextInput;
@@ -111,14 +115,6 @@ public static function configure(Schema $schema): Schema
->minValue(0)
->suffix('Tage vor Anreise')
->default(28),
TextInput::make('hold_hours')
->label('Vorreservierung halten')
->helperText('So lange bleibt ein angefragter Zeitraum ohne Ihre Bestätigung blockiert.')
->required()
->integer()
->minValue(1)
->suffix('Stunden')
->default(48),
Select::make('cancellation_mode')
->label('Stornierungslink in der Buchungsbestätigung')
->options(CancellationMode::class)
@@ -144,32 +140,17 @@ public static function configure(Schema $schema): Schema
->options(fn (): array => ContractTemplate::query()->orderBy('name')->orderBy('version')->get()->mapWithKeys(fn (ContractTemplate $template): array => [$template->id => $template->label()])->all())
->placeholder('Texte der Webseite')
->helperText('Wird bei neuen Angeboten verwendet, sofern das Portal keine eigene Vorlage hat.'),
TextInput::make('arrival_info_days_before')
->label('Anreise-E-Mail senden')
->helperText('Automatische Mail mit den letzten Hinweisen (Texte unter Texte › Aufenthalt).')
->required()
->integer()
->minValue(1)
->maxValue(14)
->suffix('Tage vor Anreise')
->default(3),
Toggle::make('pre_reservation_enabled')
->label('Anfrage blockiert den Kalender (Vorreservierung)')
->helperText('Aus: eine bloße Anfrage sperrt keinen Zeitraum. Dann ist kein automatisches Angebot möglich.')
->default(true)
->live(),
Select::make('offer_mode')
->label('Bearbeitung von Anfragen')
->options(OfferMode::class)
->default(OfferMode::Manual)
->required()
->helperText('Automatisch: das Angebot geht sofort an den Gast, wenn die Kalenderprüfung bestanden ist (Kalenderstand aktuell, bei Portalen mit Sofortbuchung unser Feed nachweislich abgerufen). Sonst entscheiden Sie von Hand. Unabhängig vom Testbetrieb der E-Mails.')
->rules([fn (Get $get): Closure => function (string $attribute, mixed $value, Closure $fail) use ($get): void {
if (($value === OfferMode::Automatic->value || $value === OfferMode::Automatic) && ! $get('pre_reservation_enabled')) {
$fail('Automatische Angebote brauchen die Vorreservierung: ohne Sperre im Kalender kann ein verbindlich annehmbares Angebot nicht sicher erteilt werden.');
}
}]),
]),
Section::make('Abweichende Abwicklung dieser Wohnung')
->description('Nur nötig, wenn diese Wohnung anders bearbeitet wird als in „So arbeite ich“ eingestellt. Leere Felder folgen Ihren Standardeinstellungen.')
->visible(fn (): bool => auth()->user() instanceof User && auth()->user()->adminMode() === AdminMode::Expert)
->collapsed()
->columns(2)
->schema(ProcessSettingFields::make('process_overrides.', HandlingSettings::settings(), function (ProcessSetting $setting): string {
$defaults = (array) (Settings::tenant()?->process_defaults ?? []);
return $setting->describe($setting->normalize($defaults[$setting->value] ?? null) ?? $setting->default());
})),
]);
}
}