Update menu.py
Browse files
menu.py
CHANGED
@@ -94,17 +94,12 @@ def menu():
|
|
94 |
if item['Name'] in added_item_names:
|
95 |
continue
|
96 |
|
97 |
-
#
|
98 |
-
if selected_category == "
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
best_sellers = [item for item in all_items if item.get("Veg_NonVeg__c") in ["Veg", "both"]]
|
103 |
|
104 |
-
elif selected_category == "Customized Dish":
|
105 |
-
best_sellers = custom_dishes # Show only customized dishes when that toggle is selected
|
106 |
-
else:
|
107 |
-
best_sellers = all_items # Default to all items in case of other selectio
|
108 |
ordered_menu[section].append(item)
|
109 |
added_item_names.add(item['Name']) # Add item to the set of added items
|
110 |
print(f"Added item to {section}: {item['Name']}") # Debugging
|
|
|
94 |
if item['Name'] in added_item_names:
|
95 |
continue
|
96 |
|
97 |
+
# Apply category filters
|
98 |
+
if selected_category == "Veg" and item.get("Veg_NonVeg__c") not in ["Veg", "both"]:
|
99 |
+
continue
|
100 |
+
if selected_category == "Non veg" and item.get("Veg_NonVeg__c") not in ["Non veg", "both"]:
|
101 |
+
continue
|
|
|
102 |
|
|
|
|
|
|
|
|
|
103 |
ordered_menu[section].append(item)
|
104 |
added_item_names.add(item['Name']) # Add item to the set of added items
|
105 |
print(f"Added item to {section}: {item['Name']}") # Debugging
|