Visuelle iCal-Regelengine mit Originaldaten und individuellen Exportfeldern integrieren
Deploy FeWo mit PipelineManager / deploy (push) Successful in 2m37s

This commit is contained in:
Lars committed 2026-10-27 19:00:25 +01:00
1 parent c4ebccbbea
commit e9db98701b
30 files changed
+1269 -15

No files matched your search

+7 -1
View File
@@ -66,6 +66,7 @@ public function handle(Channel $channel): ChannelSyncLog
$attributes = ['property_id' => $channel->property_id, 'starts_on' => $period->startsOn->toDateString(),
'ends_on' => $period->endsOn->toDateString(), 'reason' => $channel->name, 'source' => 'channel',
'external_uid' => $period->uid, 'missing_imports' => 0];
$interpretation = $period->properties !== [] ? app(ApplyChannelRules::class)->attributes($locked, $block ?? $matchedMail, $period->properties) : [];
if ($matchedMail) {
$block = $matchedMail;
$block->update($attributes);
@@ -85,9 +86,14 @@ public function handle(Channel $channel): ChannelSyncLog
$overlap = $channel->property->blockedPeriods()->occupying()->overlapping($period->startsOn, $period->endsOn)->exists()
|| $channel->property->bookings()->occupying()->overlapping($period->startsOn, $period->endsOn)->exists();
$attributes['export_approved'] = ! $overlap && $locked->echo_behavior !== ChannelEchoBehavior::Reexports;
$block = $channel->blockedPeriods()->create($attributes);
$block = new BlockedPeriod($attributes);
$block->forceFill($interpretation);
$channel->blockedPeriods()->save($block);
$counts['added']++;
}
if ($period->properties !== []) {
app(ApplyChannelRules::class)->store($block, [...$interpretation, 'ical_properties' => $period->properties, 'ical_raw' => $period->raw]);
}
$existing->put($period->uid, $block);
$overlap = $channel->blockedPeriods()->occupying()->overlapping($block->starts_on, $block->ends_on)->whereKeyNot($block->id)->exists();
$foundConflicts = $block->is_representation ? [] : $this->conflictDetector->conflictsFor($block);