nagasurendra commited on
Commit
d63f2af
·
verified ·
1 Parent(s): 306f0b0

Update templates/menu.html

Browse files
Files changed (1) hide show
  1. templates/menu.html +5 -1
templates/menu.html CHANGED
@@ -593,6 +593,7 @@ form-check-input addon-option{
593
  <script>
594
  // Show item details and fetch customization options
595
  // Show item details and fetch customization options
 
596
  function showItemDetails(name, price, image, description, section, selectedCategory) {
597
  console.log(`Showing details for: ${name}`);
598
  document.getElementById('modal-name').innerText = name;
@@ -658,10 +659,12 @@ function showItemDetails(name, price, image, description, section, selectedCateg
658
  const checkboxes = document.querySelectorAll('.addon-option');
659
  checkboxes.forEach(checkbox => {
660
  const checkboxName = checkbox.getAttribute('data-name').trim(); // Trim spaces for checkbox value
 
 
661
  // Normalize the most common add-ons to avoid spaces, then check if it's in the list
662
  const normalizedAddons = window.most_common_addons.map(addon => addon.trim().toLowerCase()); // Normalize all to lowercase
663
 
664
- console.log(`Checking checkbox for: ${checkboxName}`);
665
 
666
  // If the checkbox option is one of the most common add-ons, select it
667
  if (normalizedAddons.includes(checkboxName.trim().toLowerCase())) {
@@ -683,6 +686,7 @@ function showItemDetails(name, price, image, description, section, selectedCateg
683
 
684
 
685
 
 
686
  function handleToggle(source) {
687
  const form = document.getElementById("filter-form");
688
  const veg = document.getElementById("veg-toggle");
 
593
  <script>
594
  // Show item details and fetch customization options
595
  // Show item details and fetch customization options
596
+ // Show item details and fetch customization options
597
  function showItemDetails(name, price, image, description, section, selectedCategory) {
598
  console.log(`Showing details for: ${name}`);
599
  document.getElementById('modal-name').innerText = name;
 
659
  const checkboxes = document.querySelectorAll('.addon-option');
660
  checkboxes.forEach(checkbox => {
661
  const checkboxName = checkbox.getAttribute('data-name').trim(); // Trim spaces for checkbox value
662
+ console.log(`Checking checkbox for: ${checkboxName}`);
663
+
664
  // Normalize the most common add-ons to avoid spaces, then check if it's in the list
665
  const normalizedAddons = window.most_common_addons.map(addon => addon.trim().toLowerCase()); // Normalize all to lowercase
666
 
667
+ console.log("Normalized most common add-ons:", normalizedAddons);
668
 
669
  // If the checkbox option is one of the most common add-ons, select it
670
  if (normalizedAddons.includes(checkboxName.trim().toLowerCase())) {
 
686
 
687
 
688
 
689
+
690
  function handleToggle(source) {
691
  const form = document.getElementById("filter-form");
692
  const veg = document.getElementById("veg-toggle");