Browse Source

fix endline, fix sync report

pull/3/head
wahyu 1 year ago
parent
commit
0d74de7e74
  1. 8
      app/Http/Controllers/ProjectController.php

8
app/Http/Controllers/ProjectController.php

@ -399,7 +399,13 @@ class ProjectController extends Controller
$firstReport = ReportActivityMaterial::where('activity_id', $activity_id)->orderBy('report_date')->first();
$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'=> $activities,'code'=>200], 200); */

Loading…
Cancel
Save