Anfrage-Basisprozess inquiry.request mit Schablonen für Antwort und Gastkommunikation
Antwortart (Auskunft/Angebot) und Reservierung sind entkoppelt (neue Einstellung inquiry_answer; pre_reservation bleibt die Reservierungsstrategie). Anlass-bezogene Absender für Anreise-Information und Bewertungsbitte; Schablonen liefern Standardwerte unterhalb aller einstellbaren Ebenen. A1/A2 bleiben Voreinstellungen und Altfassungen. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e40f8639b3
commit
221ce8ca81
51 files changed
+773
-73
No files matched your search
@@ -3,6 +3,7 @@
|
||||
namespace App\Process;
|
||||
|
||||
use App\Enums\CaseType;
|
||||
use App\Enums\InquiryAnswer;
|
||||
use App\Enums\IntakeKind;
|
||||
use App\Process\Models\ProcessModel;
|
||||
use App\Process\Modules\ProcessModule;
|
||||
@@ -154,7 +155,7 @@ public function derivedModel(ProcessProfile $profile): string
|
||||
{
|
||||
return match ($profile->intake) {
|
||||
IntakeKind::Internal => 'a6.internal',
|
||||
IntakeKind::Inquiry => ($profile->caseType === CaseType::A2 ? 'a2' : 'a1').($profile->preReservation() ? '.offer' : '.information'),
|
||||
IntakeKind::Inquiry => ($profile->caseType === CaseType::A2 ? 'a2' : 'a1').($profile->inquiryAnswer() === InquiryAnswer::Offer ? '.offer' : '.information'),
|
||||
IntakeKind::Booking => match ($profile->caseType) {
|
||||
CaseType::A5 => 'a5.portal_booking',
|
||||
CaseType::A4 => 'a4.portal_booking',
|
||||
@@ -213,8 +214,14 @@ public function problems(): array
|
||||
if (! in_array($class::area()->result(), $class::provides(), true)) {
|
||||
$problems[] = "Schablone {$class::reference()}: liefert das Ergebnis ihres Bereichs ({$class::area()->result()}) nicht.";
|
||||
}
|
||||
if ($class::fixes() === [] || array_keys($class::fixes()) !== [$class::area()->setting()->value]) {
|
||||
$problems[] = "Schablone {$class::reference()}: darf nur die Verantwortlichkeit ihres Bereichs festlegen.";
|
||||
$allowed = array_map(fn ($setting): string => $setting->value, $class::area()->settings());
|
||||
if (array_diff([...array_keys($class::fixes()), ...array_keys($class::defaults())], $allowed) !== []) {
|
||||
$problems[] = "Schablone {$class::reference()}: darf nur Einstellungen ihres Bereichs ({$class::area()->label()}) festlegen oder vorschlagen.";
|
||||
}
|
||||
foreach ($class::configures() as $module) {
|
||||
if (! $this->hasModule($module)) {
|
||||
$problems[] = "Schablone {$class::reference()}: konfiguriertes Modul {$module} ist nicht registriert.";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user