Booking path 1 (offer + guest acceptance), 2FA for all, privacy hardening, brand graphics in theme

- Offer workflow: "Angebot senden" in the admin (dates, guests, promo code, manual price adjustment,
  validity from the property's hold time, message, guest data for the contract) with live price;
  contract draft PDF; signed, versioned offer page for the guest to accept (acceptance record without
  IP) or decline; expiry job, landlord notifications, editable offer texts, wording on the website.
- 2FA is mandatory for every admin account.
- Privacy: complete anonymisation (notes, attribution, review names, offer messages), shorter
  periods for unbinding requests, portal mail excerpts and attribution (configurable proposals),
  iCal summary not stored, known e-mail no longer overwrites guest data, security headers, bearer
  tokens for automations, metadata stripped from photo originals, review link throttled.
- Daily database backup (backup:database) and scripts/backup-pull.sh for the NAS.
- Theme: brand mark in header/footer, favicon/touch icon, wave divider, icons, illustration as
  image placeholder; navy follows the text colour for dark appearances.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Lars StommerandClaude Opus 5.5 committed 2026-10-22 21:38:22 +02:00
1 parent 82698f8eda
commit 4f69b426a4
77 files changed
+1658 -108

No files matched your search

+15 -3
View File
@@ -36,6 +36,8 @@
'guests',
'extras',
'promo_code',
'price_adjustment',
'price_adjustment_label',
'quote',
'total',
'deposit',
@@ -43,9 +45,16 @@
'balance_due_on',
'contract_path',
'hold_expires_at',
'offer_version',
'offer_sent_at',
'offer_message',
'offer_path',
'message',
'internal_notes',
'confirmed_at',
'accepted_at',
'acceptance',
'declined_by',
'cancelled_at',
'review_requested_at',
'deposit_reminded_at',
@@ -83,6 +92,9 @@ protected function casts(): array
'balance_due_on' => 'immutable_date',
'hold_expires_at' => 'immutable_datetime',
'confirmed_at' => 'immutable_datetime',
'offer_sent_at' => 'immutable_datetime',
'accepted_at' => 'immutable_datetime',
'acceptance' => 'array',
'cancelled_at' => 'immutable_datetime',
'review_requested_at' => 'immutable_datetime',
'deposit_reminded_at' => 'immutable_datetime',
@@ -109,7 +121,7 @@ public function guest(): BelongsTo
}
/**
* Bookings that currently occupy their dates: confirmed ones and reservations whose hold has not expired.
* Bookings that currently occupy their dates: confirmed ones and requests/offers whose hold has not expired.
*
* @param Builder<Booking> $query
* @return Builder<Booking>
@@ -120,7 +132,7 @@ 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)
->whereIn('status', BookingStatus::holding())
->where('hold_expires_at', '>', now())));
}
@@ -185,6 +197,6 @@ public function nights(): int
public function isHoldActive(): bool
{
return $this->status === BookingStatus::Reserved && $this->hold_expires_at?->isFuture();
return in_array($this->status, BookingStatus::holding(), true) && $this->hold_expires_at?->isFuture();
}
}
+13 -1
View File
@@ -67,7 +67,19 @@ protected function withMarketingConsent(Builder $query): Builder
public function anonymize(): void
{
DB::transaction(function (): void {
$this->bookings()->update(['message' => null]);
$this->bookings()->update([
'message' => null,
'internal_notes' => null,
'offer_message' => null,
'referral_source' => null,
'utm_source' => null,
'utm_medium' => null,
'utm_campaign' => null,
]);
Review::query()->whereIn('booking_id', $this->bookings()->select('id'))->update([
'display_name' => 'Gast',
'private_feedback' => null,
]);
$this->forceFill([
'first_name' => 'Anonymisiert',