dashboard.ejs 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>The Subline</title>
  6. <link rel="icon" type="img/png" href="/shared/images/logo.png">
  7. <link rel="stylesheet" href="/shared/shared.css">
  8. <link rel="stylesheet" href="/dashboardPage/dashboard.css">
  9. <link rel="stylesheet" href="/dashboardPage/components/components.css">
  10. <link href="https://fonts.googleapis.com/css?family=Saira&display=swap" rel="stylesheet">
  11. </head>
  12. <body>
  13. <% include ./components/menu %>
  14. <div class="contentBlock">
  15. <% include ../shared/banner %>
  16. <div id="homeStrand" class="strand">
  17. <h1 class="strandTitle">Dashboard</h1>
  18. <div class="flexRow">
  19. <div id="revenueCard" class="card">
  20. <p>Total Revenue (month)</p>
  21. <p id="revenue"></p>
  22. <div id="revenueChange">
  23. <img alt="revenue">
  24. <p></p>
  25. </div>
  26. </div>
  27. <div id="graphCard" class="card">
  28. <canvas id="graphCanvas">
  29. </div>
  30. </div>
  31. <div class="flexRow">
  32. <div id="inventoryCheckCard" class="card">
  33. <p>Inventory Check</p>
  34. <ul></ul>
  35. <button class="button" onclick="homeStrandObj.submitInventoryCheck()">Update</button>
  36. </div>
  37. <div id=popularIngredientsCard class="card">
  38. <p>Most Popular Ingredients (month)</p>
  39. <canvas id="popularCanvas"></canvas>
  40. </div>
  41. </div>
  42. <template id="ingredientCheck">
  43. <li class="ingredientCheck flexRow">
  44. <p></p>
  45. <div class="numberInput">
  46. <button>-</button>
  47. <input type="number" min="0" step="0.01">
  48. <button>+</button>
  49. </div>
  50. <p></p>
  51. </li>
  52. </template>
  53. </div>
  54. <div id="ingredientsStrand" class="strand">
  55. <div class="strandHead">
  56. <h1 class="strandTitle">Ingredient Inventory</h1>
  57. <button class="button" onclick="addIngredientsComp.display()">
  58. <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  59. <line x1="12" y1="5" x2="12" y2="19"></line>
  60. <line x1="5" y1="12" x2="19" y2="12"></line>
  61. </svg>
  62. add
  63. </button>
  64. </div>
  65. <div class="searchBar">
  66. <div class="searchAndIcon">
  67. <svg width="30" height="30" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  68. <circle cx="11" cy="11" r="8"></circle>
  69. <line x1="21" y1="21" x2="16.65" y2="16.65"></line>
  70. </svg>
  71. <input id="ingredientSearch" type="text" placeholder="FILTER" oninput="ingredientsStrandObj.search()">
  72. </div>
  73. <button id="ingredientClearButton" class="clearButton" onclick="ingredientsStrandObj.clearSorting()" style="display: none;">
  74. <svg width="30" height="30" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  75. <circle cx="12" cy="12" r="10"></circle>
  76. <line x1="15" y1="9" x2="9" y2="15"></line>
  77. <line x1="9" y1="9" x2="15" y2="15"></line>
  78. </svg>
  79. </button>
  80. <select id="ingredientSelect" onchange="ingredientsStrandObj.sort(this.value)">Sort Bys:
  81. <option value="" selected disabled>Sort By:</option>
  82. <option value="_name">Ingredient</option>
  83. <option value="category">Category</option>
  84. <option value="unit">Unit of Measurement</option>
  85. </select>
  86. </div>
  87. <div id="categoryList"></div>
  88. <template id="categoryDiv">
  89. <div class="categoryDiv">
  90. <div>
  91. <p></p>
  92. <button>
  93. <svg width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  94. <polyline points="6 9 12 15 18 9"></polyline>
  95. </svg>
  96. </button>
  97. </div>
  98. <div class="ingredientsDiv"></div>
  99. </div>
  100. </template>
  101. <template id="ingredient">
  102. <div class="ingredient">
  103. <p></p>
  104. <hr class="ingredientSpacer">
  105. <p></p>
  106. </div>
  107. </template>
  108. </div>
  109. <div id="recipeBookStrand" class="strand">
  110. <div class="strandHead">
  111. <h1 class="strandTitle">Recipe Book</h1>
  112. <% if(merchant.pos === "none"){ %>
  113. <button class="button" onclick="newRecipeComp.display()">
  114. <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line></svg>
  115. add
  116. </button>
  117. <% } %>
  118. </div>
  119. <div class="searchBar">
  120. <div class="searchAndIcon">
  121. <svg width="30" height="30" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  122. <circle cx="11" cy="11" r="8"></circle>
  123. <line x1="21" y1="21" x2="16.65" y2="16.65"></line>
  124. </svg>
  125. <input id="recipeSearch" type="text" placeholder="FILTER" oninput="recipeBookStrandObj.search()">
  126. </div>
  127. <button id="recipeClearButton" class="clearButton" onclick="recipeBookStrandObj.clearSorting()" style="display: none;">
  128. <svg width="30" height="30" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  129. <circle cx="12" cy="12" r="10"></circle>
  130. <line x1="15" y1="9" x2="9" y2="15"></line>
  131. <line x1="9" y1="9" x2="15" y2="15"></line>
  132. </svg>
  133. </button>
  134. </div>
  135. <div id="recipeList"></div>
  136. </div>
  137. <div id="ordersStrand" class="strand">
  138. <div class="strandHead">
  139. <h1 class="strandTitle">Orders</h1>
  140. <button class="button" onclick="newOrderComp.display()">
  141. <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  142. <line x1="12" y1="5" x2="12" y2="19"></line>
  143. <line x1="5" y1="12" x2="19" y2="12"></line>
  144. </svg>
  145. add
  146. </button>
  147. </div>
  148. <div id="orderList"></div>
  149. <template id="order">
  150. <div class="rowItem">
  151. <p></p>
  152. <p></p>
  153. <p></p>
  154. <p></p>
  155. </div>
  156. </template>
  157. </div>
  158. </div>
  159. <div id="sidebarDiv" class="sidebarHide">
  160. <% include ./components/addIngredients %>
  161. <% include ./components/newIngredient %>
  162. <% include ./components/ingredientDetails %>
  163. <% include ./components/recipeDetails %>
  164. <% include ./components/addRecipe %>
  165. <% include ./components/orderDetails %>
  166. <% include ./components/newOrder %>
  167. </div>
  168. <% include ../shared/loader %>
  169. <script src="/dashboardPage/Merchant.js"></script>
  170. <script>
  171. let merchant = new Merchant(
  172. <%- JSON.stringify(merchant) %>,
  173. <%- JSON.stringify(transactions) %>
  174. );
  175. </script>
  176. <script src="../shared/graphs.js"></script>
  177. <script src="/dashboardPage/home.js"></script>
  178. <script src="/dashboardPage/ingredients.js"></script>
  179. <script src="/dashboardPage/recipeBook.js"></script>
  180. <script src="/dashboardPage/components/components.js"></script>
  181. <script src="/dashboardPage/controller.js"></script>
  182. <script src="/dashboardPage/orders.js"></script>
  183. <script src="../shared/validation.js"></script>
  184. <noscript>Please turn on javascript for this site to work properly</noscript>
  185. </body>
  186. </html>