|
|
@ -399,7 +399,13 @@ class ProjectController extends Controller |
|
|
|
$firstReport = ReportActivityMaterial::where('activity_id', $activity_id)->orderBy('report_date')->first(); |
|
|
|
$firstReport = ReportActivityMaterial::where('activity_id', $activity_id)->orderBy('report_date')->first(); |
|
|
|
$reports[] = ProjectController::setSyncDate($activity_id, $activity, $firstReport); |
|
|
|
$reports[] = ProjectController::setSyncDate($activity_id, $activity, $firstReport); |
|
|
|
} |
|
|
|
} |
|
|
|
$activity->reports = $reports; |
|
|
|
$activity->reports = $reports; |
|
|
|
|
|
|
|
$successor = Link::where('t_activity_id', $activity->id)->first(); |
|
|
|
|
|
|
|
if ($successor) { |
|
|
|
|
|
|
|
$predecessor = Activity::find($successor->s_activity_id); |
|
|
|
|
|
|
|
$activity->start_date = $predecessor->end_date; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
$activity->save(); |
|
|
|
} |
|
|
|
} |
|
|
|
/* return response()->json(['status'=>'success','data'=> $reports,'code'=>200], 200); */ |
|
|
|
/* return response()->json(['status'=>'success','data'=> $reports,'code'=>200], 200); */ |
|
|
|
/* return response()->json(['status'=>'success','data'=> $activities,'code'=>200], 200); */ |
|
|
|
/* return response()->json(['status'=>'success','data'=> $activities,'code'=>200], 200); */ |
|
|
|