Generische iCal-Kanäle mit Bestandsklärung und sicheren Exporten bereitstellen
Deploy FeWo mit PipelineManager / deploy (push) Successful in 2m33s

This commit is contained in:
Lars committed 2026-10-27 17:14:45 +01:00
1 parent 6fe5bbc6e3
commit 783068501c
42 files changed
+2646 -248

No files matched your search

+2 -2
View File
@@ -21,7 +21,7 @@ public function isAvailable(Property $property, CarbonImmutable $from, CarbonImm
->when($ignore, fn ($query) => $query->whereKeyNot($ignore->getKey()))
->exists();
return ! $bookingConflict && ! $property->blockedPeriods()->overlapping($from, $until)->exists();
return ! $bookingConflict && ! $property->blockedPeriods()->occupying()->overlapping($from, $until)->exists();
}
/**
@@ -33,7 +33,7 @@ public function occupiedNights(Property $property, CarbonImmutable $from, Carbon
{
$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'])
->concat($property->blockedPeriods()->occupying()->overlapping($from, $until)->get(['starts_on', 'ends_on'])
->map(fn (BlockedPeriod $period): array => [$period->starts_on, $period->ends_on]));
$nights = [];