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:
1 parent
9005c12164
commit
3a728c3255
78 files changed
+4296
-1180
No files matched your search
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Enums\IntakeKind;
|
||||
use App\Enums\ProcessSetting;
|
||||
use App\Models\Channel;
|
||||
use App\Models\Property;
|
||||
use App\Models\Tenant;
|
||||
use App\Tenancy\TenantRunner;
|
||||
use Illuminate\Console\Attributes\Description;
|
||||
use Illuminate\Console\Attributes\Signature;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
#[Signature('process:settings-report')]
|
||||
#[Description('Show every landlord’s process defaults and all deviations of properties and channels (read only)')]
|
||||
class ProcessSettingsReport extends Command
|
||||
{
|
||||
public function handle(TenantRunner $runner): int
|
||||
{
|
||||
$runner->each(function (Tenant $tenant): void {
|
||||
$this->line('');
|
||||
$this->info($tenant->name);
|
||||
|
||||
$defaults = (array) ($tenant->process_defaults ?? []);
|
||||
foreach (ProcessSetting::cases() as $setting) {
|
||||
if (! $setting->isLandlordSetting()) {
|
||||
continue;
|
||||
}
|
||||
$value = $setting->normalize($defaults[$setting->value] ?? null);
|
||||
$this->line(' Standard · '.$setting->question().' '.$setting->describe($value ?? $setting->default()).($value === null ? ' (Grundeinstellung)' : ''));
|
||||
}
|
||||
|
||||
$rows = [];
|
||||
foreach (Property::query()->orderBy('name')->get() as $property) {
|
||||
foreach ((array) ($property->process_overrides ?? []) as $key => $value) {
|
||||
$setting = ProcessSetting::tryFrom((string) $key);
|
||||
if ($setting?->normalize($value) !== null) {
|
||||
$rows[] = ['Wohnung '.$property->name, $setting->question(), $setting->describe($setting->normalize($value))];
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach (Channel::query()->with('property')->orderBy('name')->get() as $channel) {
|
||||
foreach ((array) ($channel->process_overrides ?? []) as $intake => $values) {
|
||||
foreach ((array) $values as $key => $value) {
|
||||
$setting = ProcessSetting::tryFrom((string) $key);
|
||||
if ($setting?->normalize($value) !== null) {
|
||||
$rows[] = ['Portal '.$channel->name.' ('.$channel->property?->name.', '.(IntakeKind::tryFrom((string) $intake)?->getLabel() ?? $intake).')', $setting->question(), $setting->describe($setting->normalize($value))];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$rows === [] ? $this->line(' Keine Abweichungen.') : $this->table(['Wo', 'Einstellung', 'Wert'], $rows);
|
||||
});
|
||||
|
||||
return self::SUCCESS;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user