diff --git a/app/Http/Controllers/MapMonitoringController.php b/app/Http/Controllers/MapMonitoringController.php index c98f5c2..5c17475 100644 --- a/app/Http/Controllers/MapMonitoringController.php +++ b/app/Http/Controllers/MapMonitoringController.php @@ -54,9 +54,9 @@ class MapMonitoringController extends Controller $waypoint = DB::table('m_waypoint')->select('lat', 'lon', 'wptime')->where('user_id', $presensi->user_id)->orderBy('wptime', 'DESC')->first(); $tmp[] = array( 'user_id' => $presensi->user_id, - 'wp_lat' => isset($waypoint) ? $waypoint->lat : null, - 'wp_lon' => isset($waypoint) ? $waypoint->lon : null, - 'wp_time' => isset($waypoint) ? $waypoint->wptime : null, + 'wp_lat' => isset($waypoint) ? $waypoint->lat : $presensi->clock_in_lat, + 'wp_lon' => isset($waypoint) ? $waypoint->lon : $presensi->clock_in_lng, + 'wp_time' => isset($waypoint) ? $waypoint->wptime : $presensi->clock_in, 'clock_in' => $presensi->clock_in, 'clock_out' => $presensi->clock_out, 'clock_in_lat' => $presensi->clock_in_lat,