merchantSetup.ejs 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  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="/merchantSetupPage/merchantSetup.css">
  8. <link rel="stylesheet" href="/shared/shared.css">
  9. </head>
  10. <body>
  11. <% include ../shared/header %>
  12. <% include ../shared/banner %>
  13. <div id="agreementStrand">
  14. <% include ../shared/legal %>
  15. </div>
  16. <div id="basicInfoStrand" class="container">
  17. <h1>Basic Information</h1>
  18. <form onsubmit="basicInfoObj.submit()">
  19. <label id="nameLabel">Name
  20. <input id="regName" type="text">
  21. </label>
  22. <label>Email
  23. <input id="regEmail" type="email" required>
  24. </label>
  25. <label>Password
  26. <input id="regPass" type="password" required>
  27. </label>
  28. <label>Confirm Password
  29. <input id="regConfirmPass" type="password" required>
  30. </label>
  31. <input class="button" type="Submit" value="Continue">
  32. </form>
  33. </div>
  34. <div id="addIngredientsStrand" class="container">
  35. <h1>Choose the ingredients in your inventory</h1>
  36. <h5>(Can't find something? You can create it in the next step)</h5>
  37. <table id="ingredient-display">
  38. <thead>
  39. <tr>
  40. <th>Add</th>
  41. <th>Ingredient</th>
  42. <th>Category</th>
  43. <th>Quantity</th>
  44. <th>Unit</th>
  45. </tr>
  46. </thead>
  47. <tbody></tbody>
  48. </table>
  49. <button class="button" onclick="addIngredientsObj.submit()">Continue</button>
  50. </div>
  51. <div id="createIngredientsStrand" class="container">
  52. <h1>Create ingredients for your inventory</h1>
  53. <div class="buttonDiv">
  54. <button class="button" onclick="addIngredientsObj.display()">Back</button>
  55. <button class="button" onclick="createIngredientsObj.newIngredientField()">Create Ingredient</button>
  56. <button class="button" id="finishButton" onclick="createIngredientsObj.submit()">No new ingredients</button>
  57. </div>
  58. <table id="inputField">
  59. <thead>
  60. <tr>
  61. <th>Ingredient Name</th>
  62. <th>Category</th>
  63. <th>Quantity</th>
  64. <th>Measurement Unit</th>
  65. <th>Actions</th>
  66. </tr>
  67. </thead>
  68. <tbody></tbody>
  69. </table>
  70. </div>
  71. <div id="nameRecipesStrand" class="container">
  72. <h1>Name your recipes</h1>
  73. <button class="button" onclick="nameRecipesObj.addNameField()">Add Recipe</button>
  74. <div id="nameList"></div>
  75. <button class="button" onclick="nameRecipesObj.submit()">Submit</button>
  76. </div>
  77. <div id="createRecipesStrand" class="container">
  78. <h1>Add ingredients to your recipes</h1>
  79. <h2 id="recipeName"></h2>
  80. <div class="buttonDiv">
  81. <button class="button" onclick="createRecipesObj.addRecipeIngredientField()">Add Ingredient</button>
  82. <button class="button" id="next">Next Recipe</button>
  83. <button class="button" id="previous" onclick="createRecipesObj.changeRecipe(-1)">Previous Recipe</button>
  84. </div>
  85. <% if(!locals.recipes){ %>
  86. <label>Price:
  87. <input id="price" type="number" step="0.01" min="0" placeholder="enter price" required>
  88. </label>
  89. <% } %>
  90. <table>
  91. <thead>
  92. <tr>
  93. <th>Ingredient</th>
  94. <th>Quantity</th>
  95. <th>Actions</th>
  96. </tr>
  97. </thead>
  98. <tbody></tbody>
  99. </table>
  100. </div>
  101. <script>
  102. let ingredients = <%- JSON.stringify(ingredients) %>;
  103. let recipes = <%- JSON.stringify(recipes) %>;
  104. let error = <%- JSON.stringify(error) %>;
  105. </script>
  106. <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
  107. <script src="/shared/validation.js"></script>
  108. <script src="/merchantSetupPage/agreement.js"></script>
  109. <script src="/merchantSetupPage/basicInfo.js"></script>
  110. <script src="/merchantSetupPage/addIngredients.js"></script>
  111. <script src="/merchantSetupPage/createIngredients.js"></script>
  112. <script src="/merchantSetupPage/nameRecipes.js"></script>
  113. <script src="/merchantSetupPage/createRecipes.js"></script>
  114. <script src="/merchantSetupPage/controller.js"></script>
  115. </body>
  116. </html>