diff --git a/.env.example b/.env.example index 1e2077f..59308b3 100644 --- a/.env.example +++ b/.env.example @@ -63,3 +63,11 @@ AWS_BUCKET= AWS_USE_PATH_STYLE_ENDPOINT=false VITE_APP_NAME="${APP_NAME}" + +FEWO_OWNER_NAME="Brigitte Stommer" +FEWO_OWNER_EMAIL=fewo@stommer.de +FEWO_NOTIFICATION_EMAIL=fewo@stommer.de +FEWO_BANK_ACCOUNT_HOLDER= +FEWO_BANK_IBAN= +FEWO_BANK_BIC= +FEWO_BANK_NAME= diff --git a/AGENTS.md b/AGENTS.md index 5d717f4..ac11386 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -8,6 +8,10 @@ # Ferienwohnung Stommer - Season periods are half-open: a night belongs to a season when `starts_on <= night < ends_on`. - Pricing lives in `app/Pricing` (`PriceCalculator` → `PriceQuote`); guest-facing errors are `QuoteException` messages. - Portals must be integrated through a pluggable channel-connector system (see concept §7), never hard-coded. +- Bookings/blocks use nights: `arrival <= night < departure`; same-day changeover is allowed. Reservations with an elapsed hold never occupy the calendar (scope `Booking::occupying()`), cron only updates status. +- Business operations live in `app/Actions` (CreateReservation, ConfirmBooking, …); Filament pages and Livewire components call them instead of changing bookings directly. +- Special offers are evaluated automatically by `PriceCalculator`; discounts are `QuoteLineType::Discount` lines with negative amounts. +- Vite fonts plugin is removed on purpose (corporate proxy breaks remote font downloads, and fonts must be self-hosted for GDPR). - PHP/Composer on this machine: winget package dir `%LOCALAPPDATA%\Microsoft\WinGet\Packages\PHP.PHP.8.4_*` (Composer as `composer\composer.phar` there). - Git remote: Gitea `https://gitea.stommer.de/Lars/fewo-stommer.git`, branch `main`. diff --git a/CLAUDE.md b/CLAUDE.md index 5d717f4..ac11386 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -8,6 +8,10 @@ # Ferienwohnung Stommer - Season periods are half-open: a night belongs to a season when `starts_on <= night < ends_on`. - Pricing lives in `app/Pricing` (`PriceCalculator` → `PriceQuote`); guest-facing errors are `QuoteException` messages. - Portals must be integrated through a pluggable channel-connector system (see concept §7), never hard-coded. +- Bookings/blocks use nights: `arrival <= night < departure`; same-day changeover is allowed. Reservations with an elapsed hold never occupy the calendar (scope `Booking::occupying()`), cron only updates status. +- Business operations live in `app/Actions` (CreateReservation, ConfirmBooking, …); Filament pages and Livewire components call them instead of changing bookings directly. +- Special offers are evaluated automatically by `PriceCalculator`; discounts are `QuoteLineType::Discount` lines with negative amounts. +- Vite fonts plugin is removed on purpose (corporate proxy breaks remote font downloads, and fonts must be self-hosted for GDPR). - PHP/Composer on this machine: winget package dir `%LOCALAPPDATA%\Microsoft\WinGet\Packages\PHP.PHP.8.4_*` (Composer as `composer\composer.phar` there). - Git remote: Gitea `https://gitea.stommer.de/Lars/fewo-stommer.git`, branch `main`. diff --git a/app/Actions/ConfirmBooking.php b/app/Actions/ConfirmBooking.php new file mode 100644 index 0000000..9d8ee7e --- /dev/null +++ b/app/Actions/ConfirmBooking.php @@ -0,0 +1,45 @@ +status, [BookingStatus::Reserved, BookingStatus::Expired], true)) { + throw ReservationException::invalidTransition($booking->status->getLabel(), 'bestätigt'); + } + + DB::transaction(function () use ($booking): void { + if (! $this->availability->isAvailable($booking->property, $booking->arrival, $booking->departure, ignore: $booking)) { + throw ReservationException::notAvailable(); + } + + $booking->update([ + 'status' => BookingStatus::Confirmed, + 'hold_expires_at' => null, + 'confirmed_at' => now(), + ]); + }); + + if ($notifyGuest) { + Mail::to($booking->guest->email, $booking->guest->full_name)->send(new BookingConfirmed($booking)); + } + } +} diff --git a/app/Actions/CreateReservation.php b/app/Actions/CreateReservation.php new file mode 100644 index 0000000..3f78019 --- /dev/null +++ b/app/Actions/CreateReservation.php @@ -0,0 +1,88 @@ +getKey())->lockForUpdate()->first(); + + if (! $this->availability->isAvailable($property, $stay->arrival, $stay->departure)) { + throw ReservationException::notAvailable(); + } + + $quote = $this->calculator->calculate($property, $stay); + + $guest = Guest::firstOrNew(['email' => mb_strtolower($guestData['email'])]); + $guest->fill($guestData)->fill(['email' => mb_strtolower($guestData['email'])])->save(); + + return $property->bookings()->create([ + 'guest_id' => $guest->id, + 'status' => BookingStatus::Reserved, + 'source' => $source, + 'arrival' => $stay->arrival->toDateString(), + 'departure' => $stay->departure->toDateString(), + 'guests' => $stay->guests, + 'extras' => array_filter($stay->extras), + 'promo_code' => $quote->promoCodeApplied ? $stay->promoCode : null, + 'quote' => $quote->toArray(), + 'total' => $quote->total(), + 'deposit' => $quote->deposit(), + 'balance_due_on' => $quote->balanceDueOn->toDateString(), + 'hold_expires_at' => now()->addHours($property->hold_hours), + 'message' => $message, + ]); + }); + + if ($sendMails) { + $this->sendMails($booking); + } + + return $booking; + } + + /** + * A failing mail server must not lose the reservation; failures are reported and visible in the log. + */ + private function sendMails(Booking $booking): void + { + try { + Mail::to($booking->guest->email, $booking->guest->full_name)->send(new ReservationReceived($booking)); + Mail::to(config('fewo.notification_email'))->send(new NewReservation($booking)); + } catch (Throwable $exception) { + report($exception); + } + } +} diff --git a/app/Actions/DeclineBooking.php b/app/Actions/DeclineBooking.php new file mode 100644 index 0000000..8b2f42d --- /dev/null +++ b/app/Actions/DeclineBooking.php @@ -0,0 +1,31 @@ +status, [BookingStatus::Reserved, BookingStatus::Expired], true)) { + throw ReservationException::invalidTransition($booking->status->getLabel(), 'abgelehnt'); + } + + $booking->update([ + 'status' => BookingStatus::Declined, + 'hold_expires_at' => null, + ]); + + if ($notifyGuest) { + Mail::to($booking->guest->email, $booking->guest->full_name)->send(new BookingDeclined($booking)); + } + } +} diff --git a/app/Actions/ExpireReservations.php b/app/Actions/ExpireReservations.php new file mode 100644 index 0000000..98c0541 --- /dev/null +++ b/app/Actions/ExpireReservations.php @@ -0,0 +1,32 @@ +where('status', BookingStatus::Reserved) + ->where('hold_expires_at', '<=', now()) + ->with(['guest', 'property']) + ->get(); + + foreach ($expired as $booking) { + $booking->update(['status' => BookingStatus::Expired]); + + Mail::to(config('fewo.notification_email'))->send(new ReservationExpired($booking)); + } + + return $expired->count(); + } +} diff --git a/app/Availability/AvailabilityChecker.php b/app/Availability/AvailabilityChecker.php new file mode 100644 index 0000000..72163f3 --- /dev/null +++ b/app/Availability/AvailabilityChecker.php @@ -0,0 +1,48 @@ +bookings() + ->occupying() + ->overlapping($from, $until) + ->when($ignore, fn ($query) => $query->whereKeyNot($ignore->getKey())) + ->exists(); + + return ! $bookingConflict && ! $property->blockedPeriods()->overlapping($from, $until)->exists(); + } + + /** + * Occupied nights within [$from, $until) as a set of 'Y-m-d' strings. + * + * @return array + */ + public function occupiedNights(Property $property, CarbonImmutable $from, CarbonImmutable $until): array + { + $periods = $property->bookings()->occupying()->overlapping($from, $until)->get(['arrival', 'departure']) + ->map(fn (Booking $booking): array => [$booking->arrival, $booking->departure]) + ->concat($property->blockedPeriods()->overlapping($from, $until)->get(['starts_on', 'ends_on']) + ->map(fn (BlockedPeriod $period): array => [$period->starts_on, $period->ends_on])); + + $nights = []; + foreach ($periods as [$start, $end]) { + for ($night = $start->max($from); $night->lessThan($end) && $night->lessThan($until); $night = $night->addDay()) { + $nights[$night->toDateString()] = true; + } + } + + return $nights; + } +} diff --git a/app/Console/Commands/ExpireReservationHolds.php b/app/Console/Commands/ExpireReservationHolds.php new file mode 100644 index 0000000..26dd1ba --- /dev/null +++ b/app/Console/Commands/ExpireReservationHolds.php @@ -0,0 +1,25 @@ +handle(); + + $this->info("{$count} Vormerkung(en) abgelaufen."); + + return self::SUCCESS; + } +} diff --git a/app/Enums/BookingStatus.php b/app/Enums/BookingStatus.php new file mode 100644 index 0000000..e7d27f8 --- /dev/null +++ b/app/Enums/BookingStatus.php @@ -0,0 +1,53 @@ + '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 + */ + public static function occupying(): array + { + return [self::Confirmed, self::DepositPaid, self::Paid, self::Completed]; + } +} diff --git a/app/Enums/DiscountType.php b/app/Enums/DiscountType.php new file mode 100644 index 0000000..39b49e6 --- /dev/null +++ b/app/Enums/DiscountType.php @@ -0,0 +1,30 @@ + 'Rabatt in %', + self::AmountPerStay => 'Rabatt in € pro Aufenthalt', + self::NightlyRate => 'Sonderpreis pro Nacht', + self::FreeNights => 'Gratis-Nächte', + }; + } +} diff --git a/app/Enums/QuoteLineType.php b/app/Enums/QuoteLineType.php index e02244e..37f76da 100644 --- a/app/Enums/QuoteLineType.php +++ b/app/Enums/QuoteLineType.php @@ -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); } } diff --git a/app/Exceptions/ReservationException.php b/app/Exceptions/ReservationException.php new file mode 100644 index 0000000..bbae688 --- /dev/null +++ b/app/Exceptions/ReservationException.php @@ -0,0 +1,21 @@ +where('status', BookingStatus::Reserved)->count(); + + return $open > 0 ? (string) $open : null; + } + + public static function getNavigationBadgeColor(): string + { + return 'warning'; + } + + public static function getPages(): array + { + return [ + 'index' => ListBookings::route('/'), + 'create' => CreateBooking::route('/create'), + 'view' => ViewBooking::route('/{record}'), + ]; + } +} diff --git a/app/Filament/Resources/Bookings/Pages/CreateBooking.php b/app/Filament/Resources/Bookings/Pages/CreateBooking.php new file mode 100644 index 0000000..3bdc65f --- /dev/null +++ b/app/Filament/Resources/Bookings/Pages/CreateBooking.php @@ -0,0 +1,61 @@ + $data + */ + protected function handleRecordCreation(array $data): Model + { + try { + $booking = app(CreateReservation::class)->handle( + Property::findOrFail($data['property_id']), + new StayRequest( + CarbonImmutable::parse($data['arrival']), + CarbonImmutable::parse($data['departure']), + (int) $data['guests'], + promoCode: $data['promo_code'] ?: null, + ), + Arr::only($data, ['first_name', 'last_name', 'email', 'phone', 'street', 'postal_code', 'city']), + source: 'manual', + sendMails: $data['send_mails'], + ); + + if ($data['confirm_immediately']) { + app(ConfirmBooking::class)->handle($booking, notifyGuest: $data['send_mails']); + } + } catch (QuoteException|ReservationException $exception) { + Notification::make()->title('Buchung nicht möglich')->body($exception->getMessage())->danger()->send(); + + $this->halt(); + } + + $booking->update(['internal_notes' => $data['internal_notes'] ?: null]); + + return $booking; + } + + protected function getRedirectUrl(): string + { + return BookingResource::getUrl('view', ['record' => $this->getRecord()]); + } +} diff --git a/app/Filament/Resources/Bookings/Pages/ListBookings.php b/app/Filament/Resources/Bookings/Pages/ListBookings.php new file mode 100644 index 0000000..95ca200 --- /dev/null +++ b/app/Filament/Resources/Bookings/Pages/ListBookings.php @@ -0,0 +1,19 @@ +record->reference} · {$this->record->guest->full_name}"; + } + + protected function getHeaderActions(): array + { + return [ + Action::make('confirm') + ->label('Bestätigen') + ->icon(Heroicon::OutlinedCheckCircle) + ->color('success') + ->visible(fn (): bool => in_array($this->record->status, [BookingStatus::Reserved, BookingStatus::Expired], true)) + ->requiresConfirmation() + ->modalHeading('Buchung bestätigen') + ->modalDescription('Die Buchung wird verbindlich und der Zeitraum dauerhaft belegt.') + ->schema([ + Toggle::make('notify')->label('Buchungsbestätigung an den Gast senden')->default(true), + ]) + ->action(fn (array $data, ConfirmBooking $confirm) => $this->runWorkflow( + fn () => $confirm->handle($this->record, $data['notify']), + 'Buchung bestätigt', + )), + Action::make('decline') + ->label('Ablehnen') + ->icon(Heroicon::OutlinedXCircle) + ->color('danger') + ->visible(fn (): bool => in_array($this->record->status, [BookingStatus::Reserved, BookingStatus::Expired], true)) + ->requiresConfirmation() + ->modalHeading('Anfrage ablehnen') + ->schema([ + Toggle::make('notify')->label('Absage an den Gast senden')->default(true), + ]) + ->action(fn (array $data, DeclineBooking $decline) => $this->runWorkflow( + fn () => $decline->handle($this->record, $data['notify']), + 'Anfrage abgelehnt', + )), + Action::make('extendHold') + ->label('Vormerkung verlängern') + ->icon(Heroicon::OutlinedClock) + ->color('gray') + ->visible(fn (): bool => $this->record->status === BookingStatus::Reserved) + ->schema([ + TextInput::make('hours')->label('Um')->integer()->minValue(1)->default(24)->suffix('Stunden')->required(), + ]) + ->action(function (array $data): void { + $from = $this->record->hold_expires_at?->isFuture() ? $this->record->hold_expires_at : now()->toImmutable(); + $this->record->update(['hold_expires_at' => $from->addHours((int) $data['hours'])]); + + Notification::make()->title('Vorgemerkt bis '.$this->record->hold_expires_at->format('d.m.Y, H:i'))->success()->send(); + }), + ActionGroup::make([ + Action::make('notes') + ->label('Interne Notiz bearbeiten') + ->icon(Heroicon::OutlinedPencilSquare) + ->fillForm(fn (): array => ['internal_notes' => $this->record->internal_notes]) + ->schema([ + Textarea::make('internal_notes')->label('Interne Notizen')->rows(6), + ]) + ->action(fn (array $data) => $this->record->update($data)), + Action::make('cancel') + ->label('Stornieren') + ->icon(Heroicon::OutlinedNoSymbol) + ->color('danger') + ->visible(fn (): bool => in_array($this->record->status, BookingStatus::occupying(), true)) + ->requiresConfirmation() + ->modalDescription('Der Zeitraum wird wieder freigegeben. Der Gast wird nicht automatisch benachrichtigt.') + ->action(function (): void { + $this->record->update(['status' => BookingStatus::Cancelled, 'cancelled_at' => now()]); + + Notification::make()->title('Buchung storniert')->success()->send(); + }), + ]), + ]; + } + + private function runWorkflow(callable $workflow, string $successTitle): void + { + try { + $workflow(); + } catch (ReservationException $exception) { + Notification::make()->title('Nicht möglich')->body($exception->getMessage())->danger()->send(); + + return; + } + + Notification::make()->title($successTitle)->success()->send(); + } +} diff --git a/app/Filament/Resources/Bookings/Schemas/BookingForm.php b/app/Filament/Resources/Bookings/Schemas/BookingForm.php new file mode 100644 index 0000000..ecbb9f5 --- /dev/null +++ b/app/Filament/Resources/Bookings/Schemas/BookingForm.php @@ -0,0 +1,66 @@ +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), + ]), + ]); + } +} diff --git a/app/Filament/Resources/Bookings/Schemas/BookingInfolist.php b/app/Filament/Resources/Bookings/Schemas/BookingInfolist.php new file mode 100644 index 0000000..b86a0d9 --- /dev/null +++ b/app/Filament/Resources/Bookings/Schemas/BookingInfolist.php @@ -0,0 +1,87 @@ +columns(3) + ->components([ + Grid::make(1) + ->columnSpan(2) + ->schema([ + Section::make('Aufenthalt') + ->columns(3) + ->schema([ + TextEntry::make('property.name')->label('Wohnung'), + TextEntry::make('arrival')->label('Anreise')->date('l, d.m.Y'), + TextEntry::make('departure')->label('Abreise')->date('l, d.m.Y'), + TextEntry::make('nights')->label('Nächte')->state(fn (Booking $record): int => $record->nights()), + TextEntry::make('guests')->label('Personen'), + TextEntry::make('promo_code')->label('Aktionscode')->placeholder('–'), + ]), + Section::make('Preis') + ->schema([ + RepeatableEntry::make('quote.lines') + ->hiddenLabel() + ->table([ + TableColumn::make('Leistung'), + TableColumn::make('Betrag')->alignEnd(), + ]) + ->schema([ + TextEntry::make('label'), + TextEntry::make('amount')->formatStateUsing(fn (int $state): string => Money::format($state))->alignEnd(), + ]), + Grid::make(4)->schema([ + TextEntry::make('total')->label('Gesamtpreis')->money('EUR', divideBy: 100, locale: 'de')->weight('bold'), + TextEntry::make('deposit')->label('Anzahlung')->money('EUR', divideBy: 100, locale: 'de'), + TextEntry::make('balance')->label('Restzahlung')->state(fn (Booking $record): string => Money::format($record->total - $record->deposit)), + TextEntry::make('balance_due_on')->label('Rest fällig am')->date('d.m.Y'), + ]), + ]), + Section::make('Nachricht des Gastes') + ->visible(fn (Booking $record): bool => filled($record->message)) + ->schema([ + TextEntry::make('message')->hiddenLabel(), + ]), + ]), + Grid::make(1) + ->columnSpan(1) + ->schema([ + Section::make('Status') + ->schema([ + TextEntry::make('status')->label('Status')->badge(), + TextEntry::make('hold_expires_at')->label('Vorgemerkt bis')->dateTime('d.m.Y, H:i')->visible(fn (Booking $record): bool => $record->hold_expires_at !== null), + TextEntry::make('confirmed_at')->label('Bestätigt am')->dateTime('d.m.Y, H:i')->visible(fn (Booking $record): bool => $record->confirmed_at !== null), + TextEntry::make('created_at')->label('Eingegangen')->dateTime('d.m.Y, H:i'), + TextEntry::make('source')->label('Quelle'), + ]), + Section::make('Gast') + ->schema([ + TextEntry::make('guest.full_name')->label('Name'), + TextEntry::make('guest.email')->label('E-Mail')->copyable(), + TextEntry::make('guest.phone')->label('Telefon')->placeholder('–'), + TextEntry::make('guest_address') + ->label('Adresse') + ->state(fn (Booking $record): ?string => collect([$record->guest->street, trim("{$record->guest->postal_code} {$record->guest->city}")])->filter()->implode(', ') ?: null) + ->placeholder('–'), + ]), + Section::make('Interne Notizen') + ->schema([ + TextEntry::make('internal_notes')->hiddenLabel()->placeholder('Keine Notizen'), + ]), + ]), + ]); + } +} diff --git a/app/Filament/Resources/Bookings/Tables/BookingsTable.php b/app/Filament/Resources/Bookings/Tables/BookingsTable.php new file mode 100644 index 0000000..ce1a2c0 --- /dev/null +++ b/app/Filament/Resources/Bookings/Tables/BookingsTable.php @@ -0,0 +1,71 @@ +modifyQueryUsing(fn (Builder $query): Builder => $query->with(['guest', 'property'])) + ->defaultSort('created_at', 'desc') + ->columns([ + TextColumn::make('reference') + ->label('Nr.') + ->searchable(), + TextColumn::make('status') + ->label('Status') + ->badge() + ->description(fn (Booking $record): ?string => $record->isHoldActive() ? 'bis '.$record->hold_expires_at->format('d.m. H:i') : null), + TextColumn::make('guest.last_name') + ->label('Gast') + ->formatStateUsing(fn (Booking $record): string => $record->guest->full_name) + ->description(fn (Booking $record): string => $record->guest->email) + ->searchable(['first_name', 'last_name', 'email']), + TextColumn::make('property.name') + ->label('Wohnung') + ->toggleable(isToggledHiddenByDefault: true), + TextColumn::make('arrival') + ->label('Anreise') + ->date('D, d.m.Y') + ->sortable(), + TextColumn::make('departure') + ->label('Abreise') + ->date('D, d.m.Y') + ->description(fn (Booking $record): string => $record->nights().' Nächte'), + TextColumn::make('guests') + ->label('Pers.'), + TextColumn::make('total') + ->label('Gesamt') + ->money('EUR', divideBy: 100, locale: 'de'), + TextColumn::make('source') + ->label('Quelle') + ->toggleable(isToggledHiddenByDefault: true), + TextColumn::make('created_at') + ->label('Eingang') + ->since() + ->sortable(), + ]) + ->filters([ + SelectFilter::make('status') + ->label('Status') + ->options(BookingStatus::class) + ->multiple(), + Filter::make('upcoming') + ->label('Nur kommende Aufenthalte') + ->query(fn (Builder $query): Builder => $query->whereDate('departure', '>=', today())), + ]) + ->recordActions([ + ViewAction::make(), + ]); + } +} diff --git a/app/Filament/Resources/Guests/GuestResource.php b/app/Filament/Resources/Guests/GuestResource.php new file mode 100644 index 0000000..911b51a --- /dev/null +++ b/app/Filament/Resources/Guests/GuestResource.php @@ -0,0 +1,56 @@ + ListGuests::route('/'), + 'create' => CreateGuest::route('/create'), + 'edit' => EditGuest::route('/{record}/edit'), + ]; + } +} diff --git a/app/Filament/Resources/Guests/Pages/CreateGuest.php b/app/Filament/Resources/Guests/Pages/CreateGuest.php new file mode 100644 index 0000000..c447776 --- /dev/null +++ b/app/Filament/Resources/Guests/Pages/CreateGuest.php @@ -0,0 +1,11 @@ +columns(2) + ->components([ + 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), + Select::make('country') + ->label('Land') + ->options(['DE' => 'Deutschland', 'AT' => 'Österreich', 'CH' => 'Schweiz', 'NL' => 'Niederlande', 'DK' => 'Dänemark', 'PL' => 'Polen']) + ->default('DE') + ->required(), + Textarea::make('notes')->label('Notizen')->columnSpanFull(), + ]); + } +} diff --git a/app/Filament/Resources/Guests/Tables/GuestsTable.php b/app/Filament/Resources/Guests/Tables/GuestsTable.php new file mode 100644 index 0000000..e7bffd8 --- /dev/null +++ b/app/Filament/Resources/Guests/Tables/GuestsTable.php @@ -0,0 +1,32 @@ +defaultSort('last_name') + ->columns([ + TextColumn::make('last_name') + ->label('Name') + ->formatStateUsing(fn (Guest $record): string => "{$record->last_name}, {$record->first_name}") + ->searchable(['first_name', 'last_name']) + ->sortable(), + TextColumn::make('email')->label('E-Mail')->searchable(), + TextColumn::make('phone')->label('Telefon')->placeholder('–'), + TextColumn::make('city')->label('Ort')->placeholder('–'), + TextColumn::make('bookings_count')->label('Buchungen')->counts('bookings')->sortable(), + TextColumn::make('created_at')->label('Seit')->date('m/Y')->sortable(), + ]) + ->recordActions([ + EditAction::make(), + ]); + } +} diff --git a/app/Filament/Resources/Properties/PropertyResource.php b/app/Filament/Resources/Properties/PropertyResource.php index 756d868..cfb838a 100644 --- a/app/Filament/Resources/Properties/PropertyResource.php +++ b/app/Filament/Resources/Properties/PropertyResource.php @@ -5,8 +5,10 @@ use App\Filament\Resources\Properties\Pages\CreateProperty; use App\Filament\Resources\Properties\Pages\EditProperty; use App\Filament\Resources\Properties\Pages\ListProperties; +use App\Filament\Resources\Properties\RelationManagers\BlockedPeriodsRelationManager; use App\Filament\Resources\Properties\RelationManagers\ExtrasRelationManager; use App\Filament\Resources\Properties\RelationManagers\SeasonsRelationManager; +use App\Filament\Resources\Properties\RelationManagers\SpecialOffersRelationManager; use App\Filament\Resources\Properties\Schemas\PropertyForm; use App\Filament\Resources\Properties\Tables\PropertiesTable; use App\Models\Property; @@ -42,7 +44,9 @@ public static function getRelations(): array { return [ SeasonsRelationManager::class, + SpecialOffersRelationManager::class, ExtrasRelationManager::class, + BlockedPeriodsRelationManager::class, ]; } diff --git a/app/Filament/Resources/Properties/RelationManagers/BlockedPeriodsRelationManager.php b/app/Filament/Resources/Properties/RelationManagers/BlockedPeriodsRelationManager.php new file mode 100644 index 0000000..c3d98c7 --- /dev/null +++ b/app/Filament/Resources/Properties/RelationManagers/BlockedPeriodsRelationManager.php @@ -0,0 +1,74 @@ +columns(2) + ->components([ + DatePicker::make('starts_on') + ->label('Von (erste gesperrte Nacht)') + ->required(), + DatePicker::make('ends_on') + ->label('Bis (erster freier Tag)') + ->after('starts_on') + ->required(), + TextInput::make('reason') + ->label('Grund') + ->placeholder('z. B. Eigennutzung, Renovierung') + ->maxLength(255) + ->columnSpanFull(), + ]); + } + + public function table(Table $table): Table + { + return $table + ->recordTitleAttribute('reason') + ->description('Manuelle Sperren (z. B. Eigennutzung). Belegungen aus Portalen erscheinen hier später automatisch.') + ->defaultSort('starts_on') + ->columns([ + TextColumn::make('starts_on')->label('Von')->date('D, d.m.Y'), + TextColumn::make('ends_on')->label('Bis')->date('D, d.m.Y'), + TextColumn::make('reason')->label('Grund')->placeholder('–'), + TextColumn::make('source')->label('Quelle'), + ]) + ->filters([ + Filter::make('upcoming') + ->label('Nur kommende') + ->default() + ->query(fn (Builder $query): Builder => $query->whereDate('ends_on', '>=', today())), + ]) + ->headerActions([ + CreateAction::make(), + ]) + ->recordActions([ + EditAction::make()->visible(fn (BlockedPeriod $record): bool => $record->source === 'manual'), + DeleteAction::make()->visible(fn (BlockedPeriod $record): bool => $record->source === 'manual'), + ]); + } +} diff --git a/app/Filament/Resources/Properties/RelationManagers/SeasonsRelationManager.php b/app/Filament/Resources/Properties/RelationManagers/SeasonsRelationManager.php index e19ff8f..841bfc0 100644 --- a/app/Filament/Resources/Properties/RelationManagers/SeasonsRelationManager.php +++ b/app/Filament/Resources/Properties/RelationManagers/SeasonsRelationManager.php @@ -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('
'); Notification::make() - ->title('Gesamtpreis: '.$euro($quote->total())) + ->title('Gesamtpreis: '.Money::format($quote->total())) ->body($lines) ->success() ->persistent() diff --git a/app/Filament/Resources/Properties/RelationManagers/SpecialOffersRelationManager.php b/app/Filament/Resources/Properties/RelationManagers/SpecialOffersRelationManager.php new file mode 100644 index 0000000..a0b3325 --- /dev/null +++ b/app/Filament/Resources/Properties/RelationManagers/SpecialOffersRelationManager.php @@ -0,0 +1,164 @@ +components([ + Section::make('Angebot') + ->columns(2) + ->schema([ + TextInput::make('name') + ->label('Bezeichnung') + ->helperText('Erscheint so in Angebot und Rechnung, z. B. „Last Minute“ oder „Special Weekend“.') + ->required() + ->maxLength(255), + TextInput::make('public_description') + ->label('Kurzbeschreibung für die Webseite') + ->maxLength(255), + Select::make('discount_type') + ->label('Art') + ->options(DiscountType::class) + ->default(DiscountType::Percent) + ->live() + ->required(), + TextInput::make('discount_value') + ->label(fn (Get $get): string => match ($this->discountType($get)) { + DiscountType::Percent => 'Rabatt', + DiscountType::AmountPerStay => 'Rabatt pro Aufenthalt', + DiscountType::NightlyRate => 'Sonderpreis pro Nacht', + DiscountType::FreeNights => 'Anzahl Gratis-Nächte', + }) + ->suffix(fn (Get $get): string => match ($this->discountType($get)) { + DiscountType::Percent => '%', + DiscountType::FreeNights => 'Nächte', + default => '€', + }) + ->helperText(fn (Get $get): ?string => $this->discountType($get) === DiscountType::FreeNights ? 'Die günstigsten Nächte des Aufenthalts sind gratis.' : null) + ->numeric() + ->minValue(0) + ->required() + ->formatStateUsing(fn (?int $state, ?SpecialOffer $record): int|string|null => $state !== null && $this->isMoney($record?->discount_type) ? number_format($state / 100, 2, '.', '') : $state) + ->dehydrateStateUsing(fn (string|int|float|null $state, Get $get): int => $this->isMoney($this->discountType($get)) ? (int) round((float) $state * 100) : (int) $state), + Toggle::make('is_active')->label('Aktiv')->default(true), + Toggle::make('is_public')->label('Auf der Webseite bewerben')->default(true), + Toggle::make('is_combinable') + ->label('Mit anderen kombinierbaren Angeboten kombinierbar') + ->helperText('Sonst erhält der Gast automatisch das für ihn beste Einzelangebot.') + ->columnSpanFull(), + ]), + Section::make('Bedingungen') + ->description('Leere Felder bedeuten: keine Einschränkung.') + ->columns(2) + ->schema([ + TextInput::make('code') + ->label('Aktionscode (Sonderkondition)') + ->helperText('Nur mit diesem Code gültig, z. B. für Stammgäste. Leer = gilt automatisch.') + ->maxLength(50) + ->columnSpanFull(), + CheckboxList::make('season_names') + ->label('Nur bei Anreise in Saison') + ->options(fn (): array => $this->getOwnerRecord()->seasons()->reorder('name')->distinct()->pluck('name', 'name')->all()) + ->columns(3) + ->columnSpanFull(), + TextInput::make('max_days_before_arrival') + ->label('Buchung höchstens … Tage vor Anreise') + ->helperText('Last Minute, z. B. 14') + ->integer() + ->minValue(0), + TextInput::make('min_days_before_arrival') + ->label('Buchung mindestens … Tage vor Anreise') + ->helperText('Frühbucher, z. B. 180') + ->integer() + ->minValue(0), + TextInput::make('min_nights')->label('Mindestens Nächte')->integer()->minValue(1), + TextInput::make('max_nights')->label('Höchstens Nächte')->integer()->minValue(1), + CheckboxList::make('arrival_weekdays') + ->label('Anreise nur am') + ->options([1 => 'Mo', 2 => 'Di', 3 => 'Mi', 4 => 'Do', 5 => 'Fr', 6 => 'Sa', 7 => 'So']) + ->columns(7) + ->columnSpanFull(), + DatePicker::make('stay_from')->label('Aufenthalt frühestens ab'), + DatePicker::make('stay_until')->label('Abreise spätestens am'), + DateTimePicker::make('bookable_from')->label('Buchbar ab')->seconds(false), + DateTimePicker::make('bookable_until')->label('Buchbar bis')->seconds(false), + ]), + ]); + } + + public function table(Table $table): Table + { + return $table + ->recordTitleAttribute('name') + ->description('Sonderangebote werden bei jeder Preisberechnung automatisch geprüft und angewendet.') + ->columns([ + TextColumn::make('name') + ->label('Angebot') + ->description(fn (SpecialOffer $record): ?string => $record->public_description), + TextColumn::make('discount') + ->label('Vorteil') + ->state(fn (SpecialOffer $record): string => match ($record->discount_type) { + DiscountType::Percent => "−{$record->discount_value} %", + DiscountType::AmountPerStay => '−'.Money::format($record->discount_value), + DiscountType::NightlyRate => Money::format($record->discount_value).' / Nacht', + DiscountType::FreeNights => "{$record->discount_value} Nacht/Nächte gratis", + }), + TextColumn::make('code')->label('Code')->placeholder('automatisch')->badge(), + TextColumn::make('season_names')->label('Saisons')->badge()->placeholder('alle'), + IconColumn::make('is_combinable')->label('Kombinierbar')->boolean(), + IconColumn::make('is_active')->label('Aktiv')->boolean(), + ]) + ->headerActions([ + CreateAction::make(), + ]) + ->recordActions([ + EditAction::make(), + ReplicateAction::make()->label('Duplizieren')->schema(fn (Schema $schema): Schema => $this->form($schema)), + DeleteAction::make(), + ]); + } + + private function discountType(Get $get): DiscountType + { + $type = $get('discount_type'); + + return $type instanceof DiscountType ? $type : (DiscountType::tryFrom((string) $type) ?? DiscountType::Percent); + } + + private function isMoney(?DiscountType $type): bool + { + return in_array($type, [DiscountType::AmountPerStay, DiscountType::NightlyRate], true); + } +} diff --git a/app/Filament/Resources/Properties/Schemas/PropertyForm.php b/app/Filament/Resources/Properties/Schemas/PropertyForm.php index ab16d54..cab3e13 100644 --- a/app/Filament/Resources/Properties/Schemas/PropertyForm.php +++ b/app/Filament/Resources/Properties/Schemas/PropertyForm.php @@ -93,6 +93,14 @@ public static function configure(Schema $schema): Schema ->minValue(0) ->suffix('Tage vor Anreise') ->default(28), + TextInput::make('hold_hours') + ->label('Vorreservierung halten') + ->helperText('So lange bleibt ein angefragter Zeitraum ohne Ihre Bestätigung blockiert.') + ->required() + ->integer() + ->minValue(1) + ->suffix('Stunden') + ->default(48), ]), ]); } diff --git a/app/Livewire/BookingRequest.php b/app/Livewire/BookingRequest.php new file mode 100644 index 0000000..a784261 --- /dev/null +++ b/app/Livewire/BookingRequest.php @@ -0,0 +1,325 @@ + quantity per extra id */ + public array $extras = []; + + public string $promoCode = ''; + + public string $firstName = ''; + + public string $lastName = ''; + + public string $email = ''; + + public string $phone = ''; + + public string $street = ''; + + public string $postalCode = ''; + + public string $city = ''; + + public string $message = ''; + + public bool $privacyAccepted = false; + + /** Honeypot, must stay empty. */ + public string $website = ''; + + #[Locked] + public ?int $bookingId = null; + + public function mount(?Property $property = null): void + { + $this->propertyId = ($property ?? Property::query()->where('is_active', true)->firstOrFail())->id; + $this->month = CarbonImmutable::today()->format('Y-m'); + } + + #[Computed] + public function property(): Property + { + return Property::findOrFail($this->propertyId); + } + + /** + * @return Collection + */ + #[Computed] + public function availableExtras(): Collection + { + return $this->property->extras()->active()->get(); + } + + public function previousMonth(): void + { + $previous = $this->firstMonth()->subMonth(); + if ($previous->greaterThanOrEqualTo(CarbonImmutable::today()->startOfMonth())) { + $this->month = $previous->format('Y-m'); + } + } + + public function nextMonth(): void + { + $this->month = $this->firstMonth()->addMonth()->format('Y-m'); + } + + /** + * Calendar click: the first click sets the arrival, the second the departure. + */ + public function selectDate(string $date): void + { + $day = CarbonImmutable::parse($date); + $occupied = $this->occupiedNights(); + + if ($this->arrival !== null && $this->departure === null && $day->greaterThan(CarbonImmutable::parse($this->arrival))) { + if ($this->allNightsFree(CarbonImmutable::parse($this->arrival), $day, $occupied)) { + $this->departure = $day->toDateString(); + + return; + } + } + + if ($day->isBefore(CarbonImmutable::today()) || isset($occupied[$day->toDateString()])) { + return; + } + + $this->arrival = $day->toDateString(); + $this->departure = null; + } + + public function clearDates(): void + { + $this->arrival = null; + $this->departure = null; + } + + /** + * @return array{quote: ?PriceQuote, error: ?string} + */ + #[Computed] + public function pricing(): array + { + if ($this->arrival === null || $this->departure === null) { + return ['quote' => null, 'error' => null]; + } + + $stay = $this->stayRequest(); + + if ($stay->arrival->isBefore(CarbonImmutable::today())) { + return ['quote' => null, 'error' => 'Die Anreise darf nicht in der Vergangenheit liegen.']; + } + + if ($stay->departure->greaterThan($stay->arrival) && ! app(AvailabilityChecker::class)->isAvailable($this->property, $stay->arrival, $stay->departure)) { + return ['quote' => null, 'error' => 'Der Zeitraum ist leider bereits belegt.']; + } + + try { + return ['quote' => app(PriceCalculator::class)->calculate($this->property, $stay), 'error' => null]; + } catch (QuoteException $exception) { + return ['quote' => null, 'error' => $exception->getMessage()]; + } + } + + /** + * Weeks of the shown months; every day knows whether its night is still free. + * + * @return list>}> + */ + #[Computed] + public function calendar(): array + { + $occupied = $this->occupiedNights(); + $today = CarbonImmutable::today(); + $arrival = $this->arrival ? CarbonImmutable::parse($this->arrival) : null; + $departure = $this->departure ? CarbonImmutable::parse($this->departure) : null; + + $months = []; + for ($index = 0; $index < self::MONTHS_SHOWN; $index++) { + $first = $this->firstMonth()->addMonths($index); + $days = array_fill(0, $first->isoWeekday() - 1, null); + + for ($day = $first; $day->month === $first->month; $day = $day->addDay()) { + $days[] = [ + 'date' => $day->toDateString(), + 'day' => $day->day, + 'free' => ! isset($occupied[$day->toDateString()]), + 'past' => $day->isBefore($today), + 'selected' => in_array($day->toDateString(), [$this->arrival, $this->departure], true), + 'inRange' => $arrival && $departure && $day->greaterThan($arrival) && $day->lessThan($departure), + ]; + } + + $months[] = ['label' => $first->translatedFormat('F Y'), 'weeks' => array_chunk($days, 7)]; + } + + return $months; + } + + public function submit(CreateReservation $createReservation): void + { + $this->validate(); + + if ($this->website !== '') { + return; + } + + $rateLimitKey = 'booking-request:'.request()->ip(); + if (RateLimiter::tooManyAttempts($rateLimitKey, 5)) { + $this->addError('email', 'Zu viele Anfragen. Bitte versuchen Sie es später erneut oder rufen Sie uns an.'); + + return; + } + RateLimiter::hit($rateLimitKey, 3600); + + try { + $booking = $createReservation->handle( + $this->property, + $this->stayRequest(), + [ + 'first_name' => $this->firstName, + 'last_name' => $this->lastName, + 'email' => $this->email, + 'phone' => $this->phone ?: null, + 'street' => $this->street ?: null, + 'postal_code' => $this->postalCode ?: null, + 'city' => $this->city ?: null, + ], + $this->message ?: null, + ); + } catch (QuoteException|ReservationException $exception) { + $this->addError('arrival', $exception->getMessage()); + unset($this->calendar, $this->pricing); + + return; + } + + $this->bookingId = $booking->id; + } + + /** + * @return array> + */ + protected function rules(): array + { + return [ + 'arrival' => ['required', 'date', 'after_or_equal:today'], + 'departure' => ['required', 'date', 'after:arrival'], + 'guests' => ['required', 'integer', 'min:1', 'max:'.$this->property->max_guests], + 'extras.*' => ['nullable', 'integer', 'min:0', 'max:10'], + 'promoCode' => ['nullable', 'string', 'max:50'], + 'firstName' => ['required', 'string', 'max:255'], + 'lastName' => ['required', 'string', 'max:255'], + 'email' => ['required', 'email', 'max:255'], + 'phone' => ['nullable', 'string', 'max:50'], + 'street' => ['nullable', 'string', 'max:255'], + 'postalCode' => ['nullable', 'string', 'max:20'], + 'city' => ['nullable', 'string', 'max:255'], + 'message' => ['nullable', 'string', 'max:5000'], + 'privacyAccepted' => ['accepted'], + ]; + } + + /** + * @return array + */ + protected function validationAttributes(): array + { + return [ + 'arrival' => 'Anreise', + 'departure' => 'Abreise', + 'guests' => 'Personen', + 'firstName' => 'Vorname', + 'lastName' => 'Nachname', + 'email' => 'E-Mail', + 'privacyAccepted' => 'Datenschutzerklärung', + ]; + } + + public function render(): View + { + return view('livewire.booking-request', [ + 'booking' => $this->bookingId ? Booking::with('guest')->find($this->bookingId) : null, + ]); + } + + private function stayRequest(): StayRequest + { + return new StayRequest( + CarbonImmutable::parse($this->arrival), + CarbonImmutable::parse($this->departure), + $this->guests, + array_map('intval', array_filter($this->extras, fn ($quantity): bool => (int) $quantity > 0)), + $this->promoCode !== '' ? trim($this->promoCode) : null, + ); + } + + private function firstMonth(): CarbonImmutable + { + return CarbonImmutable::createFromFormat('!Y-m', $this->month); + } + + /** + * Occupied nights from the first shown month until a year ahead, so departures can be checked beyond the view. + * + * @return array + */ + private function occupiedNights(): array + { + $from = $this->firstMonth()->min(CarbonImmutable::parse($this->arrival ?? $this->month.'-01')); + + return app(AvailabilityChecker::class)->occupiedNights($this->property, $from, $from->addYear()); + } + + /** + * @param array $occupied + */ + private function allNightsFree(CarbonImmutable $from, CarbonImmutable $until, array $occupied): bool + { + for ($night = $from; $night->lessThan($until); $night = $night->addDay()) { + if (isset($occupied[$night->toDateString()])) { + return false; + } + } + + return true; + } +} diff --git a/app/Mail/BookingConfirmed.php b/app/Mail/BookingConfirmed.php new file mode 100644 index 0000000..f383ae5 --- /dev/null +++ b/app/Mail/BookingConfirmed.php @@ -0,0 +1,36 @@ +booking->reference, + replyTo: [new Address(config('fewo.owner.email'), config('fewo.owner.name'))], + ); + } + + public function content(): Content + { + return new Content( + markdown: 'mail.booking-confirmed', + ); + } +} diff --git a/app/Mail/BookingDeclined.php b/app/Mail/BookingDeclined.php new file mode 100644 index 0000000..36b8549 --- /dev/null +++ b/app/Mail/BookingDeclined.php @@ -0,0 +1,36 @@ +booking->reference, + replyTo: [new Address(config('fewo.owner.email'), config('fewo.owner.name'))], + ); + } + + public function content(): Content + { + return new Content( + markdown: 'mail.booking-declined', + ); + } +} diff --git a/app/Mail/NewReservation.php b/app/Mail/NewReservation.php new file mode 100644 index 0000000..f886c32 --- /dev/null +++ b/app/Mail/NewReservation.php @@ -0,0 +1,36 @@ +booking->reference.': '.$this->booking->guest->full_name.', '.$this->booking->arrival->format('d.m.').'–'.$this->booking->departure->format('d.m.Y'), + replyTo: [new Address($this->booking->guest->email, $this->booking->guest->full_name)], + ); + } + + public function content(): Content + { + return new Content( + markdown: 'mail.new-reservation', + ); + } +} diff --git a/app/Mail/ReservationExpired.php b/app/Mail/ReservationExpired.php new file mode 100644 index 0000000..4a27bea --- /dev/null +++ b/app/Mail/ReservationExpired.php @@ -0,0 +1,36 @@ +booking->reference.' ('.$this->booking->guest->full_name.')', + replyTo: [new Address($this->booking->guest->email, $this->booking->guest->full_name)], + ); + } + + public function content(): Content + { + return new Content( + markdown: 'mail.reservation-expired', + ); + } +} diff --git a/app/Mail/ReservationReceived.php b/app/Mail/ReservationReceived.php new file mode 100644 index 0000000..8d33c8c --- /dev/null +++ b/app/Mail/ReservationReceived.php @@ -0,0 +1,36 @@ +booking->reference.' – Termin vorgemerkt', + replyTo: [new Address(config('fewo.owner.email'), config('fewo.owner.name'))], + ); + } + + public function content(): Content + { + return new Content( + markdown: 'mail.reservation-received', + ); + } +} diff --git a/app/Models/BlockedPeriod.php b/app/Models/BlockedPeriod.php new file mode 100644 index 0000000..75984be --- /dev/null +++ b/app/Models/BlockedPeriod.php @@ -0,0 +1,56 @@ + */ + use HasFactory; + + /** + * Get the attributes that should be cast. + * + * @return array + */ + protected function casts(): array + { + return [ + 'starts_on' => 'immutable_date', + 'ends_on' => 'immutable_date', + ]; + } + + /** + * @return BelongsTo + */ + public function property(): BelongsTo + { + return $this->belongsTo(Property::class); + } + + /** + * @param Builder $query + * @return Builder + */ + #[Scope] + protected function overlapping(Builder $query, CarbonInterface $from, CarbonInterface $until): Builder + { + return $query + ->whereDate('starts_on', '<', $until) + ->whereDate('ends_on', '>', $from); + } +} diff --git a/app/Models/Booking.php b/app/Models/Booking.php new file mode 100644 index 0000000..69b205f --- /dev/null +++ b/app/Models/Booking.php @@ -0,0 +1,124 @@ + */ + use HasFactory; + + protected static function booted(): void + { + static::created(function (Booking $booking): void { + $booking->forceFill(['reference' => $booking->created_at->format('Y').'-'.str_pad((string) $booking->id, 4, '0', STR_PAD_LEFT)])->saveQuietly(); + }); + } + + /** + * Get the attributes that should be cast. + * + * @return array + */ + protected function casts(): array + { + return [ + 'status' => BookingStatus::class, + 'arrival' => 'immutable_date', + 'departure' => 'immutable_date', + 'extras' => 'array', + 'quote' => 'array', + 'balance_due_on' => 'immutable_date', + 'hold_expires_at' => 'immutable_datetime', + 'confirmed_at' => 'immutable_datetime', + 'cancelled_at' => 'immutable_datetime', + ]; + } + + /** + * @return BelongsTo + */ + public function property(): BelongsTo + { + return $this->belongsTo(Property::class); + } + + /** + * @return BelongsTo + */ + public function guest(): BelongsTo + { + return $this->belongsTo(Guest::class); + } + + /** + * Bookings that currently occupy their dates: confirmed ones and reservations whose hold has not expired. + * + * @param Builder $query + * @return Builder + */ + #[Scope] + protected function occupying(Builder $query): Builder + { + return $query->where(fn (Builder $query) => $query + ->whereIn('status', BookingStatus::occupying()) + ->orWhere(fn (Builder $query) => $query + ->where('status', BookingStatus::Reserved) + ->where('hold_expires_at', '>', now()))); + } + + /** + * @param Builder $query + * @return Builder + */ + #[Scope] + protected function overlapping(Builder $query, CarbonInterface $from, CarbonInterface $until): Builder + { + return $query + ->whereDate('arrival', '<', $until) + ->whereDate('departure', '>', $from); + } + + public function nights(): int + { + return (int) $this->arrival->diffInDays($this->departure); + } + + public function isHoldActive(): bool + { + return $this->status === BookingStatus::Reserved && $this->hold_expires_at?->isFuture(); + } +} diff --git a/app/Models/Guest.php b/app/Models/Guest.php new file mode 100644 index 0000000..0110241 --- /dev/null +++ b/app/Models/Guest.php @@ -0,0 +1,34 @@ + */ + use HasFactory, Notifiable; + + /** + * @return HasMany + */ + public function bookings(): HasMany + { + return $this->hasMany(Booking::class)->latest('arrival'); + } + + /** + * @return Attribute + */ + protected function fullName(): Attribute + { + return Attribute::get(fn (): string => "{$this->first_name} {$this->last_name}"); + } +} diff --git a/app/Models/Property.php b/app/Models/Property.php index 9882657..a201e25 100644 --- a/app/Models/Property.php +++ b/app/Models/Property.php @@ -23,6 +23,7 @@ 'cleaning_fee', 'deposit_percent', 'balance_due_days_before_arrival', + 'hold_hours', 'check_in_time', 'check_out_time', 'is_active', @@ -52,6 +53,30 @@ public function seasons(): HasMany return $this->hasMany(Season::class)->orderBy('starts_on'); } + /** + * @return HasMany + */ + public function bookings(): HasMany + { + return $this->hasMany(Booking::class); + } + + /** + * @return HasMany + */ + public function blockedPeriods(): HasMany + { + return $this->hasMany(BlockedPeriod::class)->orderBy('starts_on'); + } + + /** + * @return HasMany + */ + public function specialOffers(): HasMany + { + return $this->hasMany(SpecialOffer::class); + } + /** * Periods within [$from, $until) for which no season defines a price. * diff --git a/app/Models/SpecialOffer.php b/app/Models/SpecialOffer.php new file mode 100644 index 0000000..7a2b0d6 --- /dev/null +++ b/app/Models/SpecialOffer.php @@ -0,0 +1,136 @@ + */ + use HasFactory; + + /** + * Get the attributes that should be cast. + * + * @return array + */ + protected function casts(): array + { + return [ + 'is_active' => 'boolean', + 'is_public' => 'boolean', + 'is_combinable' => 'boolean', + 'discount_type' => DiscountType::class, + 'stay_from' => 'immutable_date', + 'stay_until' => 'immutable_date', + 'bookable_from' => 'immutable_datetime', + 'bookable_until' => 'immutable_datetime', + 'arrival_weekdays' => 'array', + 'season_names' => 'array', + ]; + } + + /** + * @return BelongsTo + */ + public function property(): BelongsTo + { + return $this->belongsTo(Property::class); + } + + /** + * @param Builder $query + * @return Builder + */ + #[Scope] + protected function active(Builder $query): Builder + { + return $query->where('is_active', true); + } + + /** + * Whether all conditions are met. Offers with a code only apply when the guest entered that code. + */ + public function appliesTo(StayRequest $stay, string $arrivalSeasonName, CarbonImmutable $bookedAt): bool + { + $nights = $stay->nights(); + $daysBeforeArrival = (int) $bookedAt->startOfDay()->diffInDays($stay->arrival, false); + + return $this->is_active + && ($this->code === null || strcasecmp($this->code, (string) $stay->promoCode) === 0) + && ($this->stay_from === null || $stay->arrival->greaterThanOrEqualTo($this->stay_from)) + && ($this->stay_until === null || $stay->departure->lessThanOrEqualTo($this->stay_until)) + && ($this->bookable_from === null || $bookedAt->greaterThanOrEqualTo($this->bookable_from)) + && ($this->bookable_until === null || $bookedAt->lessThanOrEqualTo($this->bookable_until)) + && ($this->min_days_before_arrival === null || $daysBeforeArrival >= $this->min_days_before_arrival) + && ($this->max_days_before_arrival === null || $daysBeforeArrival <= $this->max_days_before_arrival) + && ($this->min_nights === null || $nights >= $this->min_nights) + && ($this->max_nights === null || $nights <= $this->max_nights) + && (empty($this->arrival_weekdays) || in_array($stay->arrival->isoWeekday(), array_map('intval', $this->arrival_weekdays), true)) + && (empty($this->season_names) || in_array($arrivalSeasonName, $this->season_names, true)); + } + + /** + * The discount in cents for the given nightly rates (one entry per night, in cents). + * + * @param list $nightlyRates + */ + public function discountFor(array $nightlyRates): int + { + $accommodation = array_sum($nightlyRates); + + $discount = match ($this->discount_type) { + DiscountType::Percent => intdiv($accommodation * min($this->discount_value, 100) + 50, 100), + DiscountType::AmountPerStay => $this->discount_value, + DiscountType::NightlyRate => array_sum(array_map(fn (int $rate): int => max(0, $rate - $this->discount_value), $nightlyRates)), + DiscountType::FreeNights => array_sum(array_slice($this->sortedAscending($nightlyRates), 0, $this->discount_value)), + }; + + return min($discount, $accommodation); + } + + /** + * @param list $rates + * @return list + */ + private function sortedAscending(array $rates): array + { + sort($rates); + + return $rates; + } +} diff --git a/app/Pricing/PriceCalculator.php b/app/Pricing/PriceCalculator.php index fd17a7c..96e27d9 100644 --- a/app/Pricing/PriceCalculator.php +++ b/app/Pricing/PriceCalculator.php @@ -7,40 +7,44 @@ use App\Models\Extra; use App\Models\Property; use App\Models\Season; +use App\Models\SpecialOffer; use Carbon\CarbonImmutable; use Illuminate\Support\Collection; class PriceCalculator { /** - * Price a stay from $arrival (first night) to $departure (day of departure, not a night). - * - * @param array $extraQuantities quantity per extra id + * Price a stay. Special offers are applied automatically; $bookedAt (default: now) decides + * time-dependent offers such as last minute or early bird. * * @throws QuoteException */ - public function calculate( - Property $property, - CarbonImmutable $arrival, - CarbonImmutable $departure, - int $guests, - array $extraQuantities = [], - ): PriceQuote { - $arrival = $arrival->startOfDay(); - $departure = $departure->startOfDay(); - - if ($departure->lessThanOrEqualTo($arrival)) { + public function calculate(Property $property, StayRequest $stay, ?CarbonImmutable $bookedAt = null): PriceQuote + { + if ($stay->departure->lessThanOrEqualTo($stay->arrival)) { throw QuoteException::invalidPeriod(); } - if ($guests < 1 || $guests > $property->max_guests) { + if ($stay->guests < 1 || $stay->guests > $property->max_guests) { throw QuoteException::invalidGuestCount($property->max_guests); } - $nights = (int) $arrival->diffInDays($departure); - $lines = $this->accommodationLines($property, $arrival, $departure); + $nights = $stay->nights(); + $nightSeasons = $this->seasonPerNight($property, $stay); - $extraGuests = max(0, $guests - $property->included_guests); + $arrivalSeason = $nightSeasons[0]; + if ($nights < $arrivalSeason->min_nights) { + throw QuoteException::minimumStay($arrivalSeason->min_nights, $arrivalSeason->name); + } + + $lines = $this->accommodationLines($nightSeasons); + + $appliedOffers = $this->bestOffers($property, $stay, $nightSeasons, $bookedAt ?? CarbonImmutable::now()); + foreach ($appliedOffers as ['offer' => $offer, 'discount' => $discount]) { + $lines[] = new QuoteLine(QuoteLineType::Discount, $offer->name, 1, -$discount, -$discount); + } + + $extraGuests = max(0, $stay->guests - $property->included_guests); if ($extraGuests > 0 && $property->extra_guest_fee_per_night > 0) { $lines[] = new QuoteLine( QuoteLineType::ExtraGuest, @@ -55,34 +59,47 @@ public function calculate( $lines[] = new QuoteLine(QuoteLineType::Cleaning, 'Endreinigung & Service', 1, $property->cleaning_fee, $property->cleaning_fee); } - array_push($lines, ...$this->extraLines($property, $extraQuantities, $nights)); + array_push($lines, ...$this->extraLines($property, $stay->extras, $nights)); return new PriceQuote( - arrival: $arrival, - departure: $departure, - guests: $guests, + arrival: $stay->arrival, + departure: $stay->departure, + guests: $stay->guests, lines: $lines, depositPercent: $property->deposit_percent, - balanceDueOn: $arrival->subDays($property->balance_due_days_before_arrival), + balanceDueOn: $stay->arrival->subDays($property->balance_due_days_before_arrival), + promoCodeApplied: $stay->promoCode === null ? null : collect($appliedOffers)->contains(fn (array $applied): bool => $applied['offer']->code !== null), ); } + /** + * @return non-empty-list + */ + private function seasonPerNight(Property $property, StayRequest $stay): array + { + /** @var Collection $seasons */ + $seasons = $property->seasons()->overlapping($stay->arrival, $stay->departure)->get(); + + $nightSeasons = []; + for ($night = $stay->arrival; $night->lessThan($stay->departure); $night = $night->addDay()) { + $nightSeasons[] = $seasons->first(fn (Season $season): bool => $season->containsNight($night)) + ?? throw QuoteException::noRateForNight($night); + } + + return $nightSeasons; + } + /** * One line per consecutive run of nights in the same season. * + * @param non-empty-list $nightSeasons * @return list */ - private function accommodationLines(Property $property, CarbonImmutable $arrival, CarbonImmutable $departure): array + private function accommodationLines(array $nightSeasons): array { - /** @var Collection $seasons */ - $seasons = $property->seasons()->overlapping($arrival, $departure)->get(); - /** @var list $runs */ $runs = []; - for ($night = $arrival; $night->lessThan($departure); $night = $night->addDay()) { - $season = $seasons->first(fn (Season $season): bool => $season->containsNight($night)) - ?? throw QuoteException::noRateForNight($night); - + foreach ($nightSeasons as $season) { $lastRun = array_key_last($runs); if ($lastRun !== null && $runs[$lastRun]['season']->is($season)) { $runs[$lastRun]['nights']++; @@ -91,12 +108,6 @@ private function accommodationLines(Property $property, CarbonImmutable $arrival } } - $arrivalSeason = $runs[0]['season']; - $nights = (int) $arrival->diffInDays($departure); - if ($nights < $arrivalSeason->min_nights) { - throw QuoteException::minimumStay($arrivalSeason->min_nights, $arrivalSeason->name); - } - return array_map(fn (array $run): QuoteLine => new QuoteLine( QuoteLineType::Accommodation, "{$run['season']->name} ({$run['nights']} ".($run['nights'] === 1 ? 'Nacht' : 'Nächte').')', @@ -106,6 +117,46 @@ private function accommodationLines(Property $property, CarbonImmutable $arrival ), $runs); } + /** + * The guest gets whichever is cheaper for them: the single best non-combinable offer, + * or all combinable offers together (capped at the accommodation price). + * + * @param non-empty-list $nightSeasons + * @return list + */ + private function bestOffers(Property $property, StayRequest $stay, array $nightSeasons, CarbonImmutable $bookedAt): array + { + $nightlyRates = array_map(fn (Season $season): int => $season->nightly_rate, $nightSeasons); + $accommodation = array_sum($nightlyRates); + + $candidates = $property->specialOffers()->active()->get() + ->filter(fn (SpecialOffer $offer): bool => $offer->appliesTo($stay, $nightSeasons[0]->name, $bookedAt)) + ->map(fn (SpecialOffer $offer): array => ['offer' => $offer, 'discount' => $offer->discountFor($nightlyRates)]) + ->filter(fn (array $candidate): bool => $candidate['discount'] > 0); + + [$combinable, $exclusive] = $candidates->partition(fn (array $candidate): bool => $candidate['offer']->is_combinable); + + $bestExclusive = $exclusive->sortByDesc('discount')->first(); + + $combined = []; + $remaining = $accommodation; + foreach ($combinable->sortByDesc('discount') as $candidate) { + $discount = min($candidate['discount'], $remaining); + if ($discount > 0) { + $combined[] = ['offer' => $candidate['offer'], 'discount' => $discount]; + $remaining -= $discount; + } + } + + $combinedTotal = $accommodation - $remaining; + + if ($bestExclusive !== null && $bestExclusive['discount'] >= $combinedTotal) { + return [$bestExclusive]; + } + + return $combined; + } + /** * @param array $extraQuantities * @return list diff --git a/app/Pricing/PriceQuote.php b/app/Pricing/PriceQuote.php index 72f2775..7c9959d 100644 --- a/app/Pricing/PriceQuote.php +++ b/app/Pricing/PriceQuote.php @@ -2,6 +2,7 @@ namespace App\Pricing; +use App\Enums\QuoteLineType; use Carbon\CarbonImmutable; /** @@ -19,8 +20,20 @@ public function __construct( public array $lines, public int $depositPercent, public CarbonImmutable $balanceDueOn, + public ?bool $promoCodeApplied = null, ) {} + /** + * Total of all special offer discounts as a positive amount. + */ + public function discount(): int + { + return -array_sum(array_map( + fn (QuoteLine $line): int => $line->type === QuoteLineType::Discount ? $line->amount : 0, + $this->lines, + )); + } + public function nights(): int { return (int) $this->arrival->diffInDays($this->departure); @@ -53,7 +66,7 @@ public function balance(): int } /** - * @return array{arrival: string, departure: string, nights: int, guests: int, lines: list>, total: int, deposit: int, balance: int, balance_due_on: string} + * @return array{arrival: string, departure: string, nights: int, guests: int, lines: list>, total: int, deposit: int, balance: int, balance_due_on: string, discount: int} */ public function toArray(): array { @@ -67,6 +80,7 @@ public function toArray(): array 'deposit' => $this->deposit(), 'balance' => $this->balance(), 'balance_due_on' => $this->balanceDueOn->toDateString(), + 'discount' => $this->discount(), ]; } } diff --git a/app/Pricing/StayRequest.php b/app/Pricing/StayRequest.php new file mode 100644 index 0000000..ec8db89 --- /dev/null +++ b/app/Pricing/StayRequest.php @@ -0,0 +1,34 @@ + $extras quantity per extra id + */ + public function __construct( + CarbonImmutable $arrival, + CarbonImmutable $departure, + public int $guests, + public array $extras = [], + public ?string $promoCode = null, + ) { + $this->arrival = $arrival->startOfDay(); + $this->departure = $departure->startOfDay(); + } + + public function nights(): int + { + return (int) $this->arrival->diffInDays($this->departure); + } +} diff --git a/app/Support/Money.php b/app/Support/Money.php new file mode 100644 index 0000000..135ee81 --- /dev/null +++ b/app/Support/Money.php @@ -0,0 +1,16 @@ + [ + 'name' => env('FEWO_OWNER_NAME', 'Brigitte Stommer'), + 'street' => env('FEWO_OWNER_STREET', 'Erbstollen 3'), + 'city' => env('FEWO_OWNER_CITY', '44225 Dortmund'), + 'phone' => env('FEWO_OWNER_PHONE', '0170 8165208'), + 'email' => env('FEWO_OWNER_EMAIL', 'fewo@stommer.de'), + ], + + 'notification_email' => env('FEWO_NOTIFICATION_EMAIL', env('FEWO_OWNER_EMAIL', 'fewo@stommer.de')), + + 'bank' => [ + 'account_holder' => env('FEWO_BANK_ACCOUNT_HOLDER'), + 'iban' => env('FEWO_BANK_IBAN'), + 'bic' => env('FEWO_BANK_BIC'), + 'bank_name' => env('FEWO_BANK_NAME'), + ], + + /* + | Days after confirmation within which the deposit has to be paid. + */ + 'deposit_due_days' => (int) env('FEWO_DEPOSIT_DUE_DAYS', 7), + +]; diff --git a/database/factories/BlockedPeriodFactory.php b/database/factories/BlockedPeriodFactory.php new file mode 100644 index 0000000..9f9d297 --- /dev/null +++ b/database/factories/BlockedPeriodFactory.php @@ -0,0 +1,31 @@ + + */ +class BlockedPeriodFactory extends Factory +{ + /** + * Define the model's default state. + * + * @return array + */ + public function definition(): array + { + $startsOn = now()->addDays(fake()->numberBetween(30, 200))->startOfDay(); + + return [ + 'property_id' => Property::factory(), + 'starts_on' => $startsOn->toDateString(), + 'ends_on' => $startsOn->copy()->addDays(5)->toDateString(), + 'reason' => 'Eigennutzung', + 'source' => 'manual', + ]; + } +} diff --git a/database/factories/BookingFactory.php b/database/factories/BookingFactory.php new file mode 100644 index 0000000..763f4a2 --- /dev/null +++ b/database/factories/BookingFactory.php @@ -0,0 +1,46 @@ + + */ +class BookingFactory extends Factory +{ + /** + * Define the model's default state. + * + * @return array + */ + public function definition(): array + { + $arrival = now()->addDays(fake()->numberBetween(30, 200))->startOfDay(); + + return [ + 'property_id' => Property::factory(), + 'guest_id' => Guest::factory(), + 'status' => BookingStatus::Confirmed, + 'arrival' => $arrival->toDateString(), + 'departure' => $arrival->copy()->addDays(7)->toDateString(), + 'guests' => 2, + 'quote' => [], + 'total' => 80000, + 'deposit' => 20000, + 'balance_due_on' => $arrival->copy()->subDays(28)->toDateString(), + ]; + } + + public function reserved(?\DateTimeInterface $holdExpiresAt = null): static + { + return $this->state(fn (): array => [ + 'status' => BookingStatus::Reserved, + 'hold_expires_at' => $holdExpiresAt ?? now()->addHours(48), + ]); + } +} diff --git a/database/factories/GuestFactory.php b/database/factories/GuestFactory.php new file mode 100644 index 0000000..3e999a7 --- /dev/null +++ b/database/factories/GuestFactory.php @@ -0,0 +1,31 @@ + + */ +class GuestFactory extends Factory +{ + /** + * Define the model's default state. + * + * @return array + */ + public function definition(): array + { + return [ + 'first_name' => fake()->firstName(), + 'last_name' => fake()->lastName(), + 'email' => fake()->unique()->safeEmail(), + 'phone' => fake()->phoneNumber(), + 'street' => fake()->streetAddress(), + 'postal_code' => fake()->postcode(), + 'city' => fake()->city(), + 'country' => 'DE', + ]; + } +} diff --git a/database/factories/SpecialOfferFactory.php b/database/factories/SpecialOfferFactory.php new file mode 100644 index 0000000..3497eb4 --- /dev/null +++ b/database/factories/SpecialOfferFactory.php @@ -0,0 +1,32 @@ + + */ +class SpecialOfferFactory extends Factory +{ + /** + * Define the model's default state. + * + * @return array + */ + public function definition(): array + { + return [ + 'property_id' => Property::factory(), + 'name' => 'Sonderangebot', + 'is_active' => true, + 'is_public' => true, + 'is_combinable' => false, + 'discount_type' => DiscountType::Percent, + 'discount_value' => 10, + ]; + } +} diff --git a/database/migrations/2026_10_22_092642_create_guests_table.php b/database/migrations/2026_10_22_092642_create_guests_table.php new file mode 100644 index 0000000..97fddae --- /dev/null +++ b/database/migrations/2026_10_22_092642_create_guests_table.php @@ -0,0 +1,37 @@ +id(); + $table->string('first_name'); + $table->string('last_name'); + $table->string('email')->index(); + $table->string('phone')->nullable(); + $table->string('street')->nullable(); + $table->string('postal_code', 20)->nullable(); + $table->string('city')->nullable(); + $table->string('country', 2)->default('DE'); + $table->string('locale', 5)->default('de'); + $table->text('notes')->nullable(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('guests'); + } +}; diff --git a/database/migrations/2026_10_22_092645_create_bookings_table.php b/database/migrations/2026_10_22_092645_create_bookings_table.php new file mode 100644 index 0000000..dd68f87 --- /dev/null +++ b/database/migrations/2026_10_22_092645_create_bookings_table.php @@ -0,0 +1,48 @@ +id(); + $table->string('reference')->nullable()->unique(); + $table->foreignId('property_id')->constrained()->restrictOnDelete(); + $table->foreignId('guest_id')->constrained()->restrictOnDelete(); + $table->string('status')->index(); + $table->string('source')->default('website'); + $table->date('arrival'); + $table->date('departure'); + $table->unsignedTinyInteger('guests'); + $table->json('extras')->nullable(); + $table->string('promo_code')->nullable(); + $table->json('quote'); + $table->unsignedInteger('total'); + $table->unsignedInteger('deposit'); + $table->date('balance_due_on'); + $table->dateTime('hold_expires_at')->nullable(); + $table->text('message')->nullable(); + $table->text('internal_notes')->nullable(); + $table->dateTime('confirmed_at')->nullable(); + $table->dateTime('cancelled_at')->nullable(); + $table->timestamps(); + + $table->index(['property_id', 'arrival', 'departure']); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('bookings'); + } +}; diff --git a/database/migrations/2026_10_22_092648_create_blocked_periods_table.php b/database/migrations/2026_10_22_092648_create_blocked_periods_table.php new file mode 100644 index 0000000..2f009bf --- /dev/null +++ b/database/migrations/2026_10_22_092648_create_blocked_periods_table.php @@ -0,0 +1,35 @@ +id(); + $table->foreignId('property_id')->constrained()->cascadeOnDelete(); + $table->date('starts_on'); + $table->date('ends_on'); + $table->string('reason')->nullable(); + $table->string('source')->default('manual'); + $table->string('external_uid')->nullable(); + $table->timestamps(); + + $table->index(['property_id', 'starts_on', 'ends_on']); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('blocked_periods'); + } +}; diff --git a/database/migrations/2026_10_22_092650_create_special_offers_table.php b/database/migrations/2026_10_22_092650_create_special_offers_table.php new file mode 100644 index 0000000..e630e4d --- /dev/null +++ b/database/migrations/2026_10_22_092650_create_special_offers_table.php @@ -0,0 +1,46 @@ +id(); + $table->foreignId('property_id')->constrained()->cascadeOnDelete(); + $table->string('name'); + $table->string('public_description')->nullable(); + $table->boolean('is_active')->default(true); + $table->boolean('is_public')->default(true); + $table->boolean('is_combinable')->default(false); + $table->string('code')->nullable(); + $table->string('discount_type'); + $table->unsignedInteger('discount_value'); + $table->date('stay_from')->nullable(); + $table->date('stay_until')->nullable(); + $table->dateTime('bookable_from')->nullable(); + $table->dateTime('bookable_until')->nullable(); + $table->unsignedSmallInteger('min_days_before_arrival')->nullable(); + $table->unsignedSmallInteger('max_days_before_arrival')->nullable(); + $table->unsignedSmallInteger('min_nights')->nullable(); + $table->unsignedSmallInteger('max_nights')->nullable(); + $table->json('arrival_weekdays')->nullable(); + $table->json('season_names')->nullable(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('special_offers'); + } +}; diff --git a/database/migrations/2026_10_22_092652_add_hold_hours_to_properties_table.php b/database/migrations/2026_10_22_092652_add_hold_hours_to_properties_table.php new file mode 100644 index 0000000..12abecc --- /dev/null +++ b/database/migrations/2026_10_22_092652_add_hold_hours_to_properties_table.php @@ -0,0 +1,28 @@ +unsignedSmallInteger('hold_hours')->default(48)->after('balance_due_days_before_arrival'); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('properties', function (Blueprint $table) { + $table->dropColumn('hold_hours'); + }); + } +}; diff --git a/docs/KONZEPT.md b/docs/KONZEPT.md index dfa7e33..35b021c 100644 --- a/docs/KONZEPT.md +++ b/docs/KONZEPT.md @@ -51,11 +51,27 @@ ## 5. Verwaltungssystem (Admin) - **Saisons & Preise:** pro Saison Zeitraum, Preis/Nacht, Mindestaufenthalt, optional An-/Abreisetage. Jahr kopieren („Preise 2027 = 2026“) mit einem Klick. - **Preisbestandteile (konfigurierbar):** Endreinigung/Service (108 €), Zusatzperson ab 3. Person (7,50 €/Nacht), Extras (Bettwäsche 14 €, Handtücher 11 €, Paket 23 €), Kurtaxe (Hinweis, vor Ort), Anzahlungsquote 35 %, Restzahlungsfrist 4 Wochen. - Darstellung wahlweise wie heute („erste Nacht inkl. Endreinigung“) oder transparent getrennt – die Berechnung ist identisch. -- **Anfragen & Buchungen:** Statusworkflow, Notizen, komplette Kommunikationshistorie. +- **Sonderangebote & Sonderkonditionen:** werden bei jeder Preisberechnung automatisch geprüft (siehe 5a). +- **Anfragen & Buchungen:** Statusworkflow, Notizen, komplette Kommunikationshistorie. Manuelle Erfassung von Telefonbuchungen mit automatischer Preisberechnung. - **Gäste:** Kartei, Wiederkehrer, DSGVO-Löschfristen. - **Vorlagen:** E-Mail-Texte und Mietvertrag mit Platzhaltern editierbar. - **Portale/Connectoren:** siehe Abschnitt 7. +## 5a. Sonderangebote & Sonderkonditionen + +Ein Angebot besteht aus einem **Vorteil** und beliebig vielen **Bedingungen** (leer = keine Einschränkung): + +| Vorteil | Beispiel | +|---|---| +| Rabatt in % | Last Minute −15 % | +| Rabatt in € pro Aufenthalt | Stammgast −25 € | +| Sonderpreis pro Nacht | Special Weekend 59 €/Nacht | +| Gratis-Nächte (die günstigsten) | 7 = 6 | + +Bedingungen: Saison(s) der Anreise · Vorlauf (max./min. Tage vor Anreise → Last Minute/Frühbucher) · Mindest-/Höchstnächte · Anreise-Wochentage · Aufenthaltszeitraum · Buchungszeitraum · **Aktionscode** (Sonderkondition, z. B. für Stammgäste). + +Rabatte gelten auf den Übernachtungspreis (nicht auf Endreinigung/Extras); die Anzahlung wird auf den rabattierten Mietpreis berechnet. Treffen mehrere Angebote zu, erhält der Gast automatisch die günstigere Variante: das beste Einzelangebot **oder** die Summe aller als „kombinierbar“ markierten Angebote. + ## 6. Workflows ``` @@ -105,14 +121,15 @@ ## 8. Rechtliches (Deutschland) ## 9. Hosting & Deployment (Strato) - Domain-Ziel auf das Verzeichnis `public/` zeigen lassen. -- Zu prüfen im Strato-Paket: PHP-Version ≥ 8.3, SSH-Zugang, Cronjobs, MySQL-Datenbank, SMTP-Postfach (fewo@stommer.de). +- Tarif: **Strato Hosting Pro**. Im Kundenlogin zu prüfen: PHP-Version ≥ 8.4, SSH-Zugang, Cronjobs, MySQL-Datenbank, SMTP-Postfach (fewo@stommer.de). +- Cronjob (jede Minute oder alle 5 Min.): `php artisan schedule:run` – verarbeitet u. a. abgelaufene Vorreservierungen. Der Kalender gibt abgelaufene Vormerkungen auch ohne Cronjob sofort frei; der Cronjob setzt nur den Status und benachrichtigt den Vermieter. - Deployment per Skript (rsync/SFTP) mit Build lokal; Datenbank-Backups täglich. - Migration: Umleitungen (301) der alten WordPress-URLs, Bilder übernehmen. ## 10. Umsetzungsphasen 1. **Fundament:** Laravel + Filament, Datenmodell, Saisons/Preise, Preisberechnung (mit Tests). ✅ -2. **Kalender & Anfrage:** Belegung, Anfrageformular, Auto-Angebot per Mail. +2. **Kalender & Anfrage:** Belegung, Anfrageformular, Auto-Angebot per Mail, Vorreservierung mit Haltezeit, Sonderangebote, Sperrzeiten, Buchungsverwaltung. ✅ 3. **Buchungsworkflow:** Bestätigung, Mietvertrag-PDF, Zahlungsfristen & Erinnerungen. 4. **Webseite:** Design, Inhalte, Galerie, SEO, Barrierefreiheit. 5. **Connectoren:** iCal-Import/-Export, Sync-Log, Konfliktwarnung. @@ -120,11 +137,12 @@ ## 10. Umsetzungsphasen ## 11. Offene Punkte / benötigte Inhalte -- [ ] Strato-Tarif prüfen (SSH, Cronjobs, PHP-Version) +- [x] Strato-Tarif: Hosting Pro – noch prüfen: SSH, Cronjobs, PHP-Version +- [x] Haltezeit der Vorreservierung: 48 h (je Wohnung einstellbar) - [ ] Bestehender Mietvertrag (Vorlage) und Mietbedingungen - [ ] Hochauflösende Fotos - [ ] An-/Abreisezeiten, Stornobedingungen, Haustiere/Rauchen - [ ] Preise 2027 bestätigen; Korrektur Weihnachten/Neujahr-Zeiträume - [ ] Bankverbindung für Zahlungsinformationen - [ ] Sprachen: Deutsch + Englisch? -- [ ] Nachbarwohnung: ebenfalls verwalten (Kombi-Buchung „zwei Familien“)? +- [x] Nachbarwohnung: System ist mehrwohnungsfähig diff --git a/lang/de.json b/lang/de.json new file mode 100644 index 0000000..780462f --- /dev/null +++ b/lang/de.json @@ -0,0 +1,6 @@ +{ + "All rights reserved.": "Alle Rechte vorbehalten.", + "Hello!": "Hallo!", + "Regards,": "Viele Grüße", + "If you're having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser:": "Falls der Button „:actionText“ nicht funktioniert, kopieren Sie bitte folgende Adresse in Ihren Browser:" +} diff --git a/lang/de/validation.php b/lang/de/validation.php new file mode 100644 index 0000000..871f2df --- /dev/null +++ b/lang/de/validation.php @@ -0,0 +1,55 @@ + ':Attribute muss akzeptiert werden.', + 'after' => ':Attribute muss ein Datum nach :date sein.', + 'after_or_equal' => ':Attribute muss ein Datum nach oder gleich :date sein.', + 'alpha_dash' => ':Attribute darf nur Buchstaben, Zahlen, Binde- und Unterstriche enthalten.', + 'array' => ':Attribute muss eine Liste sein.', + 'before' => ':Attribute muss ein Datum vor :date sein.', + 'before_or_equal' => ':Attribute muss ein Datum vor oder gleich :date sein.', + 'boolean' => ':Attribute muss wahr oder falsch sein.', + 'date' => ':Attribute muss ein gültiges Datum sein.', + 'email' => ':Attribute muss eine gültige E-Mail-Adresse sein.', + 'exists' => 'Der gewählte Wert für :attribute ist ungültig.', + 'gt' => [ + 'numeric' => ':Attribute muss größer als :value sein.', + ], + 'gte' => [ + 'numeric' => ':Attribute muss größer oder gleich :value sein.', + ], + 'in' => 'Der gewählte Wert für :attribute ist ungültig.', + 'integer' => ':Attribute muss eine ganze Zahl sein.', + 'lt' => [ + 'numeric' => ':Attribute muss kleiner als :value sein.', + ], + 'lte' => [ + 'numeric' => ':Attribute muss kleiner oder gleich :value sein.', + ], + 'max' => [ + 'array' => ':Attribute darf höchstens :max Elemente haben.', + 'numeric' => ':Attribute darf maximal :max sein.', + 'string' => ':Attribute darf maximal :max Zeichen haben.', + ], + 'min' => [ + 'array' => ':Attribute muss mindestens :min Elemente haben.', + 'numeric' => ':Attribute muss mindestens :min sein.', + 'string' => ':Attribute muss mindestens :min Zeichen lang sein.', + ], + 'numeric' => ':Attribute muss eine Zahl sein.', + 'required' => ':Attribute muss ausgefüllt werden.', + 'string' => ':Attribute muss ein Text sein.', + 'unique' => ':Attribute ist bereits vergeben.', + + 'attributes' => [ + 'today' => 'heute', + ], + +]; diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..7d02c67 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,2419 @@ +{ + "name": "fewo-stommer", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "devDependencies": { + "@tailwindcss/vite": "^4.0.0", + "concurrently": "^10.0.3", + "laravel-vite-plugin": "^3.1", + "tailwindcss": "^4.0.0", + "vite": "^8.0.0" + }, + "optionalDependencies": { + "@laravel/multiplex": "^0.4.1" + } + }, + "node_modules/@alcalzone/ansi-tokenize": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@alcalzone/ansi-tokenize/-/ansi-tokenize-0.3.1.tgz", + "integrity": "sha512-cUD0PT0YX+rImRhfn7BfMRduP/tX/Zqt/N0dHlAyn2RlcJssCb5KsCJkhln61eh9vuJDkH8wKn3L8zJzzWXPFg==", + "license": "MIT", + "optional": true, + "dependencies": { + "ansi-styles": "^6.2.1", + "is-fullwidth-code-point": "^5.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@alcalzone/ansi-tokenize/node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/remapping": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", + "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz", + "integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@laravel/multiplex": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/@laravel/multiplex/-/multiplex-0.4.5.tgz", + "integrity": "sha512-NhDhj4b1/+6j1xYnonzx3vZa39CAUUM7iCAN0xZ5jjcYw3GKORtiXXb0XwXW74wyeVJ25vAvXzfIhy4MXmmzCw==", + "license": "MIT", + "optional": true, + "os": [ + "darwin", + "linux" + ], + "dependencies": { + "ansi-styles": "^7.0.0", + "commander": "^15.0.0", + "ink": "^7.1.0", + "react": "^19.2.7", + "string-width": "^8.2.2", + "wrap-ansi": "^10.0.0" + }, + "bin": { + "multiplex": "dist/cli.js" + }, + "engines": { + "node": ">=22.13.0" + } + }, + "node_modules/@oxc-project/types": { + "version": "0.155.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.155.0.tgz", + "integrity": "sha512-SeE8JPwW1xs1tHeNycjUtUBdhorRa8o4jlvjwk49R7/Z291i+4DQa7JJIgOm/TaYQZx+QrPQbVJ/9c8dMIZN8Q==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/oxc-project" + } + }, + "node_modules/@rolldown/binding-android-arm-eabi": { + "version": "1.2.15", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm-eabi/-/binding-android-arm-eabi-1.2.15.tgz", + "integrity": "sha512-aLcgK9gIJ3YRvrrtfSBbRa27F5WrpiTaPulnFpsHPxpUHgFlSgnU4854MHwoRGEBhfRJDWCS2WQ7lIjskE9Olw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-android-arm64": { + "version": "1.2.15", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.2.15.tgz", + "integrity": "sha512-xD7DdZCrbThKuxNg7ooQmvp07ys4J/pnSEMTG3/OdOWl6daC67m/Q4fL78sRHMxTH/N4fGUbYhcPM0MF5WFHkg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-darwin-arm64": { + "version": "1.2.15", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.2.15.tgz", + "integrity": "sha512-m2WuQ6r0B4OTYxyPpNLtXaMRbRDUbG8YQV2Q3KTdSSK8Th6KHCnC8jVCJt8bvYeSB5WivkkNbc85mKadaSdOxA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-darwin-x64": { + "version": "1.2.15", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.2.15.tgz", + "integrity": "sha512-5RtnsHM36nodM9WbMy+zip0LGS/G+y5wro5RHrpOlr4ac24+1zSi9kiV2MP1myZeZ/ifEHfulQcWjnAXzc2C2A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-freebsd-x64": { + "version": "1.2.15", + "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.2.15.tgz", + "integrity": "sha512-g3l09pyFqhu+135JKkbkwiKGQmwU5hUMUPJ4VdBADvuqR8d33L6H578rh8m7rtxbdp+VmX/+nzI7nvhSZlzpUQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm-gnueabihf": { + "version": "1.2.15", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.2.15.tgz", + "integrity": "sha512-nIe3VugI97nGQtspPxDqA4sXMUpeiocKIP/CqpY/u/vgbT+alX+cVxu1C/oVBPKg4feNTmYovE91v4DgXvXNwQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm64-gnu": { + "version": "1.2.15", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.2.15.tgz", + "integrity": "sha512-iTBjXx+B5QSvgI89lJfmqh4wTh8NabR1YZIIN3hNx4zSG0EVfVqkOvLulNpG4251pbd6/IAmZ/LefVk1Y4rPhw==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm64-musl": { + "version": "1.2.15", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.2.15.tgz", + "integrity": "sha512-uN26XOnVR7rqQupG3V9oAG2EGGatWjcJHOeDOHUFCh4TBWmP2tHTFoVN13aYbwfm0aHqJAEmcwhAu6sooIjfqQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-ppc64-gnu": { + "version": "1.2.15", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.2.15.tgz", + "integrity": "sha512-9nWkcdd+H+XhaA3fQIwpHnKIrfx/PQ6rO0pivr78Og07tXlUlctBBJoEYLPfhTmCR/QxEVdn6uPjHV5SymPhdw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-s390x-gnu": { + "version": "1.2.15", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.2.15.tgz", + "integrity": "sha512-Ggh0ciFjLwIusLSLz7LZYEaGdxOAUJXI+Qu5JCbhPJJHEt8vP+IjRATTJheiJsdzzTYgUiHUiw3X1Ea3ZpMBdA==", + "cpu": [ + "s390x" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-x64-gnu": { + "version": "1.2.15", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.2.15.tgz", + "integrity": "sha512-FHg60rS6DBePAYZ9X9F67x+JObFdmgn6tupA1C/a3B+CufFmTD4mX+e8M75tCiAO3foR/6xwVBI0KQiI7sn/rw==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-x64-musl": { + "version": "1.2.15", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.2.15.tgz", + "integrity": "sha512-/cvV/7v5VGz/moiz0XKRj2dE8DzsKyhIu1KpOvJGPjRywg3yscON889UGvAe8zfiJLHup7VLjBduoGWi3HusWQ==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-openharmony-arm64": { + "version": "1.2.15", + "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.2.15.tgz", + "integrity": "sha512-MyzC5Hrv/sm+Z7TSGKP/j8001RO2xQm1zOpCNVL4j0cY/VhBZviludA2YFQ7i4lH6ZAXxQm0lcMdBzM+99mE7w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-win32-arm64-msvc": { + "version": "1.2.15", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.2.15.tgz", + "integrity": "sha512-+PgYiS+AH5omy6L45ZLxybasauJaj3M8buoT83D+nzPmCayXlxUV9hydhciCKVyIg0B/v0BtXPDE1uGqNwCPpg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-win32-x64-msvc": { + "version": "1.2.15", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.2.15.tgz", + "integrity": "sha512-HFZd2QNQYn1JbIi+Hpd7H+r/lkWxcfIu28nirZ6eCn2LafuvmExMlb/P96Sfx5tf7pPArw39IdhmCF8vmV+NhQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/pluginutils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.1.tgz", + "integrity": "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tailwindcss/node": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.3.3.tgz", + "integrity": "sha512-/T8IKEsf9VTU6tLjgC7+sv2mOPtQxzE2jMw7u4Tt40Tx+QSZxpzh95/H6cMKoja9XuW7iMdLJYBB0o9G1CaAgg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/remapping": "^2.3.5", + "enhanced-resolve": "^5.24.1", + "jiti": "^2.7.0", + "lightningcss": "1.32.0", + "magic-string": "^0.30.21", + "source-map-js": "^1.2.1", + "tailwindcss": "4.3.3" + } + }, + "node_modules/@tailwindcss/oxide": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.3.3.tgz", + "integrity": "sha512-krXjAikiaFSPaK/FkAQT5UTx3VormQaiZ5hBFlJZ9UFQGB/rwg1MZIhHAG9smMQRTdyJxP6Qt5MwMtdyU5FWrA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 20" + }, + "optionalDependencies": { + "@tailwindcss/oxide-android-arm64": "4.3.3", + "@tailwindcss/oxide-darwin-arm64": "4.3.3", + "@tailwindcss/oxide-darwin-x64": "4.3.3", + "@tailwindcss/oxide-freebsd-x64": "4.3.3", + "@tailwindcss/oxide-linux-arm-gnueabihf": "4.3.3", + "@tailwindcss/oxide-linux-arm64-gnu": "4.3.3", + "@tailwindcss/oxide-linux-arm64-musl": "4.3.3", + "@tailwindcss/oxide-linux-x64-gnu": "4.3.3", + "@tailwindcss/oxide-linux-x64-musl": "4.3.3", + "@tailwindcss/oxide-wasm32-wasi": "4.3.3", + "@tailwindcss/oxide-win32-arm64-msvc": "4.3.3", + "@tailwindcss/oxide-win32-x64-msvc": "4.3.3" + } + }, + "node_modules/@tailwindcss/oxide-android-arm64": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.3.3.tgz", + "integrity": "sha512-Y85A2gmPSkl5Ve5qR86GL4HT509cFqQh1aes9p3sSkyTPwt0Pppf3GkwGe4JPACcRYjgJIEhQgM6dBClnr0NYw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-darwin-arm64": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.3.3.tgz", + "integrity": "sha512-BiaWatpBcERQFDlOjRDpIVXuFK5PJez5SA4JMg6VYZdBYU+qKfV/vqjcIs+IYmtitf1xYQZTwXvU/8y4lfZUGw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-darwin-x64": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.3.3.tgz", + "integrity": "sha512-fAeUqfV5ndhxRwai8cXGzdLvul9utWOmeTkv69unv4ZXixjn61Z+p9lCWdwOwA3TYboG3BwdVuN/RDjhBRl0mw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-freebsd-x64": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.3.3.tgz", + "integrity": "sha512-iyf5bV6+wnAlflVeEy7R25dupxTNECZN5QMI0qNT6eT+EgaGdZcKhGkr5SdoaWiLJ3spLqIY9VCeSGrwmtg4kw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.3.3.tgz", + "integrity": "sha512-aAYUprJAJQWWbRrPvtjdroZ56Md+JM8pMiopS6xGEwDfLhqj+2ver2p4nU4Mb3CRqcMmNBjo8KkUgcxhkzVQGQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm64-gnu": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.3.3.tgz", + "integrity": "sha512-nDxldcEENOxZRzC2uu9jrutZdAAQtb+8WWDCSnWL1zvBk1+FN+x6MtDViPB5AJMfttVCUhehGWus3XBPgatM/w==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm64-musl": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.3.3.tgz", + "integrity": "sha512-Md44bD6veX/PC5iyF8cDVnw4HBIANZepRZZ7a8DQOvkfo5WUBwcp6iAuCUz23u+4SUkhJlD3eL7hNdW8ezd/kA==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-gnu": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.3.3.tgz", + "integrity": "sha512-tx7us1muwOKAKWao2v/GaafFeQboE6aj88vC6ziN2NCGcRm8gWUhwjzg+YdVB1e4boAtdtma4L43onunI6NS4w==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-musl": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.3.3.tgz", + "integrity": "sha512-SJxX60smvHgasZoBy11dX6YRjXJFovwWBoedhbQPOBzgFWBHGB+TVPWB9BxzR7TTxU8FQZAI2AyiNCMzFm8Img==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.3.3.tgz", + "integrity": "sha512-jx1+rPhY/5Ympkktd656HBWEBLxP7dH06losBLjjf5vgCODXvi9KhtftWcMIwTFIDqBr7cRnQkdLnAG+IOlGvQ==", + "bundleDependencies": [ + "@napi-rs/wasm-runtime", + "@emnapi/core", + "@emnapi/runtime", + "@tybys/wasm-util", + "@emnapi/wasi-threads", + "tslib" + ], + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/core": "^1.11.1", + "@emnapi/runtime": "^1.11.1", + "@emnapi/wasi-threads": "^1.2.2", + "@napi-rs/wasm-runtime": "^1.1.4", + "@tybys/wasm-util": "^0.10.2", + "tslib": "^2.8.1" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@tailwindcss/oxide-win32-arm64-msvc": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.3.3.tgz", + "integrity": "sha512-3rc292Ca2ceK6Ulcc/bAVnTs/3nDtoPhyEKlgPv+yQJQi/JS/AMJlqzxvlDacL1nekbrcf6bTqp/jV4qgnPxNQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-win32-x64-msvc": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.3.3.tgz", + "integrity": "sha512-yJ0pwIVc/nYeGoV02WtsN8KYyLQv7kyI2wDnkezyJlGGjkd4QLwDGAwl47YpPJeuI0M0ObaXGSPjvWDPeTPggw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/vite": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/vite/-/vite-4.3.3.tgz", + "integrity": "sha512-yYU8cogLeSh/ms2jh8Fj7jaba/EWa7Ja6GoUqYZaraEuCI5YS6ms6ObZgjjedm+jm6XZjdNRWBpPP6Z86oOxcw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@tailwindcss/node": "4.3.3", + "@tailwindcss/oxide": "4.3.3", + "tailwindcss": "4.3.3" + }, + "peerDependencies": { + "vite": "^5.2.0 || ^6 || ^7 || ^8" + } + }, + "node_modules/ansi-escapes": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-7.3.0.tgz", + "integrity": "sha512-BvU8nYgGQBxcmMuEeUEmNTvrMVjJNSH7RgW24vXexN4Ven6qCvy4TntnvlnwnMLTVlcRQQdbRY8NKnaIoeWDNg==", + "license": "MIT", + "optional": true, + "dependencies": { + "environment": "^1.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.4.0.tgz", + "integrity": "sha512-KzTVk2tCWAHtYrvvvaP8bJKJq2pVinhLcGEQdtLIYPbmNGNyYe8QwNaTUYQp2J7/vIsUKt5QCqAfUkYyG9DkOw==", + "devOptional": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/ansi-styles": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-7.0.0.tgz", + "integrity": "sha512-kKvt3m4uwzqL0wlkPd09CmljPJGOZZ4D0fP65sqFSvPkMRKhNi+74MgIJ5QxE6SxqB4t4KyUFGg8+n5zjo6hew==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=22" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/auto-bind": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/auto-bind/-/auto-bind-5.0.1.tgz", + "integrity": "sha512-ooviqdwwgfIfNmDwo94wlshcdzfO64XV0Cg6oDsDYBJfITDz1EngD2z7DkbvCWn+XIMsIqW27sEVF6qcpJrRcg==", + "license": "MIT", + "optional": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/chalk": { + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz", + "integrity": "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==", + "devOptional": true, + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/cli-boxes": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-4.0.1.tgz", + "integrity": "sha512-5IOn+jcCEHEraYolBPs/sT4BxYCe2nHg374OPiItB1O96KZFseS2gthU4twyYzeDcFew4DaUM/xwc5BQf08JJw==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=18.20 <19 || >=20.10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-cursor": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-4.0.0.tgz", + "integrity": "sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==", + "license": "MIT", + "optional": true, + "dependencies": { + "restore-cursor": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-truncate": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-6.1.1.tgz", + "integrity": "sha512-06p9vyLahLa4zkGcgsGxU6iEkSOiuI4fhCH6Emhe2lPAcoUv73n72DnODsnHA+5wwXGnV0n9M9/qOQJSjYhFhw==", + "license": "MIT", + "optional": true, + "dependencies": { + "slice-ansi": "^9.0.0", + "string-width": "^8.2.0" + }, + "engines": { + "node": ">=22" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cliui": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-9.0.1.tgz", + "integrity": "sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^7.2.0", + "strip-ansi": "^7.1.0", + "wrap-ansi": "^9.0.0" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/cliui/node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/cliui/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cliui/node_modules/wrap-ansi": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz", + "integrity": "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/code-excerpt": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/code-excerpt/-/code-excerpt-4.0.0.tgz", + "integrity": "sha512-xxodCmBen3iy2i0WtAK8FlFNrRzjUqjRsMfho58xT/wvZU1YTM3fCnRjcy1gJPMepaRlgm/0e6w8SpWHpn3/cA==", + "license": "MIT", + "optional": true, + "dependencies": { + "convert-to-spaces": "^2.0.1" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, + "node_modules/commander": { + "version": "15.0.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-15.0.0.tgz", + "integrity": "sha512-z67u4ZhzCL/Tydu1lJARtEZYWbWaN7oYLHbsuzocr6y4N6WZAagG3RQ4FW61V1/0+jImpj293XfrcYnd1qxtPg==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=22.12.0" + } + }, + "node_modules/concurrently": { + "version": "10.0.6", + "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-10.0.6.tgz", + "integrity": "sha512-qgICXXFp2/3nAebRLmxcINKEXM1mLK3ij/y31P02VTs/KIkddIeC05n73DxOXsXMB9LFSqNU1/na3lDlOhcbIw==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "5.6.2", + "rxjs": "7.8.2", + "shell-quote": "1.12.0", + "supports-color": "10.2.2", + "tree-kill": "1.2.2", + "yargs": "18.0.0" + }, + "bin": { + "conc": "dist/bin/index.js", + "concurrently": "dist/bin/index.js" + }, + "engines": { + "node": ">=22" + }, + "funding": { + "url": "https://github.com/open-cli-tools/concurrently?sponsor=1" + } + }, + "node_modules/convert-to-spaces": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/convert-to-spaces/-/convert-to-spaces-2.0.1.tgz", + "integrity": "sha512-rcQ1bsQO9799wq24uE5AM2tAILy4gXGIK/njFWcVQkGNZ96edlpY+A7bjwvzjYvLDyzmG1MmMLZhpcsb+klNMQ==", + "license": "MIT", + "optional": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/emoji-regex": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", + "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", + "dev": true, + "license": "MIT" + }, + "node_modules/enhanced-resolve": { + "version": "5.26.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.26.0.tgz", + "integrity": "sha512-9vhedylFonb2YGogzUKX6+Ja72gOJbN1QHAqdrvqLwhdl/QWbKopzoUC9EbQNVsAns/bx/4uyqalrQAoy1IByw==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.3.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/environment": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/environment/-/environment-1.1.0.tgz", + "integrity": "sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/es-toolkit": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/es-toolkit/-/es-toolkit-1.52.0.tgz", + "integrity": "sha512-XTNEJQh1tY1ZJVcf6ayP/2n4ZPyaHlW2FWs7xvw5ddPuhUVjLD3olQVQS7kf58JbAB48iL0uL/jerTrjtV3lDA==", + "license": "MIT", + "optional": true, + "workspaces": [ + "docs", + "benchmarks", + "tests/types", + "tests/browser-compat" + ] + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-east-asian-width": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.7.0.tgz", + "integrity": "sha512-XjH1AECxf0giL2V1aU8vKyRR2ppRUb5c0EvT7zuJTokQ74bNo52zOtghqdWIqrhUD79fo3x0WfKZdOqxF6LG1Q==", + "devOptional": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/indent-string": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz", + "integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ink": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/ink/-/ink-7.1.1.tgz", + "integrity": "sha512-Y43xxa1ZSPvpmfLHcN5o+OdP8Rf8ykkNJEuKYOUNZKT8wXVNLFTtEm1nSDMQkfBH+YANF4Xuu0hhZ4ejqAtN2w==", + "license": "MIT", + "optional": true, + "dependencies": { + "@alcalzone/ansi-tokenize": "^0.3.0", + "ansi-escapes": "^7.3.0", + "ansi-styles": "^6.2.3", + "auto-bind": "^5.0.1", + "chalk": "^5.6.2", + "cli-boxes": "^4.0.1", + "cli-cursor": "^4.0.0", + "cli-truncate": "^6.0.0", + "code-excerpt": "^4.0.0", + "es-toolkit": "^1.45.1", + "indent-string": "^5.0.0", + "is-in-ci": "^2.0.0", + "patch-console": "^2.0.0", + "react-reconciler": "^0.33.0", + "scheduler": "^0.27.0", + "signal-exit": "^3.0.7", + "slice-ansi": "^9.0.0", + "stack-utils": "^2.0.6", + "string-width": "^8.2.0", + "terminal-size": "^4.0.1", + "type-fest": "^5.5.0", + "widest-line": "^6.0.0", + "wrap-ansi": "^10.0.0", + "ws": "^8.20.0", + "yoga-layout": "~3.2.1" + }, + "engines": { + "node": ">=22" + }, + "peerDependencies": { + "@types/react": ">=19.2.0", + "react": ">=19.2.0", + "react-devtools-core": ">=6.1.2" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "react-devtools-core": { + "optional": true + } + } + }, + "node_modules/ink/node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-5.1.0.tgz", + "integrity": "sha512-5XHYaSyiqADb4RnZ1Bdad6cPp8Toise4TzEjcOYDHZkTCbKgiUl7WTUCpNWHuxmDt91wnsZBc9xinNzopv3JMQ==", + "license": "MIT", + "optional": true, + "dependencies": { + "get-east-asian-width": "^1.3.1" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-in-ci": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-in-ci/-/is-in-ci-2.0.0.tgz", + "integrity": "sha512-cFeerHriAnhrQSbpAxL37W1wcJKUUX07HyLWZCW1URJT/ra3GyUTzBgUnh24TMVfNTV2Hij2HLxkPHFZfOZy5w==", + "license": "MIT", + "optional": true, + "bin": { + "is-in-ci": "cli.js" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jiti": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.7.0.tgz", + "integrity": "sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==", + "dev": true, + "license": "MIT", + "bin": { + "jiti": "lib/jiti-cli.mjs" + } + }, + "node_modules/laravel-vite-plugin": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/laravel-vite-plugin/-/laravel-vite-plugin-3.2.0.tgz", + "integrity": "sha512-xSxY9Gzeb/eancd8WeK09piAFP+a6i5QIBqNCKNv9L0Eq6wziwzSem7F1GvMSrtjMh5F/QVKFxn8t9naGOA66A==", + "dev": true, + "license": "MIT", + "dependencies": { + "picocolors": "^1.0.0", + "tinyglobby": "^0.2.12", + "vite-plugin-full-reload": "^1.1.0" + }, + "bin": { + "clean-orphaned-assets": "bin/clean.js" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "peerDependencies": { + "fontaine": "^0.8.0", + "vite": "^8.0.0" + }, + "peerDependenciesMeta": { + "fontaine": { + "optional": true + } + } + }, + "node_modules/lightningcss": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz", + "integrity": "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "detect-libc": "^2.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-android-arm64": "1.32.0", + "lightningcss-darwin-arm64": "1.32.0", + "lightningcss-darwin-x64": "1.32.0", + "lightningcss-freebsd-x64": "1.32.0", + "lightningcss-linux-arm-gnueabihf": "1.32.0", + "lightningcss-linux-arm64-gnu": "1.32.0", + "lightningcss-linux-arm64-musl": "1.32.0", + "lightningcss-linux-x64-gnu": "1.32.0", + "lightningcss-linux-x64-musl": "1.32.0", + "lightningcss-win32-arm64-msvc": "1.32.0", + "lightningcss-win32-x64-msvc": "1.32.0" + } + }, + "node_modules/lightningcss-android-arm64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.32.0.tgz", + "integrity": "sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-arm64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.32.0.tgz", + "integrity": "sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-x64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.32.0.tgz", + "integrity": "sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-freebsd-x64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.32.0.tgz", + "integrity": "sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.32.0.tgz", + "integrity": "sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.32.0.tgz", + "integrity": "sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.32.0.tgz", + "integrity": "sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.32.0.tgz", + "integrity": "sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.32.0.tgz", + "integrity": "sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.32.0.tgz", + "integrity": "sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.32.0.tgz", + "integrity": "sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/magic-string": { + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/nanoid": { + "version": "3.3.20", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.20.tgz", + "integrity": "sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "license": "MIT", + "optional": true, + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/patch-console": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/patch-console/-/patch-console-2.0.0.tgz", + "integrity": "sha512-0YNdUceMdaQwoKce1gatDScmMo5pu/tfABfnzEqeG0gtTmd7mh/WcwgUjtAeOU7N8nFFlbQBnFK2gXW5fGvmMA==", + "license": "MIT", + "optional": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", + "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/postcss": { + "version": "8.5.31", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.31.tgz", + "integrity": "sha512-YUbWYCgErwnMAVkjUnYa+KlMBzGpHwiIt/DE7f0G33AuX2LH9UcTk6KgWxd3zRU+pN3u/C+Xl3EnMLM4Hea7Sg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.20", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/react": { + "version": "19.3.1", + "resolved": "https://registry.npmjs.org/react/-/react-19.3.1.tgz", + "integrity": "sha512-QNhWdt7nrgVWWQG58QuGsAR3jv3Hbe4mb4vz7w2csnHavciZJgda1CPNaldF6eVxv90ud3jUXpKlHL69gO38yw==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-reconciler": { + "version": "0.33.0", + "resolved": "https://registry.npmjs.org/react-reconciler/-/react-reconciler-0.33.0.tgz", + "integrity": "sha512-KetWRytFv1epdpJc3J4G75I4WrplZE5jOL7Yq0p34+OVOKF4Se7WrdIdVC45XsSSmUTlht2FM/fM1FZb1mfQeA==", + "license": "MIT", + "optional": true, + "dependencies": { + "scheduler": "^0.27.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "peerDependencies": { + "react": "^19.2.0" + } + }, + "node_modules/restore-cursor": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-4.0.0.tgz", + "integrity": "sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==", + "license": "MIT", + "optional": true, + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/rolldown": { + "version": "1.2.15", + "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.2.15.tgz", + "integrity": "sha512-6odND+fel5zVw3I4Yc2e69gvguDnX0CAAGiNDZSq4ik5WUcaLrkD2GLuog0XcODbor31hZ5ayEMgVDno+KPV5g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@oxc-project/types": "=0.155.0", + "@rolldown/pluginutils": "^1.0.0" + }, + "bin": { + "rolldown": "bin/cli.mjs" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "optionalDependencies": { + "@rolldown/binding-android-arm-eabi": "1.2.15", + "@rolldown/binding-android-arm64": "1.2.15", + "@rolldown/binding-darwin-arm64": "1.2.15", + "@rolldown/binding-darwin-x64": "1.2.15", + "@rolldown/binding-freebsd-x64": "1.2.15", + "@rolldown/binding-linux-arm-gnueabihf": "1.2.15", + "@rolldown/binding-linux-arm64-gnu": "1.2.15", + "@rolldown/binding-linux-arm64-musl": "1.2.15", + "@rolldown/binding-linux-ppc64-gnu": "1.2.15", + "@rolldown/binding-linux-s390x-gnu": "1.2.15", + "@rolldown/binding-linux-x64-gnu": "1.2.15", + "@rolldown/binding-linux-x64-musl": "1.2.15", + "@rolldown/binding-openharmony-arm64": "1.2.15", + "@rolldown/binding-win32-arm64-msvc": "1.2.15", + "@rolldown/binding-win32-x64-msvc": "1.2.15" + } + }, + "node_modules/rxjs": { + "version": "7.8.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz", + "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/scheduler": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.27.0.tgz", + "integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==", + "license": "MIT", + "optional": true + }, + "node_modules/shell-quote": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.12.0.tgz", + "integrity": "sha512-PcByqNyT/38F2kDNi006HAMRJaULuBzq/FOsw3qdZvX/GA9W/jamDaRskgHjubHiftXK5sIFxLNkvrXUwcof6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "license": "ISC", + "optional": true + }, + "node_modules/slice-ansi": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-9.0.1.tgz", + "integrity": "sha512-aBY19bn/XA+hKOKX0qL7Z0UfdBsbQvc9hn993U8ALUjzxCvDcuZqLoRXjGJrUARWAlwMnsRVD9sw2AFNOYvalA==", + "license": "MIT", + "optional": true, + "dependencies": { + "ansi-styles": "^6.2.3", + "is-fullwidth-code-point": "^5.1.0" + }, + "engines": { + "node": ">=22" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/slice-ansi/node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/source-map-js": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.2.tgz", + "integrity": "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stack-utils": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", + "license": "MIT", + "optional": true, + "dependencies": { + "escape-string-regexp": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/string-width": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-8.3.0.tgz", + "integrity": "sha512-ZbmZM0JCihQN91dWnxoipT2KOEyHqEyfRXUyjuRhW8b/xnqPDoq4gWEVApTVa9db2wN8mmoikgFBbjh71+cGeQ==", + "license": "MIT", + "optional": true, + "dependencies": { + "get-east-asian-width": "^1.5.0", + "strip-ansi": "^7.1.2" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/strip-ansi": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", + "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.2.2" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/supports-color": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-10.2.2.tgz", + "integrity": "sha512-SS+jx45GF1QjgEXQx4NJZV9ImqmO2NPz5FNsIHrsDjh2YsHnawpan7SNQ1o8NuhrbHZy9AZhIoCUiCeaW/C80g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/tagged-tag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/tagged-tag/-/tagged-tag-1.0.0.tgz", + "integrity": "sha512-yEFYrVhod+hdNyx7g5Bnkkb0G6si8HJurOoOEgC8B/O0uXLHlaey/65KRv6cuWBNhBgHKAROVpc7QyYqE5gFng==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/tailwindcss": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.3.3.tgz", + "integrity": "sha512-gOhV3P7ufE62QDGg1zVaTgCR+EtPv92k2nIhVcVKcLmxT1sUBsQGhnZj175j+MqRt4zLF7ic+sCYjfhxMxj7YQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/tapable": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.3.tgz", + "integrity": "sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/terminal-size": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/terminal-size/-/terminal-size-4.0.1.tgz", + "integrity": "sha512-avMLDQpUI9I5XFrklECw1ZEUPJhqzcwSWsyyI8blhRLT+8N1jLJWLWWYQpB2q2xthq8xDvjZPISVh53T/+CLYQ==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/tinyglobby": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", + "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true, + "license": "MIT", + "bin": { + "tree-kill": "cli.js" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "dev": true, + "license": "0BSD" + }, + "node_modules/type-fest": { + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-5.10.0.tgz", + "integrity": "sha512-NoSdpq/WEiAg5sjmBkmV/hfxv6HJH4NqPNrqjtSO5CwRmpsDfaf4begxW34KdJykH/l1yHtwBWQkCRdoXO8mPA==", + "license": "(MIT OR CC0-1.0)", + "optional": true, + "dependencies": { + "tagged-tag": "^1.0.0" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/vite": { + "version": "8.3.5", + "resolved": "https://registry.npmjs.org/vite/-/vite-8.3.5.tgz", + "integrity": "sha512-z1YpjieJ9g0ebTmQpLBv/oq9E3F9EIlOe+7LahW8SrE3LTiG3udBRUXQOlYXP9b+IC2q2phHeVxj9xGlw34OEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "lightningcss": "^1.33.0", + "picomatch": "^4.0.7", + "postcss": "^8.5.30", + "rolldown": "~1.2.14", + "tinyglobby": "^0.2.17" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^20.19.0 || >=22.12.0", + "@vitejs/devtools": "^0.7.1 || ^0.8.0", + "esbuild": "^0.27.0 || ^0.28.0", + "jiti": ">=1.21.0", + "less": "^4.0.0", + "sass": "^1.70.0", + "sass-embedded": "^1.70.0", + "stylus": ">=0.54.8", + "sugarss": "^5.0.0", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "@vitejs/devtools": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/vite-plugin-full-reload": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/vite-plugin-full-reload/-/vite-plugin-full-reload-1.2.0.tgz", + "integrity": "sha512-kz18NW79x0IHbxRSHm0jttP4zoO9P9gXh+n6UTwlNKnviTTEpOlum6oS9SmecrTtSr+muHEn5TUuC75UovQzcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "picocolors": "^1.0.0", + "picomatch": "^2.3.1" + } + }, + "node_modules/vite-plugin-full-reload/node_modules/picomatch": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/vite/node_modules/lightningcss": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.33.0.tgz", + "integrity": "sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "detect-libc": "^2.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-android-arm64": "1.33.0", + "lightningcss-darwin-arm64": "1.33.0", + "lightningcss-darwin-x64": "1.33.0", + "lightningcss-freebsd-x64": "1.33.0", + "lightningcss-linux-arm-gnueabihf": "1.33.0", + "lightningcss-linux-arm64-gnu": "1.33.0", + "lightningcss-linux-arm64-musl": "1.33.0", + "lightningcss-linux-x64-gnu": "1.33.0", + "lightningcss-linux-x64-musl": "1.33.0", + "lightningcss-win32-arm64-msvc": "1.33.0", + "lightningcss-win32-x64-msvc": "1.33.0" + } + }, + "node_modules/vite/node_modules/lightningcss-android-arm64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.33.0.tgz", + "integrity": "sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/vite/node_modules/lightningcss-darwin-arm64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.33.0.tgz", + "integrity": "sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/vite/node_modules/lightningcss-darwin-x64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.33.0.tgz", + "integrity": "sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/vite/node_modules/lightningcss-freebsd-x64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.33.0.tgz", + "integrity": "sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/vite/node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.33.0.tgz", + "integrity": "sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/vite/node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.33.0.tgz", + "integrity": "sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/vite/node_modules/lightningcss-linux-arm64-musl": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.33.0.tgz", + "integrity": "sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/vite/node_modules/lightningcss-linux-x64-gnu": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.33.0.tgz", + "integrity": "sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/vite/node_modules/lightningcss-linux-x64-musl": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.33.0.tgz", + "integrity": "sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/vite/node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.33.0.tgz", + "integrity": "sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/vite/node_modules/lightningcss-win32-x64-msvc": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.33.0.tgz", + "integrity": "sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/widest-line": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-6.0.0.tgz", + "integrity": "sha512-U89AsyEeAsyoF0zVJBkG9zBgekjgjK7yk9sje3F4IQpXBJ10TF6ByLlIfjMhcmHMJgHZI4KHt4rdNfktzxIAMA==", + "license": "MIT", + "optional": true, + "dependencies": { + "string-width": "^8.1.0" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/wrap-ansi": { + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-10.0.2.tgz", + "integrity": "sha512-6OLRNZqRntVGBm26ghZ5eZhCuWWyOkRCSn8XsOIuq5stpCE/tjLbdozd93naILZig0lmD8ANfRwnhn0DLeXGlg==", + "license": "MIT", + "optional": true, + "dependencies": { + "ansi-styles": "^6.2.3", + "string-width": "^8.2.0" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/ws": { + "version": "8.22.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.22.0.tgz", + "integrity": "sha512-Ydggc987+RO0AnWtZ/7Wq9FtNvcrL1b/RO0ud9mWjUPgDrsAAwQSF51sm2hm1XofbU/4jkpGEsLFsZZxU+1DOg==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs": { + "version": "18.0.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-18.0.0.tgz", + "integrity": "sha512-4UEqdc2RYGHZc7Doyqkrqiln3p9X2DZVxaGbwhn2pi7MrRagKaOcIKe8L3OxYcbhXLgLFUS3zAYuQjKBQgmuNg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^9.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "string-width": "^7.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^22.0.0" + }, + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=23" + } + }, + "node_modules/yargs-parser": { + "version": "22.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-22.0.0.tgz", + "integrity": "sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=23" + } + }, + "node_modules/yargs/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/yoga-layout": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/yoga-layout/-/yoga-layout-3.2.1.tgz", + "integrity": "sha512-0LPOt3AxKqMdFBZA3HBAt/t/8vIKq7VaQYbuA8WxCgung+p9TVyKRYdpvCb80HcdTN2NkbIKbhNwKUfm3tQywQ==", + "license": "MIT", + "optional": true + } + } +} diff --git a/resources/css/app.css b/resources/css/app.css index 54b247e..e8d4331 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -4,6 +4,34 @@ @source '../../storage/framework/views/*.php'; @theme { - --font-sans: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', - 'Segoe UI Symbol', 'Noto Color Emoji'; + --font-sans: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; + + --color-sea-50: oklch(0.97 0.015 230); + --color-sea-100: oklch(0.93 0.035 230); + --color-sea-700: oklch(0.45 0.11 235); + --color-sea-800: oklch(0.38 0.1 237); + --color-sea-900: oklch(0.3 0.08 240); + + --color-sand-50: oklch(0.985 0.008 85); +} + +@layer base { + input:not([type='checkbox']):not([type='radio']), + select, + textarea { + border-width: 1px; + padding: 0.5rem 0.75rem; + background-color: white; + } + + input[type='checkbox'] { + width: 1rem; + height: 1rem; + accent-color: var(--color-sea-700); + } + + :focus-visible { + outline: 2px solid var(--color-sea-700); + outline-offset: 2px; + } } diff --git a/resources/views/booking.blade.php b/resources/views/booking.blade.php new file mode 100644 index 0000000..44a6741 --- /dev/null +++ b/resources/views/booking.blade.php @@ -0,0 +1,11 @@ + +

