v0.11 U1: Kanalmanager mit eigener Webseite und neuen Prozessparametern

- Eigene Webseite als Kanal eigener Art (channels.kind = website), nur zur
  Konfiguration: Webseiten-Anfragen bleiben direkt (A1) ohne Kanalbezug;
  der Eintrag nimmt an Sync, Export, Überwachung und Sperraufgaben nicht teil
  (active()/Property::channels() nur Portale, Feed nur für Portale).
- Neue Einstellungen im bestehenden ProcessSetting: Klärungsreservierung
  automatisch/Freigabe (15/180 min, 0 = keine), Rückfragemodus,
  Erinnerungen, Folgefragen, Erinnerungsabstand, Linkgültigkeit,
  Anschrift im Webformular verlangen (Standard: nein).
- „Kanäle“ in der einfachen Ansicht: Webseite und Portale an einer Stelle,
  Verweis auf „Ihre Standards“; „Wirksame Einstellungen“ mit Spalte
  „Eigene Webseite“ und Herkunft „Webseite“.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
LarsandClaude Opus 5.5 committed 2026-11-03 12:52:50 +01:00
1 parent bfccfe7eed
commit 799869c6a4
27 files changed
+559 -106

No files matched your search

+16 -5
View File
@@ -28,7 +28,7 @@ public function resolve(Property $property, ?Channel $channel, IntakeKind $intak
$levels = [
ProcessProfile::TENANT => $this->tenantDefaults($property->tenant_id),
ProcessProfile::PROPERTY => $propertyLevel,
ProcessProfile::CHANNEL => $intake === IntakeKind::Internal || $channel === null ? [] : (array) (($channel->process_overrides ?? [])[$intake->value] ?? []),
($channel?->isWebsite() ? ProcessProfile::WEBSITE : ProcessProfile::CHANNEL) => $intake === IntakeKind::Internal || $channel === null ? [] : (array) (($channel->process_overrides ?? [])[$intake->value] ?? []),
];
$values = [];
@@ -38,7 +38,7 @@ public function resolve(Property $property, ?Channel $channel, IntakeKind $intak
$sources[$setting->value] = ProcessProfile::SYSTEM;
foreach ($levels as $level => $settings) {
if ($level === ProcessProfile::CHANNEL && ! in_array($intake, $setting->channelIntakes(), true)) {
if (in_array($level, [ProcessProfile::CHANNEL, ProcessProfile::WEBSITE], true) && ! in_array($intake, $setting->channelIntakes(), true)) {
continue;
}
$value = $setting->normalize($settings[$setting->value] ?? null);
@@ -65,7 +65,16 @@ public function resolve(Property $property, ?Channel $channel, IntakeKind $intak
$documents = Responsibility::from((string) $values[ProcessSetting::Documents->value]);
$payments = Responsibility::from((string) $values[ProcessSetting::Payments->value]);
return new ProcessProfile($intake, ProcessProfile::caseTypeFor($intake, $channel !== null, $documents, $payments), $values, $sources);
return new ProcessProfile($intake, ProcessProfile::caseTypeFor($intake, $channel?->isPortal() ?? false, $documents, $payments), $values, $sources);
}
/**
* Settings of a request from the own website: the website's entry of the channel manager is its channel level
* (the case itself stays direct, without a channel).
*/
public function forWebsite(Property $property, IntakeKind $intake = IntakeKind::Inquiry): ProcessProfile
{
return $this->resolve($property, Channel::existingWebsiteOf($property), $intake);
}
/**
@@ -76,7 +85,9 @@ public function forBooking(Booking $booking): ProcessProfile
// The case's own landlord counts, whichever landlord is current (e.g. a case written by the system).
$property = $booking->property ?? Property::withoutGlobalScope('tenant')->findOrFail($booking->property_id);
return $this->resolve($property, $booking->processChannel(), $booking->intake ?? self::intakeFor($booking));
$channel = $booking->processChannel() ?? ($booking->source === 'website' ? Channel::existingWebsiteOf($property) : null);
return $this->resolve($property, $channel, $booking->intake ?? self::intakeFor($booking));
}
/**
@@ -100,7 +111,7 @@ public function tenantDefaults(?int $tenantId): array
public static function intakeFor(Booking $booking): IntakeKind
{
$channel = $booking->processChannel();
if ($channel === null) {
if ($channel === null || $channel->isWebsite()) {
return IntakeKind::Inquiry;
}