This was already implemented, migrated, and running live, but had never been committed. Bringing it into git: Project/Task/Idea/ TaskComment models, their JSON API (CRUD + status transitions, task comments, idea<->project linking), Livewire UI pages, and the nav/route wiring for them. All 42 of its own tests pass. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
32 lines
943 B
PHP
32 lines
943 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests;
|
|
|
|
use App\Models\Task;
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
use Illuminate\Validation\Rule;
|
|
|
|
class UpdateTaskRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'title' => ['sometimes', 'string', 'max:255'],
|
|
'description' => ['nullable', 'string'],
|
|
'status' => ['sometimes', 'string', Rule::in(Task::STATUSES)],
|
|
'project_id' => ['sometimes', 'integer', 'exists:projects,id'],
|
|
'priority' => ['sometimes', 'integer', 'min:0', 'max:10'],
|
|
'due_at' => ['nullable', 'date'],
|
|
'started_at' => ['nullable', 'date'],
|
|
'completed_at' => ['nullable', 'date'],
|
|
'estimated_hours' => ['nullable', 'integer', 'min:0'],
|
|
'actual_hours' => ['nullable', 'integer', 'min:0'],
|
|
];
|
|
}
|
|
}
|