- 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>
33 lines
883 B
PHP
33 lines
883 B
PHP
<?php
|
|
|
|
namespace App\Actions;
|
|
|
|
use App\Enums\BookingStatus;
|
|
use App\Mail\ReservationExpired;
|
|
use App\Models\Booking;
|
|
use Illuminate\Support\Facades\Mail;
|
|
|
|
/**
|
|
* Marks reservations whose hold time is over as expired and tells the landlord.
|
|
* The calendar already treats them as free once the hold time is over; this only updates the status.
|
|
*/
|
|
class ExpireReservations
|
|
{
|
|
public function handle(): int
|
|
{
|
|
$expired = Booking::query()
|
|
->whereIn('status', BookingStatus::holding())
|
|
->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();
|
|
}
|
|
}
|