U-A: process:check/impact/fingerprint, Modulmatrix, Modul-Vertragstest, O4-Aussetzung der Außenwirkungen (I-002), Bewertungsbitte je Kanal abschaltbar
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7e22e12cac
commit
d695566a7a
9 files changed
+466
-3
No files matched your search
@@ -6,6 +6,8 @@
|
||||
use App\Enums\Responsibility;
|
||||
use App\Mail\ReviewRequest;
|
||||
use App\Models\Booking;
|
||||
use App\Process\OutwardSuspension;
|
||||
use App\Process\ProcessPlan;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
|
||||
/**
|
||||
@@ -27,7 +29,10 @@ public function handle(): int
|
||||
->whereHas('guest', fn ($query) => $query->whereNull('anonymized_at')->whereNotNull('email')->where('email', '!=', ''))
|
||||
->with('guest')
|
||||
->get()
|
||||
->filter(fn (Booking $booking): bool => $booking->process()->guestMessages() === Responsibility::Landlord);
|
||||
->filter(fn (Booking $booking): bool => $booking->process()->guestMessages() === Responsibility::Landlord
|
||||
// The step can be switched off per channel (Kanal › Ablauf); an open portal report holds it back (O4).
|
||||
&& ProcessPlan::of($booking)->enabled('review.request')
|
||||
&& OutwardSuspension::reason($booking) === null);
|
||||
|
||||
foreach ($bookings as $booking) {
|
||||
Mail::to($booking->guest->email, $booking->guest->full_name)->send(new ReviewRequest($booking));
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
use App\Mail\ArrivalInformation;
|
||||
use App\Models\Booking;
|
||||
use App\Models\BookingTask;
|
||||
use App\Process\OutwardSuspension;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
@@ -63,7 +64,9 @@ public function handle(): array
|
||||
->whereDate('arrival', '>=', $today)
|
||||
->whereDate('arrival', '<=', $today->copy()->addDays(self::ARRIVAL_INFO_MAX_DAYS_BEFORE)))
|
||||
->filter(fn (Booking $booking): bool => $booking->process()->guestMessages() === Responsibility::Landlord
|
||||
&& $booking->arrival->lessThanOrEqualTo($today->copy()->addDays($booking->process()->arrivalInfoDaysBefore())));
|
||||
&& $booking->arrival->lessThanOrEqualTo($today->copy()->addDays($booking->process()->arrivalInfoDaysBefore()))
|
||||
// Decision O4: an open portal report of a cancellation or change holds the message back until clarified.
|
||||
&& OutwardSuspension::reason($booking) === null);
|
||||
foreach ($arrivals as $booking) {
|
||||
Mail::to($booking->guest->email, $booking->guest->full_name)->send(new ArrivalInformation($booking));
|
||||
$booking->update(['arrival_info_sent_at' => now()]);
|
||||
|
||||
Reference in new issue
Block a user