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>
This commit is contained in:
LarsandClaude Opus 5.5 committed 2026-11-04 14:49:44 +01:00
1 parent 98df5e9e3b
commit 7e22e12cac
80 files changed
+4628 -445

No files matched your search

+53
View File
@@ -0,0 +1,53 @@
<?php
namespace App\Process\Modules\Stay;
use App\Enums\ActivityState;
use App\Enums\InternalKind;
use App\Process\Activity;
use App\Process\CaseContext;
use App\Process\Modules\Module;
use App\Process\Modules\ModuleDefinition;
/**
* P04: the stay itself (or the time of an internal occupation).
*/
final class Stay extends Module
{
public static function key(): string
{
return 'stay';
}
public static function definition(): ModuleDefinition
{
return new ModuleDefinition(
label: 'Aufenthalt',
purpose: 'Der Aufenthalt vom Anreise- bis zum Abreisetag.',
phase: 'P04',
waits: ['time'],
triggers: ['schedule:daily'],
performers: ['guest', 'landlord'],
events: ['task', 'services', 'status'],
);
}
public function activities(CaseContext $case): array
{
$booking = $case->booking;
if ($booking->isInternal()) {
$kind = $booking->internal_kind;
return [new Activity('stay', $kind === InternalKind::Block ? 'Sperrzeit' : 'Aufenthalt', $case->closed ? ActivityState::NotApplicable : ($booking->departure <= $case->today ? ActivityState::Done : ActivityState::Later), $booking->arrival->format('d.m.Y').' – '.$booking->departure->format('d.m.Y'))];
}
$arrived = $case->binding && $booking->arrival <= $case->today;
$left = $case->binding && $booking->departure <= $case->today;
return [new Activity('stay', 'Aufenthalt', $case->later(match (true) {
$left => ActivityState::Done,
$arrived => ActivityState::Waiting,
default => ActivityState::Later,
}), $booking->arrival->format('d.m.Y').' – '.$booking->departure->format('d.m.Y'))];
}
}