* wip * wip * wip * wip * wip * wip * wip * wip * wip * fix * lint fix * cr fix * fix
This commit is contained in:
@@ -91,7 +91,7 @@ class User extends Authenticatable
|
||||
public function hasVacationLimit(YearPeriod $yearPeriod): bool
|
||||
{
|
||||
return $this->vacationLimits()
|
||||
->where("year_period_id", $yearPeriod->id)
|
||||
->whereBelongsTo($yearPeriod)
|
||||
->whereNotNull("days")
|
||||
->exists();
|
||||
}
|
||||
@@ -112,8 +112,8 @@ class User extends Authenticatable
|
||||
{
|
||||
return $query->whereRelation(
|
||||
"vacationlimits",
|
||||
fn(Builder $query) => $query
|
||||
->where("year_period_id", $yearPeriod->id)
|
||||
fn(Builder $query): Builder => $query
|
||||
->whereBelongsTo($yearPeriod)
|
||||
->whereNotNull("days"),
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user