Schablonenkomposition: Basisprozess external.booking mit Platz für Finanz- und Dokumentenschablonen

Vier Schablonen (Eigenes/Portal-Inkasso, Eigene/Externe Vertragsdokumentation) in
app/Process/Templates, TemplateComposer prüft Ergebnisse, Verantwortlichkeiten, Ausschlüsse
und harte Modulabhängigkeiten. Der Plan friert die Schablonenversionen ein. A3–A5 bleiben
als Voreinstellungen; die vierte Kombination (eigenes Inkasso + externe Unterlagen) ist
darstellbar. Konfigurator-Logik und ConfigureChannelProcess kennen die Schablonenwahl.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
LarsandClaude Sonnet 5.5 committed 2026-11-05 10:48:49 +01:00
1 parent 381720763c
commit e95ba4f986
24 files changed
+1666 -37

No files matched your search

@@ -72,15 +72,15 @@ public function test_only_admissible_models_per_channel_and_intake_are_offered()
$website = Channel::websiteOf($this->property);
$this->assertSame(['a2.offer', 'a2.information'], array_keys($configuration->admissibleModels($fewo, IntakeKind::Inquiry)));
$this->assertSame(['a4.portal_booking'], array_keys($configuration->admissibleModels($fewo, IntakeKind::Booking)), 'O2: FeWo-direkt bookings only A4 for now');
$this->assertSame(['a3.portal_booking'], array_keys($configuration->admissibleModels($ds, IntakeKind::Booking)));
$this->assertSame(['a4.portal_booking', 'external.booking'], array_keys($configuration->admissibleModels($fewo, IntakeKind::Booking)), 'O2: of the archetypes only A4 fits FeWo-direkt; the base process is open and restricts per template');
$this->assertSame(['a3.portal_booking', 'external.booking'], array_keys($configuration->admissibleModels($ds, IntakeKind::Booking)));
$this->assertSame([IntakeKind::Booking], $configuration->intakes($ds));
$this->assertSame(['a2.offer', 'a2.information'], array_keys($configuration->admissibleModels($listing, IntakeKind::Inquiry)));
$this->assertSame(['a1.offer', 'a1.information'], array_keys($configuration->admissibleModels($website, IntakeKind::Inquiry)));
// The restriction lives in the channel profile, not in the process core: a changed profile releases more models.
$fewo->update(['settings' => [...(array) $fewo->settings, 'portal_profile' => 'generic']]);
$this->assertSame(['a3.portal_booking', 'a4.portal_booking', 'a5.portal_booking'], array_keys($configuration->admissibleModels($fewo->fresh(), IntakeKind::Booking)));
$this->assertSame(['a3.portal_booking', 'a4.portal_booking', 'a5.portal_booking', 'external.booking'], array_keys($configuration->admissibleModels($fewo->fresh(), IntakeKind::Booking)));
$this->expectException(ValidationException::class);
app(ConfigureChannelProcess::class)->handle($ds, IntakeKind::Booking, ['model' => 'a4.portal_booking']);