Portal-Synchronisation: unser System führt

- Connector-System (app/Channels, config/channels.php) mit iCal-Connector, robustem Parser und Export-Feed je Portal (ohne eigene Belegungen, ohne Gästedaten)
- Abgleich alle 5 Min. mit Protokoll, Echo-Erkennung, Konflikt-Mail bei möglicher Doppelbuchung
- Überwachung: Störungs-Mail, Status-Endpunkt /health/sync für n8n
- Portal-Aufgaben für Sofortbuchungsportale (FeWo-direkt): automatisch aus Buchungen/Sperren/anderen Portalen, Mail + Erinnerung, Abhaken im Admin
- Optionaler signierter Automatisierungs-Webhook mit Rückmeldung
- Herkunftsmessung: Abfrage im Formular + UTM-Parameter
- Portal-Analyse: AGB-Prüfung Automatisierung, Umsetzungsbeschreibung

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Lars StommerandClaude Opus 5.5 committed 2026-10-22 11:13:55 +02:00
1 parent a8e72715ab
commit 0b7205e050
55 files changed
+2290 -3

No files matched your search

+35
View File
@@ -0,0 +1,35 @@
<?php
namespace App\Console\Commands;
use App\Actions\SyncChannel;
use App\Models\Channel;
use Illuminate\Console\Attributes\Description;
use Illuminate\Console\Attributes\Signature;
use Illuminate\Console\Command;
#[Signature('channels:sync {channel? : ID of a single channel}')]
#[Description('Import the occupations of all active portals (or one) and report conflicts')]
class SyncChannels extends Command
{
/**
* Execute the console command.
*/
public function handle(SyncChannel $syncChannel): int
{
$channels = Channel::query()->active()
->when($this->argument('channel'), fn ($query, $id) => $query->whereKey($id))
->get()
->filter(fn (Channel $channel): bool => $channel->importsOccupations());
foreach ($channels as $channel) {
$log = $syncChannel->handle($channel);
$log->successful
? $this->info("✓ {$channel->name}: {$log->events} Belegungen, +{$log->added} ~{$log->changed} -{$log->removed}, Konflikte: {$log->conflicts}")
: $this->error("✗ {$channel->name}: {$log->message}");
}
return self::SUCCESS;
}
}