DSatishchandra commited on
Commit
5ac8a7d
·
verified ·
1 Parent(s): 49eb28b

Update templates/menu.html

Browse files
Files changed (1) hide show
  1. templates/menu.html +18 -0
templates/menu.html CHANGED
@@ -503,6 +503,24 @@
503
  alert('An error occurred while adding the item to the cart.');
504
  });
505
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
506
  </script>
507
  </body>
508
  </html>
 
503
  alert('An error occurred while adding the item to the cart.');
504
  });
505
  }
506
+ // Function to round reward points to a single digit
507
+ function roundRewardPoints() {
508
+ let rewardPointsElement = document.getElementById('reward-points');
509
+ let rewardPoints = parseFloat(rewardPointsElement.innerText);
510
+
511
+ if (!isNaN(rewardPoints)) {
512
+ rewardPointsElement.innerText = rewardPoints.toFixed(1); // Rounds to 1 decimal place
513
+ }
514
+ }
515
+ // Run the function when the page loads
516
+ window.onload = roundRewardPoints;
517
+
518
+ </script>
519
+
520
+ <!-- Bootstrap JS -->
521
+ <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
522
+ </body>
523
+ </html>
524
  </script>
525
  </body>
526
  </html>