Files
fewo-stommer/app/Process/Modules/Intake/IntakeRecord.php
T
LarsandClaude Opus 5.5 7e22e12cac U-A/U-B: Prozesskern mit Fachmodulen, versionierten Modellen, eingefrorenem Prozessplan, ProcessRunner (harte/weiche Abhängigkeiten), CasePricing, Loyalty nur im Tester
CaseActivities/CaseAutomation sind Fassaden über ProcessRunner. Verhaltensvergleich v0.11:
11 Abläufe und 198 Konstellationen gleich, beabsichtigte Abweichungen I-004/I-005 (F-001/F-002).
Volle Suite vor U-B: 785/785.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 14:49:44 +01:00

44 lines
1.5 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
namespace App\Process\Modules\Intake;
use App\Enums\ActivityState;
use App\Process\Activity;
use App\Process\CaseContext;
use App\Process\Modules\Module;
use App\Process\Modules\ModuleDefinition;
/**
* P01: the case came in – request, portal booking or internal occasion. Recording it (and the hold of a request,
* under the calendar lock) is done by the intake actions; the step only shows it.
*/
final class IntakeRecord extends Module
{
public static function key(): string
{
return 'intake.record';
}
public static function definition(): ModuleDefinition
{
return new ModuleDefinition(
label: 'Eingang',
purpose: 'Hält den Eingang der Anfrage, Buchung oder Eigenbelegung fest und friert den Ablauf ein.',
phase: 'P01',
effects: ['case_write', 'calendar_hold'],
triggers: ['intake'],
events: ['created', 'intake', 'profile', 'hold', 'mode'],
);
}
public function activities(CaseContext $case): array
{
$booking = $case->booking;
if ($booking->isInternal()) {
return [new Activity('intake', ($booking->internal_kind?->getLabel() ?? 'Eigene Belegung').' eingetragen', ActivityState::Done, $booking->occasion)];
}
return [new Activity('intake', $case->inquiry ? 'Anfrage eingegangen' : 'Buchung beim Portal eingegangen', ActivityState::Done, $booking->created_at?->format('d.m.Y').' · '.$booking->bookingChannelLabel())];
}
}