add detailed reporting page

This commit is contained in:
Gregor Vostrak
2024-09-18 16:54:10 +02:00
parent 165391861a
commit 3ee7839ca9
13 changed files with 446 additions and 22 deletions

View File

@@ -4,6 +4,7 @@ declare(strict_types=1);
namespace App\Http\Requests\V1\TimeEntry;
use App\Models\Client;
use App\Models\Member;
use App\Models\Organization;
use App\Models\Project;
@@ -49,6 +50,19 @@ class TimeEntryIndexRequest extends FormRequest
return $builder->whereBelongsTo($this->organization, 'organization');
}),
],
// Filter by client IDs, client IDs are OR combined
'client_ids' => [
'array',
'min:1',
],
'client_ids.*' => [
'string',
'uuid',
new ExistsEloquent(Client::class, null, function (Builder $builder): Builder {
/** @var Builder<Client> $builder */
return $builder->whereBelongsTo($this->organization, 'organization');
}),
],
// Filter by project IDs, project IDs are OR combined
'project_ids' => [
'array',