Spaces:
Sleeping
Sleeping
Update templates/menu_page.html
Browse files- templates/menu_page.html +5 -6
templates/menu_page.html
CHANGED
@@ -10,7 +10,6 @@
|
|
10 |
background-color: #f8f8f8;
|
11 |
margin: 0;
|
12 |
padding: 0;
|
13 |
-
text-align: center;
|
14 |
}
|
15 |
.container {
|
16 |
max-width: 1200px;
|
@@ -179,9 +178,9 @@
|
|
179 |
const item = menuItems.veg.concat(menuItems.nonVeg).find(item => item.name === itemName);
|
180 |
const cartItem = { ...item, quantity: parseInt(quantity) };
|
181 |
cart.push(cartItem);
|
182 |
-
|
183 |
} else {
|
184 |
-
|
185 |
}
|
186 |
}
|
187 |
|
@@ -202,11 +201,11 @@
|
|
202 |
// Function to place the final order
|
203 |
function placeOrder() {
|
204 |
if (cart.length > 0) {
|
205 |
-
|
206 |
cart.length = 0; // Clear the cart after placing the order
|
207 |
viewCart(); // Optionally, update cart view
|
208 |
} else {
|
209 |
-
|
210 |
}
|
211 |
}
|
212 |
|
@@ -241,7 +240,7 @@
|
|
241 |
speak("Welcome to the Biryani Hub menu. Please say vegetarian or non-vegetarian to choose your menu.", () => {
|
242 |
startVoiceRecognition();
|
243 |
});
|
244 |
-
}
|
245 |
</script>
|
246 |
|
247 |
</body>
|
|
|
10 |
background-color: #f8f8f8;
|
11 |
margin: 0;
|
12 |
padding: 0;
|
|
|
13 |
}
|
14 |
.container {
|
15 |
max-width: 1200px;
|
|
|
178 |
const item = menuItems.veg.concat(menuItems.nonVeg).find(item => item.name === itemName);
|
179 |
const cartItem = { ...item, quantity: parseInt(quantity) };
|
180 |
cart.push(cartItem);
|
181 |
+
speak(`${quantity} of ${itemName} added to your cart.`, () => {});
|
182 |
} else {
|
183 |
+
speak("Please enter a valid quantity.", () => {});
|
184 |
}
|
185 |
}
|
186 |
|
|
|
201 |
// Function to place the final order
|
202 |
function placeOrder() {
|
203 |
if (cart.length > 0) {
|
204 |
+
speak("Your order has been placed successfully!", () => {});
|
205 |
cart.length = 0; // Clear the cart after placing the order
|
206 |
viewCart(); // Optionally, update cart view
|
207 |
} else {
|
208 |
+
speak("Your cart is empty. Please add items before placing the order.", () => {});
|
209 |
}
|
210 |
}
|
211 |
|
|
|
240 |
speak("Welcome to the Biryani Hub menu. Please say vegetarian or non-vegetarian to choose your menu.", () => {
|
241 |
startVoiceRecognition();
|
242 |
});
|
243 |
+
}
|
244 |
</script>
|
245 |
|
246 |
</body>
|