Preise & Buchung

+

+ Wählen Sie im Kalender Ihren Anreise- und Abreisetag. Sie sehen sofort den Gesamtpreis inklusive aller Nebenkosten. + Ihre Anfrage ist unverbindlich – wir halten den Termin für Sie vor und bestätigen kurzfristig. +

+ +
+ +
+
diff --git a/resources/views/components/layouts/site.blade.php b/resources/views/components/layouts/site.blade.php new file mode 100644 index 0000000..65c06b9 --- /dev/null +++ b/resources/views/components/layouts/site.blade.php @@ -0,0 +1,39 @@ +@props(['title' => null, 'description' => null]) + + + + + + {{ $title ? $title.' · ' : '' }}Ferienwohnung Stommer in Kühlungsborn + @if ($description) + + @endif + @vite(['resources/css/app.css', 'resources/js/app.js']) + @livewireStyles + + + Zum Inhalt springen + +
+ +
+ +
+ {{ $slot }} +
+ + + + @livewireScripts + + diff --git a/resources/views/livewire/booking-request.blade.php b/resources/views/livewire/booking-request.blade.php new file mode 100644 index 0000000..98f7492 --- /dev/null +++ b/resources/views/livewire/booking-request.blade.php @@ -0,0 +1,211 @@ +
+ @if ($booking) +
+

