inventory.ejs 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <link rel="stylesheet" href="/inventory/inventory.css">
  5. <link rel="stylesheet" href="/shared/shared.css">
  6. </head>
  7. <body>
  8. <% include ../shared/header %>
  9. <div class="container">
  10. <h1><%= merchant.name %> inventory</h1>
  11. <button onclick="displayAdd()">Add Ingredient</button>
  12. <input id="filter" onkeyup="filter()" type="text" placeholder="Start typing to filter">
  13. <table>
  14. <thead>
  15. <tr>
  16. <th onclick="sortIngredients('name')">Item</th>
  17. <th onclick="sortIngredients('category')">Category</th>
  18. <th onclick="sortIngredients('quantity')">Quantity</th>
  19. <th onclick="sortIngredients('unit')">Unit</th>
  20. <th></th>
  21. </tr>
  22. <tbody></tbody>
  23. </thead>
  24. </table>
  25. </div>
  26. <div class="add-ingredient">
  27. <div class="modal-content" onclick="event.stopPropagation()">
  28. <label>Ingredient name:
  29. <input type="text">
  30. </label>
  31. <label>Category:
  32. <input type="text">
  33. </label>
  34. <label>Quantity:
  35. <input type="number" step="0.01">
  36. </label>
  37. <label>Unit:
  38. <input type="text">
  39. </label>
  40. <button onclick="addIngredient()">Create Ingredient</button>
  41. </div>
  42. </div>
  43. <script>let merchant = <%- JSON.stringify(merchant) %>;</script>
  44. <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
  45. <script src="/inventory/inventory.js"></script>
  46. </body>
  47. </html>