- 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>
67 lines
2.9 KiB
PHP
67 lines
2.9 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\Bookings\Schemas;
|
|
|
|
use App\Models\Property;
|
|
use Filament\Forms\Components\DatePicker;
|
|
use Filament\Forms\Components\Select;
|
|
use Filament\Forms\Components\Textarea;
|
|
use Filament\Forms\Components\TextInput;
|
|
use Filament\Forms\Components\Toggle;
|
|
use Filament\Schemas\Components\Section;
|
|
use Filament\Schemas\Schema;
|
|
|
|
/**
|
|
* Manual entry of a booking received by phone or e-mail. The price is calculated automatically.
|
|
*/
|
|
class BookingForm
|
|
{
|
|
public static function configure(Schema $schema): Schema
|
|
{
|
|
return $schema
|
|
->components([
|
|
Section::make('Aufenthalt')
|
|
->columns(2)
|
|
->schema([
|
|
Select::make('property_id')
|
|
->label('Wohnung')
|
|
->options(fn (): array => Property::query()->orderBy('name')->pluck('name', 'id')->all())
|
|
->default(fn (): ?int => Property::query()->value('id'))
|
|
->required(),
|
|
TextInput::make('guests')
|
|
->label('Personen')
|
|
->integer()
|
|
->minValue(1)
|
|
->default(2)
|
|
->required(),
|
|
DatePicker::make('arrival')
|
|
->label('Anreise')
|
|
->required(),
|
|
DatePicker::make('departure')
|
|
->label('Abreise')
|
|
->after('arrival')
|
|
->required(),
|
|
TextInput::make('promo_code')
|
|
->label('Aktionscode'),
|
|
]),
|
|
Section::make('Gast')
|
|
->columns(2)
|
|
->schema([
|
|
TextInput::make('first_name')->label('Vorname')->required()->maxLength(255),
|
|
TextInput::make('last_name')->label('Nachname')->required()->maxLength(255),
|
|
TextInput::make('email')->label('E-Mail')->email()->required()->maxLength(255),
|
|
TextInput::make('phone')->label('Telefon')->tel()->maxLength(50),
|
|
TextInput::make('street')->label('Straße')->maxLength(255),
|
|
TextInput::make('postal_code')->label('PLZ')->maxLength(20),
|
|
TextInput::make('city')->label('Ort')->maxLength(255),
|
|
]),
|
|
Section::make('Abschluss')
|
|
->schema([
|
|
Textarea::make('internal_notes')->label('Interne Notiz'),
|
|
Toggle::make('confirm_immediately')->label('Sofort verbindlich bestätigen')->default(true),
|
|
Toggle::make('send_mails')->label('E-Mails an den Gast senden')->default(false),
|
|
]),
|
|
]);
|
|
}
|
|
}
|