Add ability to set task to done, fixes ST-244

This commit is contained in:
Constantin Graf
2024-06-24 14:25:26 +02:00
committed by Gregor Vostrak
parent 75e739f6fb
commit 364168debd
9 changed files with 236 additions and 0 deletions

View File

@@ -39,6 +39,15 @@ class TaskIndexRequest extends FormRequest
return $builder;
}),
],
'done' => [
'string',
'in:true,false,all',
],
];
}
public function getFilterDone(): string
{
return $this->input('done', 'false');
}
}

View File

@@ -35,6 +35,16 @@ class TaskUpdateRequest extends FormRequest
return $builder->where('project_id', '=', $this->task->project_id);
}))->ignore($this->task->getKey())->withCustomTranslation('validation.task_name_already_exists'),
],
'is_done' => [
'boolean',
],
];
}
public function getIsDone(): bool
{
assert($this->has('is_done'));
return $this->boolean('is_done');
}
}