2022-09-16 21:57:13 +02:00
|
|
|
<!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>
|
2022-09-19 23:55:23 +02:00
|
|
|
<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">
|
2022-09-20 12:19:01 +02:00
|
|
|
<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>
|
2022-09-19 23:55:23 +02:00
|
|
|
</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>
|
2022-09-20 12:19:01 +02:00
|
|
|
<th scope="col">Description</th>
|
|
|
|
<th scope="col">Status</th>
|
|
|
|
<th scope="col">Category</th>
|
2022-09-19 23:55:23 +02:00
|
|
|
<th scope="col">Amount</th>
|
2022-09-20 12:19:01 +02:00
|
|
|
<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>
|
2022-09-19 23:55:23 +02:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
2022-09-20 12:19:01 +02:00
|
|
|
<% for (let i = 0; i < results.length; i++) { %>
|
2022-09-19 23:55:23 +02:00
|
|
|
<tr>
|
|
|
|
<th scope="row"><%= i + 1 %></th>
|
2022-09-20 12:19:01 +02:00
|
|
|
<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>
|
2022-09-19 23:55:23 +02:00
|
|
|
</tr>
|
|
|
|
<% } %>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<% } %>
|
|
|
|
</div>
|
2022-09-20 12:19:01 +02:00
|
|
|
<script src="script.js"></script>
|
2022-09-16 21:57:13 +02:00
|
|
|
<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>
|