Vielen Dank, {{ $booking->guest->first_name }}!

+

+ Ihre Anfrage {{ $booking->reference }} ist eingegangen. Wir haben den Zeitraum + {{ $booking->arrival->format('d.m.Y') }} – {{ $booking->departure->format('d.m.Y') }} + bis {{ $booking->hold_expires_at->format('d.m.Y, H:i') }} Uhr für Sie vorgemerkt. +

+

Eine Bestätigung mit allen Details haben wir an {{ $booking->guest->email }} gesendet.

+
+ @else +
+ {{-- Calendar --}} +
+
+
+

Belegung

+
+ + +
+
+ +
+ @foreach ($this->calendar as $month) +
+

{{ $month['label'] }}

+ + + + @foreach (['Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa', 'So'] as $weekday) + + @endforeach + + + + @foreach ($month['weeks'] as $week) + + @foreach (array_pad($week, 7, null) as $day) + + @endforeach + + @endforeach + +
{{ $weekday }}
+ @if ($day) + + @endif +
+
+ @endforeach +
+ +
+ frei + Nacht belegt (Abreise möglich) + Ihre Auswahl +
+
+ +
+ + + +
+ @error('arrival') @enderror + @error('departure') @enderror +
+ + {{-- Price and form --}} +
+
+

Ihr Preis

