Spaces:
Sleeping
Sleeping
Update templates/menu.html
Browse files- templates/menu.html +3 -2
templates/menu.html
CHANGED
|
@@ -153,7 +153,7 @@
|
|
| 153 |
<p class="card-text">${{ item.Price__c }}</p>
|
| 154 |
<p class="card-text"><small class="text-muted">{{ item.Category__c }}</small></p>
|
| 155 |
<button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#itemModal"
|
| 156 |
-
onclick="showItemDetails('{{ item.Name }}', '{{ item.Price__c }}', '{{ item.Image2__c }}', '{{ item.Description__c }}')">
|
| 157 |
Add +
|
| 158 |
</button>
|
| 159 |
</div>
|
|
@@ -207,7 +207,7 @@
|
|
| 207 |
|
| 208 |
<!-- JavaScript -->
|
| 209 |
<script>
|
| 210 |
-
function showItemDetails(name, price, image, description) {
|
| 211 |
// Set modal content dynamically
|
| 212 |
document.getElementById('modal-name').innerText = name;
|
| 213 |
document.getElementById('modal-price').innerText = `$${price}`;
|
|
@@ -215,6 +215,7 @@
|
|
| 215 |
document.getElementById('modal-description').innerText = description || 'No description available.';
|
| 216 |
document.getElementById('addons-list').innerHTML = 'Loading add-ons...';
|
| 217 |
document.getElementById('modal-instructions').value = '';
|
|
|
|
| 218 |
// Fetch add-ons dynamically based on item Name
|
| 219 |
fetch(`/api/addons?item_name=${encodeURIComponent(name)}`)
|
| 220 |
.then(response => response.json())
|
|
|
|
| 153 |
<p class="card-text">${{ item.Price__c }}</p>
|
| 154 |
<p class="card-text"><small class="text-muted">{{ item.Category__c }}</small></p>
|
| 155 |
<button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#itemModal"
|
| 156 |
+
onclick="showItemDetails('{{ item.Name }}', '{{ item.Price__c }}', '{{ item.Image2__c }}', '{{ item.Description__c }}', '{{item.Section__c}}')">
|
| 157 |
Add +
|
| 158 |
</button>
|
| 159 |
</div>
|
|
|
|
| 207 |
|
| 208 |
<!-- JavaScript -->
|
| 209 |
<script>
|
| 210 |
+
function showItemDetails(name, price, image, description, section) {
|
| 211 |
// Set modal content dynamically
|
| 212 |
document.getElementById('modal-name').innerText = name;
|
| 213 |
document.getElementById('modal-price').innerText = `$${price}`;
|
|
|
|
| 215 |
document.getElementById('modal-description').innerText = description || 'No description available.';
|
| 216 |
document.getElementById('addons-list').innerHTML = 'Loading add-ons...';
|
| 217 |
document.getElementById('modal-instructions').value = '';
|
| 218 |
+
document.getElementById('modal-section').innerText = section || 'No section available'; // Show section
|
| 219 |
// Fetch add-ons dynamically based on item Name
|
| 220 |
fetch(`/api/addons?item_name=${encodeURIComponent(name)}`)
|
| 221 |
.then(response => response.json())
|