78 lines
3.5 KiB
Plaintext
78 lines
3.5 KiB
Plaintext
<!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">
|
|
<title>Hello world!</title>
|
|
|
|
<!-- Links -->
|
|
<link href="style.css" rel="stylesheet" type="text/css">
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-iYQeCzEYFbKjA/T2uDLTpkwGzCiq6soy8tYaI1GyVh/UjpbCx/TYkiZhlZB6+fzT" crossorigin="anonymous">
|
|
</head>
|
|
<body>
|
|
<nav class="navbar navbar-expand-lg bg-light">
|
|
<div class="container-fluid">
|
|
<a class="navbar-brand" href="#">MangoShelf early demo</a>
|
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
|
|
<span class="navbar-toggler-icon"></span>
|
|
</button>
|
|
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
|
|
<div class="navbar-nav">
|
|
<a class="nav-link active" aria-current="page" href="/dashboard">Dashboard</a>
|
|
<a class="nav-link" href="/stock">Stock</a>
|
|
<a class="nav-link" href="/parts">Parts</a>
|
|
<a class="nav-link" href="/assets">Assets</a>
|
|
<a class="nav-link" href="/orders">Ordes</a>
|
|
<a class="nav-link" href="/admin">Admin</a>
|
|
<a class="nav-link disabled"> Logged in as: <%= results[0].name %></a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
<div class="container-fluid">
|
|
<% if(site == 2) { %>
|
|
<h1>Inventory</h1>
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th scope="col">#</th>
|
|
<th scope="col">Name</th>
|
|
<th scope="col">Description</th>
|
|
<th scope="col">Status</th>
|
|
<th scope="col">Category</th>
|
|
<th scope="col">Amount</th>
|
|
<th scope="col">Location</th>
|
|
<th scope="col">Expiry date</th>
|
|
<th scope="col">Last updated</th>
|
|
<th scope="col">Order id</th>
|
|
<th scope="col">Notes</th>
|
|
<th scope="col">Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% for (let i = 0; i < results.length; i++) { %>
|
|
<tr>
|
|
<th scope="row"><%= i + 1 %></th>
|
|
<td><%= results[i].name %></td>
|
|
<td><%= results[i].description %></td>
|
|
<td><%= results[i].status %></td>
|
|
<td><%= results[i].category %></td>
|
|
<td><%= results[i].amount %></td>
|
|
<td><%= results[i].location %></td>
|
|
<td><%= results[i].expiry %></td>
|
|
<td><%= results[i].lastupdate %></td>
|
|
<td><%= results[i].orderid %></td>
|
|
<td><%= results[i].notes %></td>
|
|
<td><button type="button" class="btn btn-warning">Edit</button> <button type="button" class="btn btn-danger" onclick='location.href="/api/live/inventory/delete/<%= i %>"'>Delete</button></td>
|
|
</tr>
|
|
<% } %>
|
|
</tbody>
|
|
</table>
|
|
<% } %>
|
|
</div>
|
|
<script src="script.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.1/dist/js/bootstrap.bundle.min.js" integrity="sha384-u1OknCvxWvY5kfmNBILK2hRnQC3Pr17a+RTT6rIHI7NnikvbZlHgTPOOmMi466C8" crossorigin="anonymous"></script>
|
|
</body>
|
|
</html> |