nagasurendra commited on
Commit
8c94d42
·
verified ·
1 Parent(s): 418015e

Update templates/menu.html

Browse files
Files changed (1) hide show
  1. templates/menu.html +1 -24
templates/menu.html CHANGED
@@ -774,30 +774,7 @@ document.addEventListener('DOMContentLoaded', function () {
774
  });
775
  });
776
 
777
- // Function to round reward points to a single digit
778
- function roundRewardPoints() {
779
- // Get the reward points element
780
- let rewardPointsElement = document.getElementById('reward-points');
781
-
782
- // Check if the element exists in the DOM
783
- if (rewardPointsElement) {
784
- let rewardPointsText = rewardPointsElement.innerText.trim(); // Get and trim the value to remove any extra spaces
785
-
786
- // Check if the innerText is a valid number
787
- let rewardPoints = parseFloat(rewardPointsText);
788
-
789
- // If it's a valid number, round it to 1 decimal place
790
- if (!isNaN(rewardPoints)) {
791
- rewardPointsElement.innerText = rewardPoints.toFixed(1); // Round to 1 decimal place
792
- } else {
793
- console.error("Reward points value is not a valid number:", rewardPointsText);
794
- }
795
- } else {
796
- console.error("Reward points element is missing.");
797
- }
798
- }
799
- // Run the function when the page loads
800
- window.onload = roundRewardPoints;
801
 
802
  </script>
803
 
 
774
  });
775
  });
776
 
777
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
778
 
779
  </script>
780