merchantSetup.ejs 4.8 KB

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