assetflow/src/frontend/dashboard.eta.html

63 lines
2.0 KiB
HTML
Raw Normal View History

2023-05-04 20:21:10 +02:00
<%~ E.includeFile("partials/head.eta.html", {"title": "Dashboard"}) %> <%~ E.includeFile("partials/controls.eta.html", {"active": "Dashboard"}) %>
<h1 onclick="doTheConfetti()" class="user-select-none">Good evening, ${user}</h1>
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>
<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>
<% if(user.status == "normal") { %>
<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") %>