<!DOCTYPE html>
<html lang="en">
  
<head>
    <%- include('./partials/head'); -%>
    
</head>
<body onload="startTime()">
    <%- include('./partials/header_sidebar'); -%>
    
    <!-- tap on top starts-->

        <!-- Page Sidebar Ends-->
        <div class="page-body">
          <div class="container-fluid">
            <div class="page-title">
              <div class="row">
                <div class="col-sm-6">
                  <h3><%=lan.Edit%> <%=lan.Zone%></h3>
                </div>
                <div class="col-sm-6">
                  <ol class="breadcrumb">
                    <li class="breadcrumb-item"><a href="/index"><i data-feather="home"></i></a></li>
                    <li class="breadcrumb-item"><%=lan.Dashboard%></li>
                    <li class="breadcrumb-item active"><%=lan.Edit%> <%=lan.Zone%></li>
                  </ol>
                </div>
              </div>
            </div>
          </div>
          <!-- Container-fluid starts-->
          <div class="container-fluid">
            <div class="row">
                <div class="col-sm-12">
                    <div class="card">
                        <div class="card-body">
                            <div class="row">
                                <div class="col-sm-12 col-md-6 col-lg-6 col-xl-6 form-group">
                                <label class="col-form-label"><%=lan.Zone%> <%=lan.List%></label>
                                    <select class="js-example-basic-single" id="zonedlist" required>
                                        <% zone_data.forEach((zdata) => { %>
                                            <option value="<%=zdata.id%>"><%=zdata.name%></option>
                                        <% }) %>
                                    </select>
                                </div>
                                <div class="col-sm-12 col-md-6 col-lg-6 col-xl-6 form-group">
                                    <label class="col-form-label"><%=lan.Vehicle%> <%=lan.List%></label>
                                    <select class="js-example-basic-single" id="zonevehicle" required>
                                        <option value="0"><%=lan.All%> <%=lan.Vehicle%></option>
                                        <% vehicle.forEach((vdata) => { %>
                                            <option value="<%=vdata.id%>"><%=vdata.name%></option>
                                        <% }) %>
                                    </select>
                                </div>
                                <div class="col-12">
                                    <div id="map-canvas-edit" style="height: 85vh; width: 100%;"></div>
                                    <textarea name="zone_lat_lon" id="add_lat_lon" cols="30" rows="10" hidden></textarea>
                                </div>

                                <!-- <input type="hidden" name="zone_id" id="zone_id" value="<%=zone_data[0].id%>">
                                <input type="hidden" id="old_lat_lon" value="<%=zone_data[0].lat_lon%>"> -->

                            </div>
                        </div>
                    </div>

                </div>
            </div>
          </div>
          <!-- Container-fluid Ends-->
        </div>
        
        <script src="https://maps.googleapis.com/maps/api/js?key=<%= general.google_map_key %>&libraries=drawing&callback=initMap"></script>
        <script src="../../js/map_driver_location.js"></script>
        
        <%- include('./partials/footer'); -%>
        <%- include('./partials/script'); -%>
        <script src="/socket.io/socket.io.js"></script>
        <script src="../socket_function.js"></script>
  </body>
</html>