|
|
@ -38,10 +38,14 @@ class MapMonitoringController extends Controller |
|
|
|
'tcio.clock_in_loc', |
|
|
|
'tcio.clock_in_loc', |
|
|
|
'tcio.clock_out_loc', |
|
|
|
'tcio.clock_out_loc', |
|
|
|
'tcio.date_presence', |
|
|
|
'tcio.date_presence', |
|
|
|
|
|
|
|
'mw.lat', |
|
|
|
|
|
|
|
'mw.lon', |
|
|
|
|
|
|
|
'mw.wptime' |
|
|
|
) |
|
|
|
) |
|
|
|
->join('m_users as mu', 'mu.id', '=', 'tcio.user_id') |
|
|
|
->join('m_users as mu', 'mu.id', '=', 'tcio.user_id') |
|
|
|
|
|
|
|
->join('m_waypoint as mw', 'mu.id', '=', 'mw.user_id') |
|
|
|
->where('mu.id', $key->user_id) |
|
|
|
->where('mu.id', $key->user_id) |
|
|
|
->orderBy('tcio.id', 'DESC') |
|
|
|
->orderBy('mw.wptime', 'DESC') |
|
|
|
->first(); |
|
|
|
->first(); |
|
|
|
$project = DB::table('assign_hr_to_proyek as ahtp') |
|
|
|
$project = DB::table('assign_hr_to_proyek as ahtp') |
|
|
|
->select('ahtp.proyek_id as id', 'mp.nama as project_name') |
|
|
|
->select('ahtp.proyek_id as id', 'mp.nama as project_name') |
|
|
@ -53,6 +57,9 @@ class MapMonitoringController extends Controller |
|
|
|
$image = DB::table('m_image')->select('image')->where('category', 'presensi')->where('ref_id', $presensi->clock_in_out_id)->first(); |
|
|
|
$image = DB::table('m_image')->select('image')->where('category', 'presensi')->where('ref_id', $presensi->clock_in_out_id)->first(); |
|
|
|
$tmp[] = array( |
|
|
|
$tmp[] = array( |
|
|
|
'user_id' => $presensi->user_id, |
|
|
|
'user_id' => $presensi->user_id, |
|
|
|
|
|
|
|
'wp_lat' => $presensi->lat, |
|
|
|
|
|
|
|
'wp_lon' => $presensi->lon, |
|
|
|
|
|
|
|
'wp_time' => $presensi->wptime, |
|
|
|
'clock_in' => $presensi->clock_in, |
|
|
|
'clock_in' => $presensi->clock_in, |
|
|
|
'clock_out' => $presensi->clock_out, |
|
|
|
'clock_out' => $presensi->clock_out, |
|
|
|
'clock_in_lat' => $presensi->clock_in_lat, |
|
|
|
'clock_in_lat' => $presensi->clock_in_lat, |
|
|
|