Files

42 lines
1.9 KiB
Plaintext

<section>
<h1>Inventory</h1>
<button class="btn btn-primary" id="syncInventory">Sync Inventory</button>
<button class="btn btn-primary" id="newSku">Add SKU</button>
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th>Image</th>
<th>SKU</th>
<th>Name</th>
<th>In Stock</th>
<th>True Quantity</th>
<th>Website Quantity</th>
<th>eBay Quantity</th>
<th>WooCommerce Price</th>
<th>eBay Price</th>
<th>Edit Product</th>
</tr>
</thead>
<tbody>
<% inventory.forEach(item => { %>
<tr>
<td><img src="<%= item.image %>" alt="Item Image" style="width:100px;height:100px;"></td>
<td><%= item.sku %></td>
<td><%= item.name %></td>
<td><% if (item.inStock == 1){ %> In Stock <% } else{ %> Out of Stock <% } %></td>
<td><%= item.trueQuantity %></td>
<td><% if (item.websiteQuantity == null){ %> Unlisted <% } else{ %> <%= item.websiteQuantity %> <%} %></td>
<td><% if (item.ebayQuantity == null){ %> Unlisted <% } else{ %> <%= item.ebayQuantity %> <%} %></td>
<td><% if (item.websitePrice == null){ %> Unlisted <% } else{ %> <%= item.websitePrice %> <%} %></td>
<td><% if (item.ebayPrice == null){ %> Unlisted <% } else{ %> <%= item.ebayPrice %> <%} %></td>
<td><button class="btn btn-primary" id="editBtn-<%= item.sku %>">Edit</button></td>
</tr>
<% }) %>
</tbody>
</table>
</div>
</section>
<script src="/javascripts/inventory.js"></script>