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

@@ -9,6 +9,8 @@
use App\Pricing\PriceCalculator;
use App\Pricing\QuoteException;
use App\Pricing\QuoteLine;
use App\Pricing\StayRequest;
use App\Support\Money;
use Carbon\CarbonImmutable;
use Closure;
use Filament\Actions\Action;
@@ -30,7 +32,6 @@
use Filament\Tables\Filters\SelectFilter;
use Filament\Tables\Table;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Support\Number;
class SeasonsRelationManager extends RelationManager
{
@@ -224,29 +225,30 @@ private function priceCalculatorAction(): Action
->integer()
->minValue(1)
->default(2),
TextInput::make('promo_code')
->label('Aktionscode (optional)'),
])
->action(function (array $data, PriceCalculator $calculator): void {
try {
$quote = $calculator->calculate(
$this->getOwnerRecord(),
$quote = $calculator->calculate($this->getOwnerRecord(), new StayRequest(
CarbonImmutable::parse($data['arrival']),
CarbonImmutable::parse($data['departure']),
(int) $data['guests'],
);
promoCode: $data['promo_code'] ?? null,
));
} catch (QuoteException $exception) {
Notification::make()->title('Nicht buchbar')->body($exception->getMessage())->danger()->send();
return;
}
$euro = fn (int $cents): string => Number::currency($cents / 100, 'EUR', 'de');
$lines = collect($quote->lines)
->map(fn (QuoteLine $line): string => e($line->label).': '.$euro($line->amount))
->push('Anzahlung: '.$euro($quote->deposit()).' · Rest: '.$euro($quote->balance()).' fällig am '.$quote->balanceDueOn->format('d.m.Y'))
->map(fn (QuoteLine $line): string => e($line->label).': '.Money::format($line->amount))
->push('Anzahlung: '.Money::format($quote->deposit()).' · Rest: '.Money::format($quote->balance()).' fällig am '.$quote->balanceDueOn->format('d.m.Y'))
->implode('<br>');
Notification::make()
->title('Gesamtpreis: '.$euro($quote->total()))
->title('Gesamtpreis: '.Money::format($quote->total()))
->body($lines)
->success()
->persistent()