
<link rel="stylesheet" href="/css/manage.css">

<div class="topnav">
  <!--  nav bar  -->
    <nav class="navbar navbar-expand-sm bg-dark navbar-dark">
      <a>
        <img src="https://www.una.edu/brand/images/logo/round/UNA-roundLionPurpleW.png.pagespeed.ce.sooHu-qo8w.png" onclick="location.href = 'https:/una.edu/'" alt="buttonpng" height = "30" width = "30" background-color="black" />
        </a>
              <a class="nav-link" onclick="location.href='/index'">Home</a>
              <a class="nav-link" onclick="location.href='/login'">Login</a>
              <a class="nav-link" onclick="location.href='/register'">Register</a>
              <a class="nav-link" onclick="location.href='/manage-bookings'" class="manage-bookings-btn">Manage My Bookings</a>
              <a class="nav-link" href="https://github.com/LoganBeckman21/congenial-barnacle-Group4/blob/main/README.md">About</a>
              
      </div>


<% bookings.forEach(function(booking) { %>
  <div>
      <p>Course: <%= booking.course %></p>
      <p>Time: <%= booking.selectedTime %></p>
      <form method="post" action="/update-booking">
        <input type="hidden" name="bookingId" value="<%= booking._id %>" />
        <input type="text" name="newName" placeholder="Enter new name" value="<%= booking.name %>" required />
        <input type="text" name="newTime" placeholder="Enter new time" value="<%= booking.selectedTime %>" required />
        <button type="submit">Update</button>
    </form>
    
      <form action="/delete-booking" method="post">
          <input type="hidden" name="bookingId" value="<%= booking._id %>" />
          <button type="submit">Delete</button>
      </form>
  </div>
<% }); %>

  

  <footer class="container-fluid text-center">
    <p>Office Hour Application Group 4 - Cumbie Â© 2024</p>
  </footer>
