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
804a4b76e8
commit
450379dd24
1 file changed
+6
-4
@@ -174,6 +174,12 @@ class SubTaskController extends Controller
|
||||
$mastertask = MasterTask::find($mastertask_id);
|
||||
$subtasks = $mastertask->subtasks()->createMany($request->all()['data']['employees']);
|
||||
|
||||
// syncnutie timeblocks
|
||||
foreach ( $request->all()['data']['employees'] as $key => $employee ) {
|
||||
if ($data['data']['employees'][$key]['user_id'] == $employee['id'])
|
||||
$subtasks[$key]->syncTimeblocks($data['data']['employees'][$key]['timeblocks']);
|
||||
}
|
||||
|
||||
// upload attachmentu
|
||||
if ($request->file('data')) {
|
||||
$attachments = Attachment::uploadAttachmentsToS3($request->file('data')['files'], $mastertask);
|
||||
@@ -184,10 +190,6 @@ class SubTaskController extends Controller
|
||||
if ($request->file('data')) {
|
||||
$subtask->attachments()->createMany($attachments);
|
||||
}
|
||||
|
||||
// syncnutie timeblocks
|
||||
if ($data['data']['user_id'] == $subtask->user_id)
|
||||
$subtask->syncTimeblocks($data['data']['timeblocks']);
|
||||
}
|
||||
|
||||
return response()->json([
|
||||
|
||||
Reference in new issue
Block a user