Files
fewo-stommer/app/Process/Modules/Stay/ArrivalInformation.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

49 lines
2.0 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\Stay;
use App\Enums\ActivityState;
use App\Enums\ProcessSetting;
use App\Enums\Responsibility;
use App\Process\Activity;
use App\Process\CaseContext;
use App\Process\Modules\Module;
use App\Process\Modules\ModuleDefinition;
/**
* P04: the arrival information for the guest – sent by us (SendBookingReminders) or announced by the portal. Who sends
* it is variable within the model (supplementary, not contract documentation; decision O1).
*/
final class ArrivalInformation extends Module
{
public static function key(): string
{
return 'arrival.info';
}
public static function definition(): ModuleDefinition
{
return new ModuleDefinition(
label: 'Anreise-Informationen',
purpose: 'Wegbeschreibung, Schlüssel und Kontakt vor Ort rechtzeitig vor der Anreise.',
phase: 'P04',
effects: ['guest_mail'],
waits: ['time', 'portal'],
triggers: ['schedule:reminders'],
parameters: [ProcessSetting::GuestMessages, ProcessSetting::ArrivalInfoDaysBefore],
performers: ['system', 'portal', 'service_provider'],
events: ['document', 'mail'],
);
}
public function activities(CaseContext $case): array
{
$booking = $case->booking;
$profile = $case->profile;
return [$profile->guestMessages() === Responsibility::Portal
? new Activity('arrival_info', 'Anreise-Informationen an den Gast', ActivityState::External, 'durch '.($booking->processChannel()?->name ?? 'das Portal').' (angekündigt) – eine Zustellung ist damit nicht nachgewiesen')
: new Activity('arrival_info', 'Anreise-Informationen an den Gast (automatisch)', $case->later($booking->arrival_info_sent_at !== null ? ActivityState::Done : ActivityState::Later), $booking->arrival_info_sent_at ? 'gesendet am '.$booking->arrival_info_sent_at->format('d.m.Y') : $profile->arrivalInfoDaysBefore().' Tage vor Anreise')];
}
}