Added more imports

This commit is contained in:
Constantin Graf
2024-03-11 19:12:51 +01:00
parent 77e7a63b83
commit 66a1d8a38b
52 changed files with 1646 additions and 56 deletions

View File

@@ -30,10 +30,7 @@ class TimeEntryIndexRequest extends FormRequest
'uuid',
new ExistsEloquent(User::class, null, function (Builder $builder): Builder {
/** @var Builder<User> $builder */
return $builder->whereHas('organizations', function (Builder $builder) {
/** @var Builder<Organization> $builder */
return $builder->whereKey($this->organization->getKey());
});
return $builder->belongsToOrganization($this->organization);
}),
],
// Filter only time entries that have a start date before (not including) the given date (example: 2021-12-31)

View File

@@ -33,10 +33,7 @@ class TimeEntryStoreRequest extends FormRequest
'uuid',
new ExistsEloquent(User::class, null, function (Builder $builder): Builder {
/** @var Builder<User> $builder */
return $builder->whereHas('organizations', function (Builder $builder) {
/** @var Builder<Organization> $builder */
return $builder->whereKey($this->organization->getKey());
});
return $builder->belongsToOrganization($this->organization);
}),
],
// ID of the task that the time entry should belong to