<%- include('partials/_header/'); %>



  <div class="cont-1300">

    <div class="listado-tabla">
      <div class="buscador">

        <h6>Ramas del Sistema</h6>
          <a href="/addrama" 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">N° Rama</th>
              <th scope="col">Nombre de Rama</th>
              <th scope="col">Menú</th>
            </tr>
          </thead>
          <tbody>
            <% if (data) { %>

              <% for (var i=0; i < data.ramas.length; i++) { %>
                <tr style="font-size: 10px;"></tr>

                <td style="font-size: 10px;">
                  <%= data.ramas[i].Id_Rama  %></td>
                  <td class=" col-puesto" style="font-size: 10px;">
                    <%= data.ramas[i].Nombre_Rama %>
                </td>
               
                    <td>
                        
                          <a href="/edit_rama/<%= data.ramas[i].Id_Rama %> "><i
                              style="color:rgb(93, 148, 86); font-size: 10px;" class="fa-solid fa-pencil"></i><span
                              style="font-size: 10px;"> Ver Rama</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'); %>