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,44 @@
|
||||
<?php
|
||||
|
||||
namespace App\Process\Modules\Offer;
|
||||
|
||||
use App\Actions\AutoOffer;
|
||||
use App\Enums\BookingStatus;
|
||||
use App\Enums\IntakeKind;
|
||||
use App\Enums\ProcessingMode;
|
||||
use App\Process\CaseContext;
|
||||
use App\Process\StepResult;
|
||||
|
||||
/**
|
||||
* The automatic answer of a request (binding offer or information "unter Vorbehalt"): due while the request waits for
|
||||
* its first answer and the case is handled automatically; carried out by {@see AutoOffer}, which checks every release
|
||||
* rule (dates, contract texts, calendar clearance, document composition) itself.
|
||||
*/
|
||||
trait AnswersRequest
|
||||
{
|
||||
public function due(CaseContext $case): bool
|
||||
{
|
||||
$booking = $case->booking;
|
||||
|
||||
return $booking->processingMode() === ProcessingMode::Automatic
|
||||
&& $booking->status === BookingStatus::Reserved && $booking->offer_version === 0 && $booking->information_version === 0
|
||||
&& $booking->intake !== IntakeKind::Booking;
|
||||
}
|
||||
|
||||
public function blockers(CaseContext $case): array
|
||||
{
|
||||
return app(AutoOffer::class)->blockers($case->booking);
|
||||
}
|
||||
|
||||
public function run(CaseContext $case): StepResult
|
||||
{
|
||||
$reasons = app(AutoOffer::class)->handle($case->booking);
|
||||
|
||||
return $reasons === [] ? StepResult::ran() : StepResult::blocked($reasons);
|
||||
}
|
||||
|
||||
public function isOutward(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user