This commit is contained in:
Adrian Hopek
2022-02-18 14:22:01 +01:00
parent fae50cb21c
commit b745ab990c
10 changed files with 162 additions and 8 deletions

View File

@@ -20,6 +20,12 @@ class HandleCreatedVacationRequest
{
$vacationRequest = $event->vacationRequest;
if ($vacationRequest->shouldSkipFlow()) {
$this->stateManager->approve($vacationRequest);
return;
}
if ($this->configRetriever->needsTechnicalApproval($vacationRequest->type)) {
$this->stateManager->waitForTechnical($vacationRequest);