data.ejs 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <!DOCTYPE html>
  2. <html lang="en">
  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="/dataPage/data.css">
  9. </head>
  10. <body>
  11. <% include ../shared/header %>
  12. <% include ../shared/banner %>
  13. <h1 id="title"><%=data.merchant.name%></h1>
  14. <strand-selector></strand-selector>
  15. <div id="homeStrand" class="strand">
  16. <h2 id="month"></h2>
  17. <div class="buttonBox">
  18. <p>From: </p>
  19. <input id="from" type="date">
  20. <p>To: </p>
  21. <input id="to" type="date">
  22. <button id="dateSort" class="buttonDisabled">Submit</button>
  23. </div>
  24. <div class="buttonBox">
  25. <a class="button" href="/dashboard">Display Inventory</a>
  26. </div>
  27. <div class="tables">
  28. <!-- Ingredients used -->
  29. <div id="ingredientsData" class="dataTable">
  30. <h3>Ingredients</h3>
  31. <table>
  32. <thead>
  33. <tr>
  34. <th>Ingredient</th>
  35. <th>Used</th>
  36. <th>Remaining</th>
  37. </tr>
  38. </thead>
  39. <tbody></tbody>
  40. </table>
  41. </div>
  42. <!-- Recipes used -->
  43. <div id="recipesData" class="dataTable">
  44. <h3>Recipes</h3>
  45. <div>
  46. <p>Total Revenue: <span id="revenueTotal"></span></p>
  47. <p>Total sold: <span id="soldTotal"></span></p>
  48. </div>
  49. <table>
  50. <thead>
  51. <tr>
  52. <th>Recipe</th>
  53. <th># sold</th>
  54. <th>Revenue</th>
  55. </tr>
  56. </thead>
  57. <tbody></tbody>
  58. </table>
  59. </div>
  60. <!-- Purchases -->
  61. <div id="purchasesData" class="dataTable">
  62. <h3>Purchases</h3>
  63. <table>
  64. <thead>
  65. <tr>
  66. <th>Ingredient</th>
  67. <th>Amount</th>
  68. </tr>
  69. </thead>
  70. <tbody></tbody>
  71. </table>
  72. </div>
  73. </div>
  74. </div>
  75. <script>let data = <%- JSON.stringify(data); %></script>
  76. <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
  77. <script src="/shared/validation.js"></script>
  78. <script src="/dataPage/home.js"></script>
  79. <script src="/dataPage/fetchData.js"></script>
  80. <script src="/shared/controller.js"></script>
  81. </body>
  82. </html>