- 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>
53 lines
2.0 KiB
PHP
53 lines
2.0 KiB
PHP
<?php
|
||
|
||
namespace App\Enums;
|
||
|
||
use App\Mail\PaymentReminder;
|
||
use Filament\Support\Contracts\HasLabel;
|
||
|
||
/**
|
||
* What the landlord has to do about a booking. Payment tasks are created by the daily run; nothing is
|
||
* sent to the guest until the landlord has checked the payment and chooses to send the mail.
|
||
*/
|
||
enum BookingTaskKind: string implements HasLabel
|
||
{
|
||
case DepositReminder = 'deposit_reminder';
|
||
case BalanceRequest = 'balance_request';
|
||
case BalanceReminder = 'balance_reminder';
|
||
case CancellationRequest = 'cancellation_request';
|
||
case CancellationFee = 'cancellation_fee';
|
||
case PortalCancellation = 'portal_cancellation';
|
||
|
||
public function getLabel(): string
|
||
{
|
||
return match ($this) {
|
||
self::DepositReminder => 'Anzahlung überfällig – anmahnen',
|
||
self::BalanceRequest => 'Restzahlung bald fällig – anfordern',
|
||
self::BalanceReminder => 'Restzahlung überfällig – anmahnen',
|
||
self::CancellationRequest => 'Stornierungswunsch des Gastes',
|
||
self::CancellationFee => 'Stornokosten prüfen und abrechnen',
|
||
self::PortalCancellation => 'Stornierung im Portal veranlassen bzw. prüfen',
|
||
};
|
||
}
|
||
|
||
public function isPayment(): bool
|
||
{
|
||
return ! in_array($this, [self::CancellationRequest, self::CancellationFee, self::PortalCancellation], true);
|
||
}
|
||
|
||
/**
|
||
* The mail kind (App\Mail\PaymentReminder) and the booking column that records its dispatch.
|
||
*
|
||
* @return array{0: string, 1: string}|null
|
||
*/
|
||
public function reminder(): ?array
|
||
{
|
||
return match ($this) {
|
||
self::DepositReminder => [PaymentReminder::DEPOSIT_OVERDUE, 'deposit_reminded_at'],
|
||
self::BalanceRequest => [PaymentReminder::BALANCE_REQUEST, 'balance_requested_at'],
|
||
self::BalanceReminder => [PaymentReminder::BALANCE_OVERDUE, 'balance_reminded_at'],
|
||
self::CancellationRequest, self::CancellationFee, self::PortalCancellation => null,
|
||
};
|
||
}
|
||
}
|