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
6fc8070569
commit
ecd7891894
1 file changed
+2
-2
@@ -199,6 +199,7 @@ class Office365Service
|
|||||||
|
|
||||||
// ak existuje viac master taskov, pouzijeme posledny
|
// ak existuje viac master taskov, pouzijeme posledny
|
||||||
$mastertask = MasterTask::where('project_id', $project->id)->latest()->first();
|
$mastertask = MasterTask::where('project_id', $project->id)->latest()->first();
|
||||||
|
|
||||||
// ak neexistuje master task k danemu projektu, tak sa subtask neprida
|
// ak neexistuje master task k danemu projektu, tak sa subtask neprida
|
||||||
if ( ! $mastertask) {
|
if ( ! $mastertask) {
|
||||||
continue;
|
continue;
|
||||||
@@ -220,7 +221,6 @@ class Office365Service
|
|||||||
$subtasksToInsert = [];
|
$subtasksToInsert = [];
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
|
|
||||||
// pre kazdeho cloveka z eventu, ktory je zaroven userom v TM vytvorime subtask
|
// pre kazdeho cloveka z eventu, ktory je zaroven userom v TM vytvorime subtask
|
||||||
foreach ($attendees as $attendee) {
|
foreach ($attendees as $attendee) {
|
||||||
$user = User::where('email', $attendee['emailAddress']['address'])->first();
|
$user = User::where('email', $attendee['emailAddress']['address'])->first();
|
||||||
@@ -249,7 +249,7 @@ class Office365Service
|
|||||||
$subtasksToInsert[$i]['description'] = $newSubtask['body']['content'];
|
$subtasksToInsert[$i]['description'] = $newSubtask['body']['content'];
|
||||||
$subtasksToInsert[$i]['deadline'] = $newSubtask['end']['dateTime'];
|
$subtasksToInsert[$i]['deadline'] = $newSubtask['end']['dateTime'];
|
||||||
$subtasksToInsert[$i]['office365_location'] = $newSubtask['location']['displayName'];
|
$subtasksToInsert[$i]['office365_location'] = $newSubtask['location']['displayName'];
|
||||||
$subtasksToInsert[$i]['is_finished'] = 0;
|
$subtasksToInsert[$i++]['is_finished'] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$subtasks = $mastertask->subtasks()->createMany($subtasksToInsert);
|
$subtasks = $mastertask->subtasks()->createMany($subtasksToInsert);
|
||||||
|
|||||||
Reference in new issue
Block a user