mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
no message
This commit is contained in:
1 parent
cc6e37c959
commit
7320e82212
2 files changed
+8
-1
No files matched your search
@@ -151,7 +151,7 @@ class MasterTaskController extends Controller
|
||||
foreach ($mastertask->subtasks as $subtask) {
|
||||
if ($subtask->timesheets()->exists()) {
|
||||
return response()->json([
|
||||
'message' => 'Cannot delete mastertask containing subtasks submitted timesheets.',
|
||||
'message' => 'Cannot delete mastertask containing subtasks with submitted timesheets.',
|
||||
], 400);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -162,6 +162,13 @@ class SubTaskController extends Controller
|
||||
{
|
||||
$subtask = SubTask::find($id);
|
||||
|
||||
// ak je Master task v stave ukončený, nedovolime update
|
||||
if ($subtask->is_finished == 1) {
|
||||
return response()->json([
|
||||
'message' => 'Cannot update subtask with is_finished 1.',
|
||||
], 400);
|
||||
}
|
||||
|
||||
$validator = Validator::make($request->all(), [
|
||||
'data.employee_id' => 'required',
|
||||
'data.duration' => 'required',
|
||||
|
||||
Reference in new issue
Block a user