dashboard.ejs 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  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. </div>
  43. <div id="ingredientsStrand" class="strand">
  44. <div class="strandHead">
  45. <h1 class="strandTitle">Ingredient Inventory</h1>
  46. <button class="button" onclick="addIngredientsComp.display()">
  47. <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>
  48. add
  49. </button>
  50. </div>
  51. <div class="searchBar">
  52. <div class="searchAndIcon">
  53. <svg width="30" height="30" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  54. <circle cx="11" cy="11" r="8"></circle>
  55. <line x1="21" y1="21" x2="16.65" y2="16.65"></line>
  56. </svg>
  57. <input id="ingredientSearch" type="text" placeholder="FILTER" oninput="ingredientsStrandObj.search()">
  58. </div>
  59. <button id="ingredientClearButton" class="clearButton" onclick="ingredientsStrandObj.clearSorting()" style="display: none;">
  60. <svg width="30" height="30" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  61. <circle cx="12" cy="12" r="10"></circle>
  62. <line x1="15" y1="9" x2="9" y2="15"></line>
  63. <line x1="9" y1="9" x2="15" y2="15"></line>
  64. </svg>
  65. </button>
  66. <select id="ingredientSelect" onchange="ingredientsStrandObj.sort(this.value)">Sort Bys:
  67. <option value="" selected disabled>Sort By:</option>
  68. <option value="_name">Ingredient</option>
  69. <option value="category">Category</option>
  70. <option value="unit">Unit of Measurement</option>
  71. </select>
  72. </div>
  73. <div id="categoryList"></div>
  74. <template id="categoryDiv">
  75. <div class="categoryDiv">
  76. <div>
  77. <p></p>
  78. <button>
  79. <svg width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  80. <polyline points="6 9 12 15 18 9"></polyline>
  81. </svg>
  82. </button>
  83. </div>
  84. <div class="ingredientsDiv"></div>
  85. </div>
  86. </template>
  87. <template id="ingredient">
  88. <div class="ingredient">
  89. <p></p>
  90. <hr class="ingredientSpacer">
  91. <p></p>
  92. </div>
  93. </template>
  94. </div>
  95. <div id="recipeBookStrand" class="strand">
  96. <div class="strandHead">
  97. <h1 class="strandTitle">Recipe Book</h1>
  98. <% if(merchant.pos === "none"){ %>
  99. <button class="button" onclick="recipeBookStrandObj.displayAddRecipe()">
  100. <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>
  101. add
  102. </button>
  103. <% } %>
  104. </div>
  105. <div id="recipeList"></div>
  106. </div>
  107. <div id="ordersStrand" class="strand">
  108. <div class="strandHead">
  109. <h1 class="strandTitle">Orders</h1>
  110. <button class="button" onclick="newOrderComp.display()">
  111. <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  112. <line x1="12" y1="5" x2="12" y2="19"></line>
  113. <line x1="5" y1="12" x2="19" y2="12"></line>
  114. </svg>
  115. add
  116. </button>
  117. </div>
  118. <div id="orderList"></div>
  119. <template id="order">
  120. <div class="rowItem">
  121. <p></p>
  122. <p></p>
  123. <p></p>
  124. <p></p>
  125. </div>
  126. </template>
  127. </div>
  128. </div>
  129. <div id="sidebarDiv" class="sidebarHide">
  130. <% include ./components/addIngredients %>
  131. <% include ./components/newIngredient %>
  132. <% include ./components/ingredientDetails %>
  133. <% include ./components/recipeDetails %>
  134. <% include ./components/addRecipe %>
  135. <% include ./components/orderDetails %>
  136. <% include ./components/newOrder %>
  137. </div>
  138. <script>let merchant = <%- JSON.stringify(merchant) %>;</script>
  139. <script>let transactions = <%- JSON.stringify(transactions) %>;</script>
  140. <script src="../shared/graphs.js"></script>
  141. <script src="/dashboardPage/home.js"></script>
  142. <script src="/dashboardPage/ingredients.js"></script>
  143. <script src="/dashboardPage/recipeBook.js"></script>
  144. <script src="/dashboardPage/components/components.js"></script>
  145. <script src="/dashboardPage/controller.js"></script>
  146. <script src="/dashboardPage/orders.js"></script>
  147. <script src="../shared/validation.js"></script>
  148. <noscript>Please turn on javascript for this site to work properly</noscript>
  149. </body>
  150. </html>