- Offer workflow: "Angebot senden" in the admin (dates, guests, promo code, manual price adjustment, validity from the property's hold time, message, guest data for the contract) with live price; contract draft PDF; signed, versioned offer page for the guest to accept (acceptance record without IP) or decline; expiry job, landlord notifications, editable offer texts, wording on the website. - 2FA is mandatory for every admin account. - Privacy: complete anonymisation (notes, attribution, review names, offer messages), shorter periods for unbinding requests, portal mail excerpts and attribution (configurable proposals), iCal summary not stored, known e-mail no longer overwrites guest data, security headers, bearer tokens for automations, metadata stripped from photo originals, review link throttled. - Daily database backup (backup:database) and scripts/backup-pull.sh for the NAS. - Theme: brand mark in header/footer, favicon/touch icon, wave divider, icons, illustration as image placeholder; navy follows the text colour for dark appearances. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
71 lines
2.1 KiB
PHP
71 lines
2.1 KiB
PHP
<?php
|
|
|
|
namespace App\Enums;
|
|
|
|
use Filament\Support\Contracts\HasColor;
|
|
use Filament\Support\Contracts\HasLabel;
|
|
|
|
enum BookingStatus: string implements HasColor, HasLabel
|
|
{
|
|
/** Non-binding guest request; the dates are held until hold_expires_at. */
|
|
case Reserved = 'reserved';
|
|
|
|
/** The landlord sent an offer; the dates are held until hold_expires_at (= end of the offer's validity). */
|
|
case OfferSent = 'offer_sent';
|
|
|
|
/** Binding booking: the guest accepted the offer (or the landlord confirmed directly). */
|
|
case Confirmed = 'confirmed';
|
|
case DepositPaid = 'deposit_paid';
|
|
case Paid = 'paid';
|
|
case Completed = 'completed';
|
|
case Declined = 'declined';
|
|
case Expired = 'expired';
|
|
case Cancelled = 'cancelled';
|
|
|
|
public function getLabel(): string
|
|
{
|
|
return match ($this) {
|
|
self::Reserved => 'Anfrage (vorgemerkt)',
|
|
self::OfferSent => 'Angebot gesendet',
|
|
self::Confirmed => 'Bestätigt',
|
|
self::DepositPaid => 'Anzahlung erhalten',
|
|
self::Paid => 'Bezahlt',
|
|
self::Completed => 'Abgeschlossen',
|
|
self::Declined => 'Abgelehnt',
|
|
self::Expired => 'Abgelaufen',
|
|
self::Cancelled => 'Storniert',
|
|
};
|
|
}
|
|
|
|
public function getColor(): string
|
|
{
|
|
return match ($this) {
|
|
self::Reserved => 'warning',
|
|
self::OfferSent => 'primary',
|
|
self::Confirmed, self::DepositPaid => 'info',
|
|
self::Paid, self::Completed => 'success',
|
|
self::Declined, self::Expired, self::Cancelled => 'gray',
|
|
};
|
|
}
|
|
|
|
/**
|
|
* Statuses that occupy the calendar while their hold time (hold_expires_at) runs.
|
|
*
|
|
* @return list<self>
|
|
*/
|
|
public static function holding(): array
|
|
{
|
|
return [self::Reserved, self::OfferSent];
|
|
}
|
|
|
|
/**
|
|
* Statuses that occupy the calendar regardless of any hold time.
|
|
*
|
|
* @return list<self>
|
|
*/
|
|
public static function occupying(): array
|
|
{
|
|
return [self::Confirmed, self::DepositPaid, self::Paid, self::Completed];
|
|
}
|
|
}
|