This commit is contained in:
Adrian Hopek
2022-02-22 10:42:20 +01:00
parent 6b4b583632
commit 0cc495acab
8 changed files with 18 additions and 18 deletions

View File

@@ -20,7 +20,7 @@ class HandleCreatedVacationRequest
{
$vacationRequest = $event->vacationRequest;
if ($vacationRequest->shouldSkipFlow()) {
if ($vacationRequest->hasFlowSkipped()) {
$this->stateManager->approve($vacationRequest);
return;

View File

@@ -19,9 +19,9 @@ class SendCreatedVacationRequestNotification
$vacationRequest = $event->vacationRequest;
if ($vacationRequest->creator->is($vacationRequest->user)) {
$event->vacationRequest->user->notify(new VacationRequestCreatedNotification($event->vacationRequest));
$vacationRequest->user->notify(new VacationRequestCreatedNotification($vacationRequest));
} else {
$event->vacationRequest->user->notify(new VacationRequestCreatedOnEmployeeBehalf($event->vacationRequest));
$vacationRequest->user->notify(new VacationRequestCreatedOnEmployeeBehalf($vacationRequest));
}
}
}