Added time estimates for projects and tasks, fixes ST-283

This commit is contained in:
Constantin Graf
2024-07-02 16:36:15 +02:00
committed by Gregor Vostrak
parent 78ea8a673b
commit a820d8540f
18 changed files with 402 additions and 6 deletions

View File

@@ -62,6 +62,12 @@ class ProjectUpdateRequest extends FormRequest
'integer',
'min:0',
],
// Estimated time in seconds
'estimated_time' => [
'nullable',
'integer',
'min:0',
],
];
}
@@ -78,4 +84,11 @@ class ProjectUpdateRequest extends FormRequest
return $input !== null && $input !== 0 ? (int) $this->input('billable_rate') : null;
}
public function getEstimatedTime(): ?int
{
$input = $this->input('estimated_time');
return $input !== null && $input !== 0 ? (int) $this->input('estimated_time') : null;
}
}