Spaces:
Sleeping
Sleeping
Update templates/index.html
Browse files- templates/index.html +10 -6
templates/index.html
CHANGED
@@ -463,16 +463,20 @@
|
|
463 |
handleYesResponse();
|
464 |
return;
|
465 |
} else if (lastMessage.includes('no') && selectedMenuItem) {
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
|
|
|
|
472 |
selectedMenuItem = null;
|
473 |
selectedIngredients = [];
|
|
|
474 |
}
|
475 |
|
|
|
476 |
addMessage('bot', botResponse);
|
477 |
if (options.length > 0) {
|
478 |
displayOptions(options);
|
|
|
463 |
handleYesResponse();
|
464 |
return;
|
465 |
} else if (lastMessage.includes('no') && selectedMenuItem) {
|
466 |
+
// Add the selected item to selectedItems array
|
467 |
+
selectedItems = [{ ...selectedMenuItem, ingredients: [] }];
|
468 |
+
|
469 |
+
// Show quantity input + call promptAndSubmit with default value (e.g., 1)
|
470 |
+
const qty = 1;
|
471 |
+
promptAndSubmit(qty);
|
472 |
+
|
473 |
+
// Reset state
|
474 |
selectedMenuItem = null;
|
475 |
selectedIngredients = [];
|
476 |
+
return;
|
477 |
}
|
478 |
|
479 |
+
|
480 |
addMessage('bot', botResponse);
|
481 |
if (options.length > 0) {
|
482 |
displayOptions(options);
|