- 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
|
public function hasVacationDaysLimit(User $user, YearPeriod $yearPeriod): bool
|
||||||
{
|
{
|
||||||
$limit = $user->vacationLimits()
|
return $user->vacationLimits()
|
||||||
->whereBelongsTo($yearPeriod)
|
->whereBelongsTo($yearPeriod)
|
||||||
->first()?->days;
|
->first()
|
||||||
|
?->hasVacation() ?? false;
|
||||||
return $limit !== null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getLimitableVacationTypes(): Collection
|
protected function getLimitableVacationTypes(): Collection
|
||||||
|
Loading…
x
Reference in New Issue
Block a user