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
47a31f5c3a
commit
526b3896f5
2 files changed
+4
-4
No files matched your search
@@ -115,8 +115,8 @@ class MasterTaskController extends Controller
|
|||||||
|
|
||||||
$mastertask = MasterTask::find($id);
|
$mastertask = MasterTask::find($id);
|
||||||
|
|
||||||
// ak je Master task v stave ukončený, nedovolime update
|
// ak je Master task v stave ukončený, nedovolime update. vynimkou je iba znovuotvorenie mastertasku
|
||||||
if ($mastertask->is_finished == 1) {
|
if ($mastertask->is_finished == 1 && isset($request->all()['data']['is_finished']) && $request->all()['data']['is_finished'] == 1) {
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'message' => 'Cannot update mastertask with is_finished 1.',
|
'message' => 'Cannot update mastertask with is_finished 1.',
|
||||||
], 400);
|
], 400);
|
||||||
|
|||||||
@@ -162,8 +162,8 @@ class SubTaskController extends Controller
|
|||||||
{
|
{
|
||||||
$subtask = SubTask::find($id);
|
$subtask = SubTask::find($id);
|
||||||
|
|
||||||
// ak je sub task v stave ukončený, nedovolime update
|
// ak je sub task v stave ukončený, nedovolime update. vynimkou je iba znovuotvorenie mastertasku
|
||||||
if ($subtask->is_finished == 1) {
|
if ($subtask->is_finished == 1 && isset($request->all()['data']['is_finished']) && $request->all()['data']['is_finished'] == 1) {
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'message' => 'Cannot update subtask with is_finished 1.',
|
'message' => 'Cannot update subtask with is_finished 1.',
|
||||||
], 400);
|
], 400);
|
||||||
|
|||||||
Reference in new issue
Block a user