merchantSetup.ejs 5.3 KB

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