38 lines
1.5 KiB
Plaintext
38 lines
1.5 KiB
Plaintext
<section>
|
|
<h1>Orders</h1>
|
|
<% if (orders.length > 0) { %>
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>Order ID</th>
|
|
<th>Platform</th>
|
|
<th>Buyer Name</th>
|
|
<th>Profit</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% orders.forEach(order => { %>
|
|
<tr>
|
|
<td><a href="/orders/<%= order._id %>"><%= order.orderId %></a></td>
|
|
<td><%= order.platform %></td>
|
|
<td><%= order.buyerName %></td>
|
|
<td><% if (order.profit > 0) { %><span class="text-success"><%= order.profit %></span><% } else { %><span class="text-danger"><%= order.profit %></span><% } %></td>
|
|
</tr>
|
|
<% }) %>
|
|
</tbody>
|
|
</table>
|
|
|
|
<h1>Orders</h1>
|
|
|
|
<% if (orders.length) { %>
|
|
<ul class="list-group mb-3">
|
|
<% orders.forEach(order => { %>
|
|
<li class="list-group-item d-flex justify-content-between align-items-center">
|
|
<%= order._id %> - <%= order.platform %> - <%= order.buyerName %><br>
|
|
<small class="text-muted"><span class="badge bg-primary rounded-pill me-2">Profit: $<%= order.profit %></span><a href="/orders/<%= order._id %>" class="btn btn-sm btn-primary ml-auto">View Details</a></small>
|
|
</li>
|
|
<% }) %>
|
|
</ul>
|
|
<% }} else { %>
|
|
<p>No orders found.</p>
|
|
<% } %> |