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