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>
51 lines
1.8 KiB
PHP
51 lines
1.8 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';
|
||
|
||
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',
|
||
};
|
||
}
|
||
|
||
public function isPayment(): bool
|
||
{
|
||
return ! in_array($this, [self::CancellationRequest, self::CancellationFee], 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 => null,
|
||
};
|
||
}
|
||
}
|