U-C: Kanalkonfigurator (Kanal › Ablauf): Modellwahl nach Kanalprofil (E2/O2), Schritte mit Schalter, Ausführung, Ausführenden und Fristen, Herkunft der Werte, Vorschau; ConfigureChannelProcess; Modell legt Einstellungen fest

Flache Prozessfelder im Kanalformular entfallen als Hauptansicht. Volle Suite 820/820.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
LarsandClaude Opus 5.5 committed 2026-11-04 15:04:28 +01:00
1 parent d695566a7a
commit c255783cec
13 files changed
+981 -50

No files matched your search

+27
View File
@@ -10,6 +10,7 @@
use App\Models\Channel;
use App\Models\Property;
use App\Models\Tenant;
use App\Process\Models\ProcessModel;
/**
* Resolves the effective process settings: built-in default → landlord default (tenant) → deviation of the property
@@ -49,6 +50,17 @@ public function resolve(Property $property, ?Channel $channel, IntakeKind $intak
}
}
// Architektur V2: the process model chosen for the channel and intake kind fixes some settings (e.g. the
// pre-reservation of the offer model, the responsibilities of A3–A5); these win over every level.
$model = $this->chosenModel($channel, $intake);
foreach ($model === null ? [] : $model::fixes() as $key => $fixed) {
$setting = ProcessSetting::tryFrom($key);
if ($setting !== null) {
$values[$key] = $setting->normalize($fixed) ?? $fixed;
$sources[$key] = ProcessProfile::MODEL;
}
}
if ($intake === IntakeKind::Internal) {
// Own use, private stays and blocks (A6): no rental documents, no payment reminders, no guest mails – fixed by
// the case type, not by a setting.
@@ -68,6 +80,21 @@ public function resolve(Property $property, ?Channel $channel, IntakeKind $intak
return new ProcessProfile($intake, ProcessProfile::caseTypeFor($intake, $channel?->isPortal() ?? false, $documents, $payments), $values, $sources);
}
/**
* The model chosen for the channel and intake kind (Kanal › Ablauf), when it is registered and fits the intake.
*/
private function chosenModel(?Channel $channel, IntakeKind $intake): ?ProcessModel
{
$key = (string) (ProcessPlan::configurationOf($channel, $intake)['model'] ?? '');
$catalogue = app(ProcessCatalogue::class);
if ($key === '' || ! $catalogue->hasModel($key)) {
return null;
}
$model = $catalogue->model($key);
return in_array($intake, $model::intakes(), true) ? $model : null;
}
/**
* 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).