<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta2/css/all.min.css" />

    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta2/css/all.min.css" />

    <link
      href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css"
      rel="stylesheet"
      integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC"
      crossorigin="anonymous"
    />


    <title>Document</title>
  </head>
  <body>
    <header>

      <div class="navbar">


          <li class="navleft"><img id="favicon" src="/assets/images/favicon.jpeg" alt="Italian Trulli"></li>
          <ul id="nav" class="navright">

              <li><a href="/home">Home <i class="fa-solid fa-house"></i></a></li>
              <li><a href="/home#statistics">Statistics <i class="fa-solid fa-list-ol"></i></a></li>
              <li><a href="/home#rental">Rental <i class="fa-solid fa-cart-plus"></i></a></li>
              <li><a href="/home#contact">Contact <i class="fa-solid fa-phone"></i></a></li>
            
          </ul>


      </div>
  </header>
        <div class="container pt-4">
          <div class="p-4 m-4">
            <div class="col-lg-8 border rounded mx-auto one">
              <h3>
                <div class="alert alert-danger two" role="alert">
                  <b>Past orders</b>
                </div>
              </h3>

              <div>
                <table class="table">
                  <thead>
                    <tr>
                      <th>Equipment name</th>
                      <th>Hospital</th>
                      <th>Quantity</th>
                      <th>Cost</th>
                    </tr>
                  </thead>

                  <tbody>
                    <%if(transactions.length==0){%>
                        <h1>No Past Orders</h1>
                    <%}else{%>
                    <!-- for loop displaying the content of table and then enclose alll these-->
                    <%transactions.forEach(function(pastOrder){%>
                        <tr>
                            <td><%=pastOrder.equipmentName%></td>
                            <td><%=pastOrder.hospitalName%></td>
                            <td><%=pastOrder.equipmentPurchased%></td>
                            <td><%=pastOrder.equipmentCost%></td>
                            <td>
      
                            </td>
                          </tr>
                    <%})%>
                    <%}%>
                  </tbody>
                </table>
              </div>
            </div>
          </div>
        </div>

        <script
          src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/js/bootstrap.bundle.min.js"
          integrity="sha384-OERcA2EqjJCMA+/3y+gxIOqMEjwtxJY7qPCqsdltbNJuaOe923+mo//f6V8Qbsw3"
          crossorigin="anonymous"
        ></script>
      </body>
      <style>
     .one{
        background-color: #f7ffed;    
     }
        body{
            background-image: url(./backgroundimage.jpeg);
        }
        .two{
            background-color: #96cfa7;        }
            .container{
                position: absolute;
                top: 8rem;
            }

:root{
  --main-bg-color:rgb(247,237,237);
  --rental-bg-color: rgb(211,234,215);
  --cardcolour-1:rgb(211,227,197);
  --white:white;
  --cardcolour-2:#e4e4e4;
  --statisticscolor:rgb(211,227,197);
  --fontcolor:black;
  --fontcolor2:rgb(115, 104, 104);
  --shadowcolor:rgb(0, 0, 0);
}

.navbar a{
  background-color: rgb(255, 185, 185);
  color: rgb(0, 0, 0);
  border: solid;
  padding: 15px;
  text-align: center;
  text-decoration: none;
}
body{
  background-image: url("/assets/images/backgroundimage.jpeg");
}
header{
position: fixed;
top: 0;
width: 100%;
background: linear-gradient(var(--cardcolour-2), var(--cardcolour-1));

z-index: 100000;
}
.navbar{
display: flex;
justify-content: space-between;
  color: rgb(0, 0, 0);
margin: none;
padding: 0%;

}
li{
  list-style-type: none;
}
ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
}
.navleft img{
  margin-left: 1em;
  float: left;
  width: 70px;
  height: 60px;

border-radius: 50%;
}
#favicon{
cursor: pointer;
}
.navright{
  margin-top: -10px;
}
.navright li{
display: inline-block;
margin-top: 1em;
/* text-shadow: 0 0 20px #6d8cff, 0 0 30px #0060e6; */

  margin-right: 2em;
}
#nav li a {
color: var(--fontcolor);
background: var(--main-bg-color);
}
.navright li a{
  transition: all 0.1 ease 0s;
}

.navright li a:hover{
  color: rgb(0, 0, 0);
  box-shadow: 0px 0px 10px 0 rgba(0, 0, 0, 0.982), 0 0px 10px 0 rgb(170, 170, 170);
}

      </style>
</html>