merchantSetup.ejs 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>The Subline</title>
  5. <link rel="stylesheet" href="/merchantSetupPage/merchantSetup.css">
  6. <link rel="stylesheet" href="/shared/shared.css">
  7. </head>
  8. <body>
  9. <% include ../shared/header %>
  10. <% include ../shared/banner %>
  11. <div id="basicInfoStrand" class="container">
  12. <h1>Basic Information</h1>
  13. <form onsubmit="basicInfoObj.submit()">
  14. <% if(!locals.recipe){ %>
  15. <label>Name
  16. <input id="regName" type="text">
  17. </label>
  18. <% } %>
  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 type="Submit" value="Create Account">
  29. </form>
  30. </div>
  31. <div id="addIngredientsStrand" class="container">
  32. <h1>Add your first set of ingredients to your pantry</h1>
  33. <h3>Choose from our list of ingredients</h3>
  34. <h5>(Can't find something? You can create it in the next step)</h5>
  35. <table id="ingredient-display">
  36. <thead>
  37. <tr>
  38. <th>Add</th>
  39. <th>Ingredient</th>
  40. <th>Category</th>
  41. <th>Quantity</th>
  42. <th>Unit</th>
  43. </tr>
  44. </thead>
  45. <tbody></tbody>
  46. </table>
  47. <button onclick="addIngredientsObj.submit()">Next</button>
  48. </div>
  49. <div id="createIngredientsStrand" class="container">
  50. <h1>Add your first set of ingredients to your pantry</h1>
  51. <h3>Create your own ingredients</h3>
  52. <table id="inputField">
  53. <thead>
  54. <tr>
  55. <th>Ingredient Name</th>
  56. <th>Category</th>
  57. <th>Quantity</th>
  58. <th>Measurement Unit</th>
  59. <th class="anticolumn"></th>
  60. </tr>
  61. </thead>
  62. <tbody></tbody>
  63. </table>
  64. <button onclick="createIngredientsObj.newIngredientField()">+</button>
  65. <button onclick="createIngredientsObj.submit()">Create Ingredients</button>
  66. <button onclick="addIngredientsObj.display()">Back</button>
  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. <table id="recipeTable">
  78. <thead>
  79. <tr>
  80. <th>Ingredient</th>
  81. <th>Quantity</th>
  82. <th class="anticolumn"></th>
  83. </tr>
  84. </thead>
  85. <tbody></tbody>
  86. </table>
  87. <button onclick="createRecipesObj.addRecipeIngredientField()">+</button>
  88. <button id="next"></button>
  89. <button id="previous" onclick="createRecipesObj.changeRecipe(-1)">Previous Recipe</button>
  90. </div>
  91. <script>
  92. let ingredients = <%- JSON.stringify(ingredients) %>;
  93. let recipes = <%- JSON.stringify(recipes) %>;
  94. </script>
  95. <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
  96. <script src="/shared/validation.js"></script>
  97. <script src="/merchantSetupPage/basicInfo.js"></script>
  98. <script src="/merchantSetupPage/addIngredients.js"></script>
  99. <script src="/merchantSetupPage/createIngredients.js"></script>
  100. <script src="/merchantSetupPage/nameRecipes.js"></script>
  101. <script src="/merchantSetupPage/createRecipes.js"></script>
  102. <script src="/merchantSetupPage/controller.js"></script>
  103. </body>
  104. </html>