Added ability to archive projects and clients, fixes ST-37

This commit is contained in:
Constantin Graf
2024-06-24 13:36:30 +02:00
committed by Gregor Vostrak
parent f21a2d4bdd
commit a69d1cb4c4
17 changed files with 524 additions and 10 deletions

View File

@@ -47,6 +47,9 @@ class ProjectUpdateRequest extends FormRequest
'required',
'boolean',
],
'is_archived' => [
'boolean',
],
'client_id' => [
'nullable',
new ExistsEloquent(Client::class, null, function (Builder $builder): Builder {
@@ -66,6 +69,13 @@ class ProjectUpdateRequest extends FormRequest
];
}
public function getIsArchived(): bool
{
assert($this->has('is_archived'));
return (bool) $this->input('is_archived');
}
public function getBillableRate(): ?int
{
$input = $this->input('billable_rate');