->select('tcio.id as clock_in_out_id','mu.id as user_id', 'mu.name as fullname', 'tcio.clock_in', 'tcio.clock_out', 'tcio.clock_in_lat', 'tcio.clock_in_lng',
return response()->json(['status'=>'failed', 'data'=>$data, 'message'=>'Tidak dapat melakukan presensi. Anda belum di assign ke area kerja.','code'=>200], 200);
return response()->json(['status'=>'failed', 'data'=>$data, 'message'=>'Tidak dapat melakukan presensi. Anda berada di luar area kerja.','code'=>200], 200);
}
@ -141,6 +143,7 @@ class PresenceController extends Controller
$check = DB::select(DB::raw("SELECT ST_Intersects(ST_GeomFromGeoJSON('".json_encode($valGeom->geometry)."'), ST_GeomFromText('POINT(".$params->clock_in_lng." ".$params->clock_in_lat.")', 4326)) as boundary"));
}
foreach ($check as $key) {
// assign and in boundary
if($key->boundary){
$temp[]=array(
"activity_id" => $dataGeom->id,
@ -149,18 +152,22 @@ class PresenceController extends Controller