<%- include('partials/_header/'); %>



  <div class="cont-1300">

    <div class="listado-tabla">
      
 <div class="buscador">

        <h6>Compañias del Sistema</h6>
          <a href="/addcompania" class="agregar"><button type="button" class="btn btn-dark" style="font-size: 10px;"><i
              class="fa-solid fa-plus"></i>Agregar</button></a>
 </div>
      <div class="table-responsive">
        <table class="table table-hover">
          <thead>
            <tr style="font-size: 10px;">             
              <th scope="col">Nombre de la Compañia</th>
              <th scope="col">Menú</th>
            </tr>
          </thead>
          <tbody>
            <% if (data) { %>

              <% for (var i=0; i < data.companias.length; i++) { %>
                <tr style="font-size: 10px;"></tr>
               
                  <td class=" col-puesto" style="font-size: 10px;">
                    <%= data.companias[i].Nombre_Compania %>
                </td>
               
                    <td>
                        
                          <a href="/edit_compania/<%= data.companias[i].Id_Compania %> "><i
                              style="color:rgb(93, 148, 86); font-size: 10px;" class="fa-solid fa-pencil"></i><span
                              style="font-size: 10px;"> Ver Compañia</span></a>
                    </td>



              <% } %>
            <% } %>

          </tbody>

        </table>
      </div>
    </div>
  </div>
  <script src="//cdn.jsdelivr.net/npm/sweetalert2@10"></script>

<% if(typeof alert !="undefined" ) { %>
    <script>
      Swal.fire({
        title: '<%= alertTitle %>',
        text: '<%= alertMessage %>',
        icon: '<%= alertIcon %>',
        showConfirmButton: <%= showConfirmButton %> ,
        timer: <%= 1500 %>             
        }).then(() => {
          window.location = '<%= ruta %>'
        })

    </script>
<% } %>





<%- include('partials/_footer'); %>