mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-08 00:02:15 +01:00
Add ability to set task to done, fixes ST-244
This commit is contained in:
committed by
Gregor Vostrak
parent
75e739f6fb
commit
364168debd
@@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user