|
@@ -340,6 +340,15 @@ class ApiController extends Controller
|
|
$student_course->end_date = Carbon::createFromTimestamp(strtotime($student_course->apply_date))->addDays($student_course->duration)->toDateString();
|
|
$student_course->end_date = Carbon::createFromTimestamp(strtotime($student_course->apply_date))->addDays($student_course->duration)->toDateString();
|
|
$student_course->short_leave_times = $student->short_leave_times;
|
|
$student_course->short_leave_times = $student->short_leave_times;
|
|
$student_course->long_leave_times = $student->long_leave_times;
|
|
$student_course->long_leave_times = $student->long_leave_times;
|
|
|
|
+
|
|
|
|
+ $today = Carbon::today();
|
|
|
|
+ $this_week_begin = null;
|
|
|
|
+ while($today->dayOfWeekIso != 1) {
|
|
|
|
+ $today = $today->subDay();
|
|
|
|
+ }
|
|
|
|
+ $this_week_begin = $today->toDateTimeString();
|
|
|
|
+ $this_week_end = $today->addDays(7)->toDateTimeString();
|
|
|
|
+
|
|
return response()->json(['status' => 'success', 'courseInfo' => $student_course]);
|
|
return response()->json(['status' => 'success', 'courseInfo' => $student_course]);
|
|
}
|
|
}
|
|
|
|
|