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>
50 lines
1.5 KiB
PHP
50 lines
1.5 KiB
PHP
<?php
|
||
|
||
namespace App\Process\Templates;
|
||
|
||
use App\Enums\ProcessSetting;
|
||
|
||
/**
|
||
* A functional area of a process where a model offers a slot for a function template. Each area answers one business
|
||
* decision and stands for exactly one result of the process (so the same result is never produced twice).
|
||
*/
|
||
enum TemplateArea: string
|
||
{
|
||
case Collection = 'collection';
|
||
case ContractDocuments = 'contract_documents';
|
||
|
||
public function label(): string
|
||
{
|
||
return match ($this) {
|
||
self::Collection => 'Finanzabwicklung (Inkasso)',
|
||
self::ContractDocuments => 'Vertragsdokumentation',
|
||
};
|
||
}
|
||
|
||
public function question(): string
|
||
{
|
||
return match ($this) {
|
||
self::Collection => 'Wer zieht das Geld des Gastes ein?',
|
||
self::ContractDocuments => 'Wer stellt dem Gast die Vertragsunterlagen bereit?',
|
||
};
|
||
}
|
||
|
||
/** The process result every template of this area provides – exactly once per process. */
|
||
public function result(): string
|
||
{
|
||
return match ($this) {
|
||
self::Collection => 'money.collection_handled',
|
||
self::ContractDocuments => 'contract.documented',
|
||
};
|
||
}
|
||
|
||
/** The responsibility setting the chosen template fixes. */
|
||
public function setting(): ProcessSetting
|
||
{
|
||
return match ($this) {
|
||
self::Collection => ProcessSetting::Payments,
|
||
self::ContractDocuments => ProcessSetting::Documents,
|
||
};
|
||
}
|
||
}
|