<% if(errorMessage) { %>
<% } %> <% if(message) { %>
<% } %>

Books

<% if(books.length != 0) { %>
<% books.forEach((book, index) => { %> <% }); %>
ID Name Author Year Genre ISBN ISBN10 Copies Actions
<%= index + 1 %> <%= book.data.name %> <%= book.data.author %> <%= book.data.year %> <%= book.data.genre %> <%= book.data.ISBN %> <%= book.data.ISBN10 %> <%= book.data.checkout.length %> / <%= book.data.copies %> <% if (!user.checkout.includes(book.ID)) { %> Checkout <% } %> <% if (user.checkout.includes(book.ID)) { %> Return <% } %> <% if (user.role == "admin") { %> <% if (book.data.checkout.length === 0) { %> View <%= book.data.checkout.length %> Users <% } else { %> View <%= book.data.checkout.length %> Users <% } %> Edit <% } %>
<% } else {%>

No Books in Database

<% }%>
Home <% if (user.role == "admin") { %> Add Book <% } %> Checkout Book via Scan