2023-05-04 20:21:10 +02:00
|
|
|
<%~ E.includeFile("partials/head.eta.html", {"title": "Dashboard"}) %> <%~ E.includeFile("partials/controls.eta.html", {"active": "Dashboard"}) %>
|
|
|
|
|
2023-07-07 22:15:50 +02:00
|
|
|
<h1 onclick="doTheConfetti()" class="user-select-none" id="greeting">Good evening, ${user}</h1>
|
|
|
|
<script>
|
|
|
|
// Handle greeting
|
|
|
|
var today = new Date();
|
|
|
|
var curHr = today.getHours();
|
|
|
|
|
|
|
|
if (curHr < 12) {
|
|
|
|
document.getElementById("greeting").innerHTML = "Good morning";
|
|
|
|
} else if (curHr < 18) {
|
|
|
|
document.getElementById("greeting").innerHTML = "Good afternoon";
|
|
|
|
} else {
|
|
|
|
document.getElementById("greeting").innerHTML = "Good evening";
|
|
|
|
}
|
|
|
|
</script>
|
2023-05-04 20:21:10 +02:00
|
|
|
<div class="container text-center">
|
|
|
|
<div class="row">
|
|
|
|
<div class="card col m-2">
|
|
|
|
<div class="card-body">
|
|
|
|
<h5 class="card-title">+10</h5>
|
|
|
|
<p class="card-text">New Stock</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="card col m-2">
|
|
|
|
<div class="card-body">
|
|
|
|
<h5 class="card-title"><%= it.stats.total %></h5>
|
|
|
|
<p class="card-text">Items in total</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="card col m-2">
|
|
|
|
<div class="card-body">
|
|
|
|
<h5 class="card-title">Everything ok</h5>
|
|
|
|
<p class="card-text">Instance Status</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-05-15 18:49:02 +02:00
|
|
|
|
2023-05-04 20:21:10 +02:00
|
|
|
<h2>Recent items</h2>
|
|
|
|
<div class="container">
|
|
|
|
<table class="table">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
2023-05-13 00:42:15 +02:00
|
|
|
<th scope="col">SKU</th>
|
2023-05-04 20:21:10 +02:00
|
|
|
<th scope="col">Name</th>
|
|
|
|
<th scope="col">Status</th>
|
2023-05-16 00:05:39 +02:00
|
|
|
<!--<th scope="col">Actions</th>-->
|
2023-05-04 20:21:10 +02:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<% it.recents.forEach(function(user){ %>
|
|
|
|
<tr>
|
2023-06-06 23:49:16 +02:00
|
|
|
<th scope="row" data-bs-toggle="tooltip" data-bs-placement="left" data-bs-title="ID: <%= user.id %>"><% if (user.SKU == null) { %>
|
|
|
|
<i>No SKU assigned</i>
|
|
|
|
<% } else { %> <%= user.SKU %> <% } %></th>
|
2023-05-04 20:21:10 +02:00
|
|
|
<td><%= user.name %></td>
|
2023-05-17 22:07:36 +02:00
|
|
|
<% if(user.status == "normal") { %>
|
|
|
|
|
2023-05-23 22:18:42 +02:00
|
|
|
<td><span class="badge text-bg-success"><%= user.status %></span></td>
|
|
|
|
<% } else if(user.status == "stolen") { %>
|
|
|
|
<td><span class="badge text-bg-danger"><%= user.status %></span></td>
|
|
|
|
<% } else if(user.status == "lost") { %>
|
|
|
|
<td><span class="badge text-bg-warning"><%= user.status %></span></td>
|
|
|
|
<% } else if(user.status == "borrowed") { %>
|
|
|
|
<td><span class="badge text-bg-info"><%= user.status %></span></td>
|
|
|
|
<% } %>
|
2023-05-16 00:05:39 +02:00
|
|
|
<!--<td><a href="#" class="btn btn-primary">Edit</a></td>-->
|
2023-05-04 20:21:10 +02:00
|
|
|
</tr>
|
|
|
|
<% }) %>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<%~ E.includeFile("partials/controlsFoot.eta.html") %> <%~ E.includeFile("partials/foot.eta.html") %>
|