<!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.Role%> <%=lan.Permission%> <%=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.Role%> <%=lan.Permission%> <%=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-header d-flex justify-content-end pb-0">
                            <a class="btn btn-square btn-primary b-r-10" type="button" href="/role/add"><%=lan.Add%> <%=lan.Role%> <%=lan.Permission%></a>
                        </div>
                        <div class="card-body">
                            <div class="table-responsive theme-scrollbar">
                                <table class="display" id="basic-1">
                                    <thead>
                                        <tr>
                                            <th><%= lan.hash %></th>
                                            <th><%=lan.Name%></th>
                                            <th><%=lan.Email%></th>
                                            <th><%=lan.Phone%> <%=lan.Number%></th>
                                            <th><%=lan.Status%></th>
                                            <th><%=lan.Action%></th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <% var i = 1 %>
                                        <% role_data.forEach((data) => { %>
                                            <tr>
                                                <td><%= i %></td>
                                                <td><%= data.name %></td>
                                                <td><%= data.email %></td>
                                                <td><%= data.country_code %> <%= data.phone %></td>
                                                <td>
                                                    <% if (data.status == '1') { %>
                                                        <span class="badge badge-success"><%=lan.Active%></span>
                                                    <% } else { %>
                                                        <span class="badge badge-danger"><%=lan.Deactive%></span>
                                                    <% } %>
                                                </td>
                                                <td> 
                                                    <ul class="action"> 
                                                    <li class="edit"> <a href="/role/edit/<%= data.id %>"><i class="icon-pencil-alt"></i></a></li>
                                                    <li class="delete"><a href="/role/delete/<%= data.id %>"><i class="icon-trash"></i></a></li>
                                                    </ul>
                                                </td>
                                            </tr>
                                        <% i++ %>
                                        <% }) %>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
          </div>
          <!-- Container-fluid Ends-->
        </div>

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