+ + @php($pricing = $this->pricing) + @if ($pricing['error']) +

{{ $pricing['error'] }}

+ @elseif ($pricing['quote']) + @php($quote = $pricing['quote']) +

+ {{ $quote->arrival->format('d.m.Y') }} – {{ $quote->departure->format('d.m.Y') }} · {{ $quote->nights() }} Nächte · {{ $quote->guests }} {{ $quote->guests === 1 ? 'Person' : 'Personen' }} + +

+
+ @foreach ($quote->lines as $line) +
$line->amount < 0])> +
{{ $line->label }}
+
{{ \App\Support\Money::format($line->amount) }}
+
+ @endforeach +
+
Gesamtpreis
+
{{ \App\Support\Money::format($quote->total()) }}
+
+
+

+ Anzahlung {{ \App\Support\Money::format($quote->deposit()) }}, Rest bis {{ $quote->balanceDueOn->format('d.m.Y') }}. Kurtaxe wird vor Ort berechnet. +

+ @if ($quote->promoCodeApplied === false) +

Der Aktionscode ist für diesen Zeitraum nicht gültig.

+ @endif + @else +

Bitte wählen Sie im Kalender Anreise und Abreise.

+ @endif + + @if ($this->availableExtras->isNotEmpty()) +
+ Zusatzleistungen +
+ @foreach ($this->availableExtras as $extra) + + @endforeach +
+
+ @endif + + +
+ +
+

