| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>The Subline</title>
- <link rel="icon" type="img/png" href="/shared/images/logo.png">
- <link rel="stylesheet" href="/inventoryPage/inventory.css">
- <link rel="stylesheet" href="/shared/shared.css">
- </head>
- <body>
- <% include ../shared/header %>
- <% include ../shared/banner %>
- <strand-selector></strand-selector>
- <div id="inventoryStrand" class="strand">
- <h1><span><%= merchant.name %></span> inventory</h1>
- <div class="options">
- <a class="button" href="/recipes">View Recipes</a>
- <button class="button" onclick="addIngredientObj.display()">Add Ingredient</button>
- <button class="button" onclick="enterPurchaseObj.display()">Enter Purchases</button>
- <% if(merchant.pos === "none"){ %>
- <button class="button" onclick="enterTransactionsObj.display()">Enter Transactions</button>
- <% } %>
- </div>
- <input id="filter" onkeyup="inventoryObj.filter()" type="text" placeholder="FILTER INGREDIENTS">
- <table>
- <thead>
- <tr>
- <th onclick="inventoryObj.sortIngredients('name')">Item</th>
- <th onclick="inventoryObj.sortIngredients('category')">Category</th>
- <th onclick="inventoryObj.sortIngredients('quantity')">Quantity</th>
- <th onclick="inventoryObj.sortIngredients('unit')">Unit</th>
- <th>Actions</th>
- </tr>
- <tbody></tbody>
- </thead>
- </table>
- </div>
- <div id="accountStrand" class="strand">
- <h1>Account Strand</h1>
- </div>
- <div id="addIngredientAction" class="action">
- <button class="button" onclick="inventoryObj.display()">Back to Inventory</button>
- <div class="container">
- <form onsubmit="addIngredientObj.submitAdd()">
- <h2>Select Ingredient</h2>
- <label>Ingredient
- <select id="addName"></select>
- </label>
-
- <label>Quantity
- <input id="addQuantity" type="number" step="0.01" required>
- </label>
-
- <input class="button" type="submit" value="Add Ingredient">
- </form>
- <form onsubmit="addIngredientObj.submitNew()">
- <h2>Create New Ingredient</h2>
- <label>Name
- <input id="newName" type="text" required>
- </label>
- <label>Category
- <input id="newCategory" type="text" required>
- </label>
- <label>Unit
- <input id="newUnit" type="text" required>
- </label>
- <label>Quantity
- <input id="newQuantity" type="number" step="0.01" required>
- </label>
- <input class="button" type="submit" value="Create Ingredient">
- </form>
- </div>
- </div>
- <div id="enterTransactionsAction" class="action">
- <h1>Enter items sold since (Date)</h1>
-
- <button class="button" onclick="inventoryObj.display()">Back to inventory</button>
- <table>
- <thead>
- <tr>
- <th>Recipe</th>
- <th>Number sold</th>
- </tr>
- </thead>
- <tbody></tbody>
- </table>
- <button class="button" onclick="enterTransactionsObj.submit()">Submit</button>
- </div>
- <div id="enterPurchaseAction" class="action">
- <h1>Enter Purchases</h1>
-
- <button class="button" onclick="inventoryObj.display()">Back to inventory</button>
- <table>
- <thead>
- <tr>
- <th>Ingredient</th>
- <th>Amount</th>
- </tr>
- </thead>
- <tbody></tbody>
- </table>
- <button class="button" onclick="enterPurchaseObj.submit()">Submit</button>
- </div>
- <script>
- <% if(locals.error){ %>
- let error = <%- JSON.stringify(error) %>;
- <% }else{ %>
- let error = undefined;
- <% } %>
- </script>
- <script>
- let merchant = <%- JSON.stringify(merchant) %>;
- </script>
- <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
- <script src="../shared/validation.js"></script>
- <script src="/inventoryPage/inventory.js"></script>
- <script src="/inventoryPage/account.js"></script>
- <script src="/inventoryPage/addIngredient.js"></script>
- <script src="/inventoryPage/enterTransactions.js"></script>
- <script src="/inventoryPage/enterPurchase.js"></script>
- <script src="/shared/controller.js"></script>
- </body>
- </html>
|