diff --git a/app/Domain/UserVacationStatsRetriever.php b/app/Domain/UserVacationStatsRetriever.php index 830a3cd..8a1d55f 100644 --- a/app/Domain/UserVacationStatsRetriever.php +++ b/app/Domain/UserVacationStatsRetriever.php @@ -61,7 +61,11 @@ class UserVacationStatsRetriever public function getRemainingVacationDays(User $user, YearPeriod $yearPeriod): int { - return $this->getVacationDaysLimit($user, $yearPeriod) - $this->getUsedVacationDays($user, $yearPeriod); + $limit = $this->getVacationDaysLimit($user, $yearPeriod); + $used = $this->getUsedVacationDays($user, $yearPeriod); + $pending = $this->getPendingVacationDays($user, $yearPeriod); + + return $limit - $used - $pending; } public function getVacationDaysLimit(User $user, YearPeriod $yearPeriod): int diff --git a/resources/js/Pages/VacationRequest/Create.vue b/resources/js/Pages/VacationRequest/Create.vue index ce862e3..72c459d 100644 --- a/resources/js/Pages/VacationRequest/Create.vue +++ b/resources/js/Pages/VacationRequest/Create.vue @@ -40,7 +40,7 @@