inventory.ejs 1.9 KB

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