Unverbindlich anfragen

+ +
+ @foreach ([ + ['firstName', 'Vorname', 'text', 'given-name', true], + ['lastName', 'Nachname', 'text', 'family-name', true], + ['email', 'E-Mail', 'email', 'email', true], + ['phone', 'Telefon', 'tel', 'tel', false], + ['street', 'Straße & Hausnr.', 'text', 'street-address', false], + ['postalCode', 'PLZ', 'text', 'postal-code', false], + ['city', 'Ort', 'text', 'address-level2', false], + ] as [$field, $label, $type, $autocomplete, $required]) + + @endforeach +
+ + + + + + + @error('privacyAccepted')

{{ $message }}

@enderror + + +

Kostenlos und unverbindlich. Verbindlich wird die Buchung erst mit unserer Bestätigung.

+
+
+
+ @endif +
diff --git a/resources/views/mail/booking-confirmed.blade.php b/resources/views/mail/booking-confirmed.blade.php new file mode 100644 index 0000000..20d4752 --- /dev/null +++ b/resources/views/mail/booking-confirmed.blade.php @@ -0,0 +1,34 @@ + +# Ihre Buchung ist bestätigt! + +Guten Tag {{ $booking->guest->full_name }}, + +wir freuen uns, Ihre Buchung der **{{ $booking->property->name }}** verbindlich zu bestätigen. + +**Anreise:** {{ $booking->arrival->translatedFormat('l, d.m.Y') }}@if ($booking->property->check_in_time) ab {{ substr($booking->property->check_in_time, 0, 5) }} Uhr @endif
+**Abreise:** {{ $booking->departure->translatedFormat('l, d.m.Y') }}@if ($booking->property->check_out_time) bis {{ substr($booking->property->check_out_time, 0, 5) }} Uhr @endif
+**Personen:** {{ $booking->guests }}
+**Buchungsnummer:** {{ $booking->reference }} + +@include('mail.partials.quote') + +## Zahlung + +Bitte überweisen Sie die Anzahlung von **{{ \App\Support\Money::format($booking->deposit) }}** innerhalb von {{ config('fewo.deposit_due_days') }} Tagen und den Restbetrag von **{{ \App\Support\Money::format($booking->total - $booking->deposit) }}** bis zum {{ $booking->balance_due_on->format('d.m.Y') }}. + +@if (config('fewo.bank.iban')) + +Kontoinhaber: {{ config('fewo.bank.account_holder') }}
+IBAN: {{ config('fewo.bank.iban') }}
+@if (config('fewo.bank.bic')) +BIC: {{ config('fewo.bank.bic') }}
+@endif +Verwendungszweck: {{ $booking->reference }} +
+@endif + +Rechtzeitig vor Ihrer Anreise erhalten Sie von uns alle Informationen zu Schlüsselübergabe, Parken und WLAN. + +Herzliche Grüße
+{{ config('fewo.owner.name') }} +
diff --git a/resources/views/mail/booking-declined.blade.php b/resources/views/mail/booking-declined.blade.php new file mode 100644 index 0000000..795986d --- /dev/null +++ b/resources/views/mail/booking-declined.blade.php @@ -0,0 +1,16 @@ + +# Ihre Anfrage {{ $booking->reference }} + +Guten Tag {{ $booking->guest->full_name }}, + +vielen Dank für Ihr Interesse an der **{{ $booking->property->name }}**. Leider können wir Ihnen den Zeitraum vom {{ $booking->arrival->format('d.m.Y') }} bis {{ $booking->departure->format('d.m.Y') }} nicht anbieten. + +Vielleicht passt ein anderer Termin? Die freien Zeiträume finden Sie jederzeit in unserem Belegungskalender. + + +Freie Termine ansehen + + +Herzliche Grüße
+{{ config('fewo.owner.name') }} +
diff --git a/resources/views/mail/new-reservation.blade.php b/resources/views/mail/new-reservation.blade.php new file mode 100644 index 0000000..4e51215 --- /dev/null +++ b/resources/views/mail/new-reservation.blade.php @@ -0,0 +1,25 @@ + +# Neue Anfrage {{ $booking->reference }} + +**{{ $booking->guest->full_name }}** möchte die **{{ $booking->property->name }}** buchen. + +**Zeitraum:** {{ $booking->arrival->format('d.m.Y') }} – {{ $booking->departure->format('d.m.Y') }} ({{ $booking->nights() }} Nächte)
+**Personen:** {{ $booking->guests }}
+**E-Mail:** {{ $booking->guest->email }}
+**Telefon:** {{ $booking->guest->phone ?: '–' }}
+@if ($booking->promo_code) +**Aktionscode:** {{ $booking->promo_code }}
+@endif +**Vorgemerkt bis:** {{ $booking->hold_expires_at->format('d.m.Y, H:i') }} Uhr + +@include('mail.partials.quote') + +@if ($booking->message) +**Nachricht des Gastes:**
+{{ $booking->message }} +@endif + + +Anfrage bestätigen oder ablehnen + +
diff --git a/resources/views/mail/partials/quote.blade.php b/resources/views/mail/partials/quote.blade.php new file mode 100644 index 0000000..9c0ed07 --- /dev/null +++ b/resources/views/mail/partials/quote.blade.php @@ -0,0 +1,13 @@ + +| Leistung | Betrag | +|:---------|-------:| +@foreach ($booking->quote['lines'] as $line) +| {{ $line['label'] }} | {{ \App\Support\Money::format($line['amount']) }} | +@endforeach +| **Gesamtpreis** | **{{ \App\Support\Money::format($booking->total) }}** | + + +Anzahlung ({{ $booking->property->deposit_percent }} % der Miete): **{{ \App\Support\Money::format($booking->deposit) }}**
+Restzahlung: **{{ \App\Support\Money::format($booking->total - $booking->deposit) }}**, fällig bis {{ $booking->balance_due_on->format('d.m.Y') }} + +Die Kurtaxe ist nicht enthalten und wird vor Ort entrichtet. diff --git a/resources/views/mail/reservation-expired.blade.php b/resources/views/mail/reservation-expired.blade.php new file mode 100644 index 0000000..d023dbd --- /dev/null +++ b/resources/views/mail/reservation-expired.blade.php @@ -0,0 +1,11 @@ + +# Vormerkung abgelaufen + +Die Anfrage **{{ $booking->reference }}** von {{ $booking->guest->full_name }} ({{ $booking->arrival->format('d.m.Y') }} – {{ $booking->departure->format('d.m.Y') }}) wurde nicht rechtzeitig bestätigt. Der Zeitraum ist im Kalender wieder frei. + +Sie können die Anfrage weiterhin bestätigen, sofern der Zeitraum noch frei ist. + + +Anfrage öffnen + + diff --git a/resources/views/mail/reservation-received.blade.php b/resources/views/mail/reservation-received.blade.php new file mode 100644 index 0000000..b309b21 --- /dev/null +++ b/resources/views/mail/reservation-received.blade.php @@ -0,0 +1,26 @@ + +# Vielen Dank für Ihre Anfrage! + +Guten Tag {{ $booking->guest->full_name }}, + +wir haben Ihre Anfrage für die **{{ $booking->property->name }}** erhalten und den Zeitraum für Sie **bis {{ $booking->hold_expires_at->format('d.m.Y, H:i') }} Uhr vorgemerkt**. + +**Anreise:** {{ $booking->arrival->translatedFormat('l, d.m.Y') }}
+**Abreise:** {{ $booking->departure->translatedFormat('l, d.m.Y') }}
+**Personen:** {{ $booking->guests }}
+**Anfragenummer:** {{ $booking->reference }} + +@include('mail.partials.quote') + +Wir prüfen Ihre Anfrage und melden uns in Kürze mit der Buchungsbestätigung. Erst mit unserer Bestätigung ist die Buchung verbindlich. + +@if ($booking->message) +**Ihre Nachricht:**
+{{ $booking->message }} +@endif + +Bei Fragen antworten Sie einfach auf diese E-Mail oder rufen Sie uns an: {{ config('fewo.owner.phone') }} + +Herzliche Grüße
+{{ config('fewo.owner.name') }} +
diff --git a/resources/views/welcome.blade.php b/resources/views/welcome.blade.php index 26e294a..22d6130 100644 --- a/resources/views/welcome.blade.php +++ b/resources/views/welcome.blade.php @@ -6,7 +6,6 @@ {{ config('app.name', 'Laravel') }} - @fonts @if (file_exists(public_path('build/manifest.json')) || file_exists(public_path('hot'))) diff --git a/routes/console.php b/routes/console.php index 3c9adf1..276d356 100644 --- a/routes/console.php +++ b/routes/console.php @@ -1,8 +1,5 @@ comment(Inspiring::quote()); -})->purpose('Display an inspiring quote'); +Schedule::command('bookings:expire-holds')->everyFiveMinutes()->withoutOverlapping(); diff --git a/routes/web.php b/routes/web.php index 86a06c5..bcadba9 100644 --- a/routes/web.php +++ b/routes/web.php @@ -5,3 +5,5 @@ Route::get('/', function () { return view('welcome'); }); + +Route::view('/buchen', 'booking')->name('booking.create'); diff --git a/tests/Feature/BookingAdminTest.php b/tests/Feature/BookingAdminTest.php new file mode 100644 index 0000000..1d68418 --- /dev/null +++ b/tests/Feature/BookingAdminTest.php @@ -0,0 +1,158 @@ +travelTo(CarbonImmutable::parse('2026-10-22 10:00')); + $this->seed(PropertySeeder::class); + $this->property = Property::sole(); + $this->actingAs(User::factory()->create()); + Mail::fake(); + } + + public function test_booking_pages_render(): void + { + $booking = Booking::factory()->for($this->property)->reserved()->create(); + + $this->get(BookingResource::getUrl('index'))->assertOk()->assertSee($booking->reference); + $this->get(BookingResource::getUrl('view', ['record' => $booking]))->assertOk()->assertSee($booking->guest->email); + $this->get(GuestResource::getUrl('index'))->assertOk()->assertSee($booking->guest->email); + Livewire::test(ListBookings::class)->assertCanSeeTableRecords([$booking]); + } + + public function test_landlord_confirms_a_reservation(): void + { + $booking = Booking::factory()->for($this->property)->reserved()->create(); + + Livewire::test(ViewBooking::class, ['record' => $booking->getRouteKey()]) + ->callAction('confirm', ['notify' => true]) + ->assertNotified('Buchung bestätigt'); + + $this->assertSame(BookingStatus::Confirmed, $booking->fresh()->status); + Mail::assertSent(BookingConfirmed::class); + } + + public function test_landlord_declines_without_notifying_the_guest(): void + { + $booking = Booking::factory()->for($this->property)->reserved()->create(); + + Livewire::test(ViewBooking::class, ['record' => $booking->getRouteKey()]) + ->callAction('decline', ['notify' => false]); + + $this->assertSame(BookingStatus::Declined, $booking->fresh()->status); + Mail::assertNotSent(BookingDeclined::class); + } + + public function test_hold_can_be_extended(): void + { + $booking = Booking::factory()->for($this->property)->reserved(now()->addHours(2))->create(); + + Livewire::test(ViewBooking::class, ['record' => $booking->getRouteKey()]) + ->callAction('extendHold', ['hours' => 24]); + + $this->assertSame('2026-10-23 12:00', $booking->fresh()->hold_expires_at->format('Y-m-d H:i')); + } + + public function test_phone_booking_is_entered_and_confirmed_with_calculated_price(): void + { + Livewire::test(CreateBooking::class) + ->fillForm([ + 'property_id' => $this->property->id, + 'guests' => 2, + 'arrival' => '2026-11-07', + 'departure' => '2026-11-10', + 'first_name' => 'Peter', + 'last_name' => 'Telefon', + 'email' => 'peter@example.com', + 'confirm_immediately' => true, + 'send_mails' => false, + ]) + ->call('create') + ->assertHasNoFormErrors(); + + $booking = Booking::sole(); + $this->assertSame([BookingStatus::Confirmed, 'manual', 3 * 6500 + 10800], [$booking->status, $booking->source, $booking->total]); + Mail::assertNothingSent(); + } + + public function test_phone_booking_for_occupied_dates_is_refused(): void + { + Booking::factory()->for($this->property)->create(['arrival' => '2026-11-08', 'departure' => '2026-11-12']); + + Livewire::test(CreateBooking::class) + ->fillForm([ + 'property_id' => $this->property->id, + 'guests' => 2, + 'arrival' => '2026-11-07', + 'departure' => '2026-11-10', + 'first_name' => 'Peter', + 'last_name' => 'Telefon', + 'email' => 'peter@example.com', + ]) + ->call('create') + ->assertNotified('Buchung nicht möglich'); + + $this->assertSame(1, Booking::count()); + } + + public function test_special_offer_with_euro_value_is_stored_in_cents(): void + { + Livewire::test(SpecialOffersRelationManager::class, ['ownerRecord' => $this->property, 'pageClass' => EditProperty::class]) + ->callAction(TestAction::make(CreateAction::class)->table(), [ + 'name' => 'Special Weekend', + 'discount_type' => 'nightly_rate', + 'discount_value' => '59.50', + 'arrival_weekdays' => [5], + 'season_names' => ['Winter'], + ]) + ->assertHasNoFormErrors(); + + $offer = $this->property->specialOffers()->sole(); + $this->assertSame([5950, ['5'], ['Winter']], [$offer->discount_value, array_map('strval', $offer->arrival_weekdays), $offer->season_names]); + } + + public function test_blocked_period_is_created(): void + { + Livewire::test(BlockedPeriodsRelationManager::class, ['ownerRecord' => $this->property, 'pageClass' => EditProperty::class]) + ->callAction(TestAction::make(CreateAction::class)->table(), [ + 'starts_on' => '2026-12-01', + 'ends_on' => '2026-12-05', + 'reason' => 'Eigennutzung', + ]) + ->assertHasNoFormErrors(); + + $this->assertSame(1, $this->property->blockedPeriods()->count()); + } +} diff --git a/tests/Feature/BookingRequestPageTest.php b/tests/Feature/BookingRequestPageTest.php new file mode 100644 index 0000000..2efe461 --- /dev/null +++ b/tests/Feature/BookingRequestPageTest.php @@ -0,0 +1,113 @@ +travelTo(CarbonImmutable::parse('2026-10-22 10:00')); + $this->seed(PropertySeeder::class); + Mail::fake(); + } + + public function test_booking_page_renders(): void + { + $this->withoutVite() + ->get(route('booking.create')) + ->assertOk() + ->assertSee('Preise & Buchung', false) + ->assertSeeLivewire(BookingRequest::class); + } + + public function test_selecting_dates_shows_the_live_price(): void + { + Livewire::test(BookingRequest::class) + ->call('selectDate', '2026-11-07') + ->call('selectDate', '2026-11-10') + ->assertSet('arrival', '2026-11-07') + ->assertSet('departure', '2026-11-10') + ->assertSee('Gesamtpreis') + ->assertSee('303,00'); + } + + public function test_occupied_nights_cannot_be_selected_as_arrival_and_ranges_over_them_are_refused(): void + { + Booking::factory()->for(Property::sole())->create(['arrival' => '2026-11-10', 'departure' => '2026-11-14']); + + Livewire::test(BookingRequest::class) + ->call('selectDate', '2026-11-11') + ->assertSet('arrival', null) + ->call('selectDate', '2026-11-08') + ->call('selectDate', '2026-11-12') + ->assertSet('departure', null) + ->assertSet('arrival', '2026-11-08') + ->call('selectDate', '2026-11-10') + ->assertSet('departure', '2026-11-10'); + } + + public function test_minimum_stay_is_explained_to_the_guest(): void + { + Livewire::test(BookingRequest::class) + ->set('arrival', '2026-12-26') + ->set('departure', '2026-12-28') + ->assertSee('Mindestaufenthalt 6 Nächte'); + } + + public function test_guest_submits_a_request(): void + { + Livewire::test(BookingRequest::class) + ->set('arrival', '2026-11-07') + ->set('departure', '2026-11-10') + ->set('firstName', 'Anna') + ->set('lastName', 'Muster') + ->set('email', 'anna@example.com') + ->set('privacyAccepted', true) + ->call('submit') + ->assertHasNoErrors() + ->assertSee('Vielen Dank, Anna!'); + + $this->assertSame(BookingStatus::Reserved, Booking::sole()->status); + } + + public function test_request_requires_contact_data_and_consent(): void + { + Livewire::test(BookingRequest::class) + ->set('arrival', '2026-11-07') + ->set('departure', '2026-11-10') + ->call('submit') + ->assertHasErrors(['firstName', 'lastName', 'email', 'privacyAccepted']); + + $this->assertSame(0, Booking::count()); + } + + public function test_honeypot_silently_drops_spam(): void + { + Livewire::test(BookingRequest::class) + ->set('arrival', '2026-11-07') + ->set('departure', '2026-11-10') + ->set('firstName', 'Spam') + ->set('lastName', 'Bot') + ->set('email', 'bot@example.com') + ->set('privacyAccepted', true) + ->set('website', 'http://spam.example') + ->call('submit'); + + $this->assertSame(0, Booking::count()); + } +} diff --git a/tests/Feature/PriceCalculatorTest.php b/tests/Feature/PriceCalculatorTest.php index 13cfeed..d26b4c6 100644 --- a/tests/Feature/PriceCalculatorTest.php +++ b/tests/Feature/PriceCalculatorTest.php @@ -9,6 +9,7 @@ use App\Models\Season; use App\Pricing\PriceCalculator; use App\Pricing\QuoteException; +use App\Pricing\StayRequest; use Carbon\CarbonImmutable; use Database\Seeders\PropertySeeder; use Illuminate\Foundation\Testing\RefreshDatabase; @@ -47,7 +48,7 @@ public function test_totals_match_the_previous_price_list(string $arrival, strin { $this->seed(PropertySeeder::class); - $quote = $this->calculator->calculate(Property::sole(), CarbonImmutable::parse($arrival), CarbonImmutable::parse($departure), 2); + $quote = $this->calculator->calculate(Property::sole(), new StayRequest(CarbonImmutable::parse($arrival), CarbonImmutable::parse($departure), 2)); $this->assertSame($expectedTotal, $quote->total()); } @@ -56,7 +57,7 @@ public function test_stay_across_two_seasons_is_split_per_season(): void { $this->seed(PropertySeeder::class); - $quote = $this->calculator->calculate(Property::sole(), CarbonImmutable::parse('2026-06-18'), CarbonImmutable::parse('2026-06-22'), 2); + $quote = $this->calculator->calculate(Property::sole(), new StayRequest(CarbonImmutable::parse('2026-06-18'), CarbonImmutable::parse('2026-06-22'), 2)); $accommodation = array_values(array_filter($quote->lines, fn ($line) => $line->type === QuoteLineType::Accommodation)); $this->assertCount(2, $accommodation); @@ -69,7 +70,7 @@ public function test_deposit_is_a_share_of_the_rent_and_balance_is_due_before_ar { $property = $this->propertyWithSeason(nightlyRate: 5500, cleaningFee: 10800, depositPercent: 35); - $quote = $this->calculator->calculate($property, CarbonImmutable::parse('2026-03-10'), CarbonImmutable::parse('2026-03-13'), 3); + $quote = $this->calculator->calculate($property, new StayRequest(CarbonImmutable::parse('2026-03-10'), CarbonImmutable::parse('2026-03-13'), 3)); $rent = 3 * 5500 + 3 * 750; $this->assertSame($rent, $quote->rent()); @@ -84,10 +85,10 @@ public function test_extras_are_priced_per_item_or_per_night(): void $linen = Extra::factory()->for($property)->create(['price' => 1400, 'pricing' => ExtraPricing::PerItem]); $babyBed = Extra::factory()->for($property)->create(['price' => 300, 'pricing' => ExtraPricing::PerNight]); - $quote = $this->calculator->calculate($property, CarbonImmutable::parse('2026-03-10'), CarbonImmutable::parse('2026-03-14'), 2, [ + $quote = $this->calculator->calculate($property, new StayRequest(CarbonImmutable::parse('2026-03-10'), CarbonImmutable::parse('2026-03-14'), 2, [ $linen->id => 2, $babyBed->id => 1, - ]); + ])); $extras = array_values(array_filter($quote->lines, fn ($line) => $line->type === QuoteLineType::Extra)); $this->assertSame([2 * 1400, 4 * 300], array_map(fn ($line) => $line->amount, $extras)); @@ -100,7 +101,7 @@ public function test_minimum_stay_of_the_arrival_season_is_enforced(): void $this->expectException(QuoteException::class); $this->expectExceptionMessage('Mindestaufenthalt 3 Nächte'); - $this->calculator->calculate(Property::sole(), CarbonImmutable::parse('2026-08-29'), CarbonImmutable::parse('2026-08-31'), 2); + $this->calculator->calculate(Property::sole(), new StayRequest(CarbonImmutable::parse('2026-08-29'), CarbonImmutable::parse('2026-08-31'), 2)); } public function test_nights_without_a_season_cannot_be_priced(): void @@ -110,7 +111,7 @@ public function test_nights_without_a_season_cannot_be_priced(): void $this->expectException(QuoteException::class); $this->expectExceptionMessage('01.04.2026'); - $this->calculator->calculate($property, CarbonImmutable::parse('2026-03-30'), CarbonImmutable::parse('2026-04-02'), 2); + $this->calculator->calculate($property, new StayRequest(CarbonImmutable::parse('2026-03-30'), CarbonImmutable::parse('2026-04-02'), 2)); } public function test_guest_count_is_limited_by_the_property(): void @@ -119,7 +120,7 @@ public function test_guest_count_is_limited_by_the_property(): void $this->expectException(QuoteException::class); - $this->calculator->calculate($property, CarbonImmutable::parse('2026-03-10'), CarbonImmutable::parse('2026-03-12'), $property->max_guests + 1); + $this->calculator->calculate($property, new StayRequest(CarbonImmutable::parse('2026-03-10'), CarbonImmutable::parse('2026-03-12'), $property->max_guests + 1)); } public function test_departure_must_be_after_arrival(): void @@ -128,7 +129,7 @@ public function test_departure_must_be_after_arrival(): void $this->expectException(QuoteException::class); - $this->calculator->calculate($property, CarbonImmutable::parse('2026-03-10'), CarbonImmutable::parse('2026-03-10'), 2); + $this->calculator->calculate($property, new StayRequest(CarbonImmutable::parse('2026-03-10'), CarbonImmutable::parse('2026-03-10'), 2)); } public function test_inactive_extras_cannot_be_booked(): void @@ -138,7 +139,7 @@ public function test_inactive_extras_cannot_be_booked(): void $this->expectException(QuoteException::class); - $this->calculator->calculate($property, CarbonImmutable::parse('2026-03-10'), CarbonImmutable::parse('2026-03-12'), 2, [$extra->id => 1]); + $this->calculator->calculate($property, new StayRequest(CarbonImmutable::parse('2026-03-10'), CarbonImmutable::parse('2026-03-12'), 2, [$extra->id => 1])); } /** diff --git a/tests/Feature/ReservationWorkflowTest.php b/tests/Feature/ReservationWorkflowTest.php new file mode 100644 index 0000000..5c14595 --- /dev/null +++ b/tests/Feature/ReservationWorkflowTest.php @@ -0,0 +1,154 @@ +travelTo(CarbonImmutable::parse('2026-10-22 10:00')); + $this->seed(PropertySeeder::class); + $this->property = Property::sole(); + Mail::fake(); + } + + public function test_active_reservations_and_blocked_periods_occupy_the_calendar_but_allow_changeover(): void + { + Booking::factory()->for($this->property)->reserved(now()->addHour())->create(['arrival' => '2026-11-10', 'departure' => '2026-11-14']); + BlockedPeriod::factory()->for($this->property)->create(['starts_on' => '2026-11-20', 'ends_on' => '2026-11-22']); + $availability = new AvailabilityChecker; + + $this->assertFalse($availability->isAvailable($this->property, $this->date('2026-11-12'), $this->date('2026-11-16'))); + $this->assertFalse($availability->isAvailable($this->property, $this->date('2026-11-18'), $this->date('2026-11-21'))); + $this->assertTrue($availability->isAvailable($this->property, $this->date('2026-11-14'), $this->date('2026-11-16')), 'arrival on departure day'); + $this->assertTrue($availability->isAvailable($this->property, $this->date('2026-11-07'), $this->date('2026-11-10')), 'departure on arrival day'); + $this->assertSame(['2026-11-10', '2026-11-11', '2026-11-12', '2026-11-13', '2026-11-20', '2026-11-21'], array_keys( + $availability->occupiedNights($this->property, $this->date('2026-11-01'), $this->date('2026-12-01')), + )); + } + + public function test_reservation_with_elapsed_hold_no_longer_occupies_the_calendar(): void + { + Booking::factory()->for($this->property)->reserved(now()->subMinute())->create(['arrival' => '2026-11-10', 'departure' => '2026-11-14']); + + $this->assertTrue((new AvailabilityChecker)->isAvailable($this->property, $this->date('2026-11-10'), $this->date('2026-11-14'))); + } + + public function test_request_creates_a_held_reservation_and_sends_quote_and_notification(): void + { + $booking = $this->reserve('2026-11-07', '2026-11-10'); + + $this->assertSame(BookingStatus::Reserved, $booking->status); + $this->assertSame('2026-10-24 10:00', $booking->hold_expires_at->format('Y-m-d H:i')); + $this->assertSame(3 * 6500 + 10800, $booking->total); + $this->assertSame('2026-'.str_pad((string) $booking->id, 4, '0', STR_PAD_LEFT), $booking->reference); + $this->assertSame('anna@example.com', $booking->guest->email); + Mail::assertSent(ReservationReceived::class, fn (ReservationReceived $mail): bool => $mail->hasTo('anna@example.com')); + Mail::assertSent(NewReservation::class, fn (NewReservation $mail): bool => $mail->hasTo(config('fewo.notification_email'))); + } + + public function test_request_for_occupied_dates_is_rejected(): void + { + $this->reserve('2026-11-07', '2026-11-10'); + + $this->expectException(ReservationException::class); + + $this->reserve('2026-11-09', '2026-11-12'); + } + + public function test_returning_guest_is_recognised_by_email(): void + { + $first = $this->reserve('2026-11-07', '2026-11-10'); + $second = $this->reserve('2026-11-20', '2026-11-23', 'ANNA@example.com'); + + $this->assertTrue($first->guest->is($second->guest)); + } + + public function test_expired_holds_are_marked_and_the_landlord_is_notified(): void + { + $booking = $this->reserve('2026-11-07', '2026-11-10'); + + $this->travel(47)->hours(); + $this->assertSame(0, (new ExpireReservations)->handle()); + + $this->travel(2)->hours(); + $this->assertSame(1, (new ExpireReservations)->handle()); + + $this->assertSame(BookingStatus::Expired, $booking->fresh()->status); + Mail::assertSent(ReservationExpired::class); + } + + public function test_confirmation_makes_the_booking_binding_and_informs_the_guest(): void + { + $booking = $this->reserve('2026-11-07', '2026-11-10'); + + app(ConfirmBooking::class)->handle($booking); + + $booking->refresh(); + $this->assertSame(BookingStatus::Confirmed, $booking->status); + $this->assertNull($booking->hold_expires_at); + $this->assertNotNull($booking->confirmed_at); + Mail::assertSent(BookingConfirmed::class, fn (BookingConfirmed $mail): bool => $mail->hasTo('anna@example.com')); + } + + public function test_expired_reservation_cannot_be_confirmed_once_the_dates_are_taken(): void + { + $expired = $this->reserve('2026-11-07', '2026-11-10'); + $this->travel(3)->days(); + (new ExpireReservations)->handle(); + $this->reserve('2026-11-08', '2026-11-12', 'other@example.com'); + + $this->expectException(ReservationException::class); + + app(ConfirmBooking::class)->handle($expired->fresh()); + } + + public function test_mails_render(): void + { + $booking = $this->reserve('2026-11-07', '2026-11-10'); + + $this->assertStringContainsString('vorgemerkt', (new ReservationReceived($booking))->render()); + $this->assertStringContainsString($booking->reference, (new NewReservation($booking))->render()); + $this->assertStringContainsString('bestätigen', (new BookingConfirmed($booking))->render()); + } + + private function reserve(string $arrival, string $departure, string $email = 'anna@example.com'): Booking + { + return app(CreateReservation::class)->handle( + $this->property, + new StayRequest($this->date($arrival), $this->date($departure), 2), + ['first_name' => 'Anna', 'last_name' => 'Muster', 'email' => $email], + ); + } + + private function date(string $date): CarbonImmutable + { + return CarbonImmutable::parse($date); + } +} diff --git a/tests/Feature/SpecialOfferPricingTest.php b/tests/Feature/SpecialOfferPricingTest.php new file mode 100644 index 0000000..d36937e --- /dev/null +++ b/tests/Feature/SpecialOfferPricingTest.php @@ -0,0 +1,140 @@ +calculator = new PriceCalculator; + $this->property = Property::factory()->create(['cleaning_fee' => 10000, 'deposit_percent' => 50]); + Season::factory()->for($this->property)->create(['name' => 'Winter', 'starts_on' => '2026-01-03', 'ends_on' => '2026-03-07', 'nightly_rate' => 5000, 'min_nights' => 2]); + Season::factory()->for($this->property)->create(['name' => 'Nebensaison', 'starts_on' => '2026-03-07', 'ends_on' => '2026-04-03', 'nightly_rate' => 7000, 'min_nights' => 2]); + } + + public function test_last_minute_applies_only_within_the_booking_window(): void + { + $this->offer(['name' => 'Last Minute', 'max_days_before_arrival' => 14, 'discount_value' => 20]); + $stay = $this->stay('2026-02-10', '2026-02-14'); + + $lastMinute = $this->calculator->calculate($this->property, $stay, CarbonImmutable::parse('2026-02-01')); + $early = $this->calculator->calculate($this->property, $stay, CarbonImmutable::parse('2026-01-10')); + + $this->assertSame(4000, $lastMinute->discount()); + $this->assertSame(0, $early->discount()); + } + + public function test_offer_can_be_restricted_to_seasons_of_the_arrival(): void + { + $this->offer(['season_names' => ['Winter'], 'discount_value' => 10]); + + $winter = $this->calculator->calculate($this->property, $this->stay('2026-02-10', '2026-02-12')); + $spring = $this->calculator->calculate($this->property, $this->stay('2026-03-10', '2026-03-12')); + + $this->assertSame(1000, $winter->discount()); + $this->assertSame(0, $spring->discount()); + } + + public function test_special_weekend_with_fixed_nightly_rate_on_friday_arrival(): void + { + $this->offer([ + 'name' => 'Special Weekend', + 'discount_type' => DiscountType::NightlyRate, + 'discount_value' => 3900, + 'arrival_weekdays' => [5], + 'max_nights' => 2, + ]); + + $friday = $this->calculator->calculate($this->property, $this->stay('2026-02-13', '2026-02-15')); + $saturday = $this->calculator->calculate($this->property, $this->stay('2026-02-14', '2026-02-16')); + + $this->assertSame(2 * (5000 - 3900), $friday->discount()); + $this->assertSame(0, $saturday->discount()); + } + + public function test_free_nights_discount_the_cheapest_nights(): void + { + $this->offer(['name' => '7 = 6', 'discount_type' => DiscountType::FreeNights, 'discount_value' => 1, 'min_nights' => 7]); + + $quote = $this->calculator->calculate($this->property, $this->stay('2026-03-03', '2026-03-10')); + + $this->assertSame(5000, $quote->discount()); + } + + public function test_offer_with_code_needs_the_code(): void + { + $this->offer(['name' => 'Stammgast', 'code' => 'OSTSEE26', 'discount_type' => DiscountType::AmountPerStay, 'discount_value' => 2500]); + + $withCode = $this->calculator->calculate($this->property, $this->stay('2026-02-10', '2026-02-12', 'ostsee26')); + $wrongCode = $this->calculator->calculate($this->property, $this->stay('2026-02-10', '2026-02-12', 'FALSCH')); + $withoutCode = $this->calculator->calculate($this->property, $this->stay('2026-02-10', '2026-02-12')); + + $this->assertSame([2500, true], [$withCode->discount(), $withCode->promoCodeApplied]); + $this->assertSame([0, false], [$wrongCode->discount(), $wrongCode->promoCodeApplied]); + $this->assertSame([0, null], [$withoutCode->discount(), $withoutCode->promoCodeApplied]); + } + + public function test_guest_gets_the_better_of_best_exclusive_offer_and_all_combinable_offers(): void + { + $this->offer(['name' => 'Kombi A', 'discount_value' => 5, 'is_combinable' => true]); + $this->offer(['name' => 'Kombi B', 'discount_value' => 5, 'is_combinable' => true]); + $exclusive = $this->offer(['name' => 'Exklusiv', 'discount_value' => 8]); + $stay = $this->stay('2026-02-10', '2026-02-20'); + + $this->assertSame(5000, $this->calculator->calculate($this->property, $stay)->discount()); + + $exclusive->update(['discount_value' => 15]); + $quote = $this->calculator->calculate($this->property, $stay); + + $this->assertSame(7500, $quote->discount()); + $this->assertSame(['Exklusiv'], array_values(array_map(fn ($line) => $line->label, array_filter($quote->lines, fn ($line) => $line->amount < 0)))); + } + + public function test_deposit_is_calculated_on_the_discounted_rent(): void + { + $this->offer(['discount_value' => 10]); + + $quote = $this->calculator->calculate($this->property, $this->stay('2026-02-10', '2026-02-14')); + + $this->assertSame((20000 - 2000) / 2, $quote->deposit()); + $this->assertSame(20000 - 2000 + 10000, $quote->total()); + } + + public function test_inactive_offers_are_ignored(): void + { + $this->offer(['is_active' => false]); + + $this->assertSame(0, $this->calculator->calculate($this->property, $this->stay('2026-02-10', '2026-02-14'))->discount()); + } + + /** + * @param array $attributes + */ + private function offer(array $attributes): SpecialOffer + { + return SpecialOffer::factory()->for($this->property)->create($attributes); + } + + private function stay(string $arrival, string $departure, ?string $promoCode = null): StayRequest + { + return new StayRequest(CarbonImmutable::parse($arrival), CarbonImmutable::parse($departure), 2, promoCode: $promoCode); + } +} diff --git a/vite.config.js b/vite.config.js index 1fd66d5..f35b4e7 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,6 +1,5 @@ import { defineConfig } from 'vite'; import laravel from 'laravel-vite-plugin'; -import { bunny } from 'laravel-vite-plugin/fonts'; import tailwindcss from '@tailwindcss/vite'; export default defineConfig({ @@ -8,11 +7,6 @@ export default defineConfig({ laravel({ input: ['resources/css/app.css', 'resources/js/app.js'], refresh: true, - fonts: [ - bunny('Instrument Sans', { - weights: [400, 500, 600], - }), - ], }), tailwindcss(), ],