- duplication of code removed

This commit is contained in:
2022-07-11 13:11:15 +02:00
parent d2d753640c
commit 3bea1f41b2

View File

@@ -105,11 +105,10 @@ class UserVacationStatsRetriever
public function hasVacationDaysLimit(User $user, YearPeriod $yearPeriod): bool
{
$limit = $user->vacationLimits()
return $user->vacationLimits()
->whereBelongsTo($yearPeriod)
->first()?->days;
return $limit !== null;
->first()
?->hasVacation() ?? false;
}
protected function getLimitableVacationTypes(): Collection