Phase 2: Kalender, Anfrage, Vorreservierung & Sonderangebote

- Gäste, Buchungen (Status-Workflow), Sperrzeiten, Sonderangebote
- Vorreservierung mit Haltezeit je Wohnung; abgelaufene Holds geben den Kalender sofort frei, Cron setzt Status und benachrichtigt
- Sonderangebote/Sonderkonditionen: %, € pro Aufenthalt, Sonderpreis/Nacht, Gratis-Nächte; Bedingungen u. a. Saison, Vorlauf, Wochentag, Nächte, Aktionscode; bestes Einzel- vs. kombinierte Angebote
- Öffentliche Seite /buchen: Belegungskalender, Live-Preis, Anfrageformular (Honeypot, Rate-Limit)
- E-Mails: Angebot an Gast, Benachrichtigung Vermieter, Bestätigung, Absage, Ablauf
- Filament: Anfragen & Buchungen (bestätigen, ablehnen, verlängern, stornieren, Telefonbuchung), Gäste, Sperrzeiten, Sonderangebote
- Deutsche Validierungstexte

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Lars StommerandClaude Opus 5.5 committed 2026-10-22 09:43:12 +02:00
1 parent 2e9a391b37
commit 08b6582fa1
79 files changed
+6213 -76

No files matched your search

+53
View File
@@ -0,0 +1,53 @@
<?php
namespace App\Enums;
use Filament\Support\Contracts\HasColor;
use Filament\Support\Contracts\HasLabel;
enum BookingStatus: string implements HasColor, HasLabel
{
/** Guest request; the dates are held until hold_expires_at. */
case Reserved = 'reserved';
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 => 'Vorreserviert',
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::Confirmed, self::DepositPaid => 'info',
self::Paid, self::Completed => 'success',
self::Declined, self::Expired, self::Cancelled => 'gray',
};
}
/**
* 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];
}
}
+30
View File
@@ -0,0 +1,30 @@
<?php
namespace App\Enums;
use Filament\Support\Contracts\HasLabel;
enum DiscountType: string implements HasLabel
{
/** discount_value = percent of the accommodation price */
case Percent = 'percent';
/** discount_value = euro cents off the stay */
case AmountPerStay = 'amount_per_stay';
/** discount_value = special price per night in euro cents */
case NightlyRate = 'nightly_rate';
/** discount_value = number of cheapest nights that are free */
case FreeNights = 'free_nights';
public function getLabel(): string
{
return match ($this) {
self::Percent => 'Rabatt in %',
self::AmountPerStay => 'Rabatt in € pro Aufenthalt',
self::NightlyRate => 'Sonderpreis pro Nacht',
self::FreeNights => 'Gratis-Nächte',
};
}
}
+2 -1
View File
@@ -8,12 +8,13 @@ enum QuoteLineType: string
case ExtraGuest = 'extra_guest';
case Cleaning = 'cleaning';
case Extra = 'extra';
case Discount = 'discount';
/**
* Whether the line counts towards the rent on which the deposit is calculated.
*/
public function isRent(): bool
{
return in_array($this, [self::Accommodation, self::ExtraGuest], true);
return in_array($this, [self::Accommodation, self::ExtraGuest, self::Discount], true);
}
}