<!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.Running%> <%=lan.Rides%> <%=lan.List%></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.Running%> <%=lan.Rides%> <%=lan.List%></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="table-responsive theme-scrollbar">
                                <table class="display" id="basic-1">
                                    <thead>
                                        <tr>
                                            <th><%= lan.number %></th>
                                            <th><%=lan.Rider%></th>
                                            <th><%=lan.Driver%></th>
                                            <th><%=lan.Pickup%> <%=lan.Location%></th>
                                            <th><%=lan.Destination%></th>
                                            <th><%=lan.Ride%> <%=lan.Fare%></th>
                                            <th><%=lan.Module%> <%=lan.Type%></th>
                                            <th><%=lan.Action%></th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <% var i = 1 %>
                                        <% rd.forEach((data) => { %>
                                            <tr>
                                                <td><%= i %></td>
                                                <td><%= data.cname %></td>
                                                <td><%= data.dfname %> <%= data.dlname %></td>
                                                <td>
                                                  <%= data.pic_address.length < 40 ? data.pic_address : data.pic_address.slice(0, 40) + '...' %>
                                                </td>
                                                <td>
                                                  <%= data.drop_address.length < 40 ? data.drop_address : data.drop_address.slice(0, 40) + '...' %>
                                                </td>
                                                <td class="invosymbol"><%= data.price %></td>
                                                <td><%= data.mode_title%></td>
                                                <td>
                                                    <a class="dropbtn btn-primary px-3 py-1 b-r-5 f-14 f-w-400" href="/rides/rdetail/<%= data.id %>"><%=lan.Details%></a>
                                                </td>
                                            </tr>
                                        <% i++ %>
                                        <% }) %>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
          </div>
          <!-- Container-fluid Ends-->
        </div>

    <%- include('./partials/footer'); -%>
    <%- include('./partials/script'); -%>
  </body>
</html>