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:
1 parent
98df5e9e3b
commit
7e22e12cac
80 files changed
+4628
-445
No files matched your search
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
namespace App\Process\Modules\Settlement;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* A6: an optional stay confirmation for the guests of an own use or private stay (no rental contract).
|
||||
*/
|
||||
final class StayConfirmation extends Module
|
||||
{
|
||||
public static function key(): string
|
||||
{
|
||||
return 'documents.stay_confirmation';
|
||||
}
|
||||
|
||||
public static function definition(): ModuleDefinition
|
||||
{
|
||||
return new ModuleDefinition(
|
||||
label: 'Aufenthaltsbestätigung',
|
||||
purpose: 'Bestätigt den Gästen einer Eigenbelegung oder privaten Überlassung den Aufenthalt – nur bei Bedarf.',
|
||||
phase: 'P03',
|
||||
effects: ['guest_mail', 'document'],
|
||||
toggle: ModuleDefinition::TOGGLE_OPTIONAL,
|
||||
performers: ['landlord'],
|
||||
events: ['document', 'mail'],
|
||||
);
|
||||
}
|
||||
|
||||
public function applies(CaseContext $case): bool
|
||||
{
|
||||
return $case->booking->internal_kind !== InternalKind::Block && filled($case->booking->guest?->email);
|
||||
}
|
||||
|
||||
public function activities(CaseContext $case): array
|
||||
{
|
||||
$booking = $case->booking;
|
||||
|
||||
return [new Activity('documents', 'Aufenthaltsbestätigung an die Gäste (optional)', $case->later($booking->confirmation_sent_at !== null ? ActivityState::Done : ActivityState::Later),
|
||||
$booking->confirmation_sent_at ? 'gesendet am '.$booking->confirmation_sent_at->format('d.m.Y') : 'nur bei Bedarf', $booking->confirmation_sent_at === null && ! $case->closed ? 'sendDocuments' : null)];
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user