From cb3cd6cb1f0c24b7578fe447ea74cde8d1b60489 Mon Sep 17 00:00:00 2001 From: ardhi Date: Mon, 28 Aug 2023 13:55:01 +0700 Subject: [PATCH 1/2] bug fix isset waypoint on map monitoring --- app/Http/Controllers/MapMonitoringController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/MapMonitoringController.php b/app/Http/Controllers/MapMonitoringController.php index cd68d20..486e3be 100644 --- a/app/Http/Controllers/MapMonitoringController.php +++ b/app/Http/Controllers/MapMonitoringController.php @@ -54,8 +54,8 @@ 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 : '-', - 'wp_lon' => isset($waypoint) ? $waypoint->lon : '-', + 'wp_lat' => isset($waypoint) ? $waypoint->lat : null, + 'wp_lon' => isset($waypoint) ? $waypoint->lon : null, 'wp_time' => isset($waypoint) ? $waypoint->wptime : '-', 'clock_in' => $presensi->clock_in, 'clock_out' => $presensi->clock_out, From 39573779091939714c0036530ea1cc9a096af040 Mon Sep 17 00:00:00 2001 From: ardhi Date: Mon, 28 Aug 2023 13:56:00 +0700 Subject: [PATCH 2/2] bug fix isset waypoint on map monitoring --- app/Http/Controllers/MapMonitoringController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/MapMonitoringController.php b/app/Http/Controllers/MapMonitoringController.php index 486e3be..c98f5c2 100644 --- a/app/Http/Controllers/MapMonitoringController.php +++ b/app/Http/Controllers/MapMonitoringController.php @@ -56,7 +56,7 @@ class MapMonitoringController extends Controller '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 : '-', + 'wp_time' => isset($waypoint) ? $waypoint->wptime : null, 'clock_in' => $presensi->clock_in, 'clock_out' => $presensi->clock_out, 'clock_in_lat' => $presensi->clock_in_lat,