<% include ../partials/header %>
<% include ../partials/userNav %>

<% include ../partials/alerts %>

<!-- BOOK INVENTORY -->
<section id="courseInventory" class="mt-5">
  <div class="container">
    <div class="row">
      <div class="col">
        <div class="card transparent-container">
          <table class="table table-striped">
            <thead class="thead-inverse">
              <tr>
                
                <th>Student Name</th>
                <th>Student Mentor</th>
                <th>Batch</th>
                <th>Attendance</th>
              </tr>
            </thead>
            <tbody>
              
          <% classes.forEach(student => { %>         
         
              <tr>

                <td><%= student.name %></td>
                <td><%= student.mentor %></td>
                <td><%= student.batch %></td>
                
                <td>
                    <span>
                        <% console.log(student.id); %>
                        <a href="/students/present/<%=student.id%>/<%=id._id%>" class="addup-btn">Present</a>
                        <a href="/students/absent/<%=student.id%>/<%=id._id%>" class="adddl-btn">Absent</a>
                    </span>
                </td>
              </tr>
          <% }); %>
              
            </tbody>
          </table>
          </div>
         </div>
        </div>
    </div>
</section>