mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-08 08:12:17 +01:00
Added time estimates for projects and tasks, fixes ST-283
This commit is contained in:
committed by
Gregor Vostrak
parent
78ea8a673b
commit
a820d8540f
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user