- duplication of code removed
This commit is contained in:
parent
d2d753640c
commit
3bea1f41b2
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user