Spaces:
Build error
Build error
Update templates/menu.html
Browse files- templates/menu.html +1 -19
templates/menu.html
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
-
<
|
| 7 |
<!-- Bootstrap CSS -->
|
| 8 |
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet">
|
| 9 |
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.css" rel="stylesheet">
|
|
@@ -849,24 +849,6 @@ document.addEventListener('DOMContentLoaded', function () {
|
|
| 849 |
});
|
| 850 |
});
|
| 851 |
|
| 852 |
-
// Fetch menu items from Salesforce
|
| 853 |
-
function fetchMenuItems() {
|
| 854 |
-
fetch('/services/apexrest/menuItems/') // Assuming your Salesforce API endpoint
|
| 855 |
-
.then(response => response.json())
|
| 856 |
-
.then(data => {
|
| 857 |
-
const menuItems = data.map(item => ({
|
| 858 |
-
name: item.Name,
|
| 859 |
-
category: item.Category__c,
|
| 860 |
-
price: item.Price__c,
|
| 861 |
-
image: item.Image__c
|
| 862 |
-
}));
|
| 863 |
-
renderAllItems(menuItems);
|
| 864 |
-
renderVegItems(menuItems);
|
| 865 |
-
})
|
| 866 |
-
.catch(err => {
|
| 867 |
-
console.error('Error fetching menu items:', err);
|
| 868 |
-
});
|
| 869 |
-
}
|
| 870 |
|
| 871 |
// Function to toggle Veg/Non-Veg items
|
| 872 |
function toggleVegItems() {
|
|
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Menu</title>
|
| 7 |
<!-- Bootstrap CSS -->
|
| 8 |
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet">
|
| 9 |
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.css" rel="stylesheet">
|
|
|
|
| 849 |
});
|
| 850 |
});
|
| 851 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 852 |
|
| 853 |
// Function to toggle Veg/Non-Veg items
|
| 854 |
function toggleVegItems() {
|