WasteLessV6.2AlphaB1 / students-ate.html
EHDEM's picture
Upload 14 files
6cfcdf2 verified
Raw History Blame Contribute Delete
30.8 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>WASTE-LESS - Attendance Form B</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
.meal-card { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.meal-card.active { transform: scale(1.03); box-shadow: 0 10px 25px rgba(0,0,0,0.15); }
.meal-card:hover:not(.active) { transform: translateY(-2px); }
.rfid-pulse { animation: rfidPulse 2s infinite; }
@keyframes rfidPulse {
0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); }
50% { box-shadow: 0 0 0 10px rgba(59, 130, 246, 0); }
}
.menu-card { animation: slideDown 0.3s ease-out; }
@keyframes slideDown {
from { opacity: 0; transform: translateY(-10px); }
to { opacity: 1; transform: translateY(0); }
}
</style>
</head>
<body class="bg-gray-100 min-h-screen">
<div class="container mx-auto px-4 py-8 max-w-4xl">
<!-- Header -->
<header class="bg-blue-600 text-white rounded-lg shadow-lg p-6 mb-8">
<div class="flex flex-col md:flex-row justify-between items-center">
<div class="mb-4 md:mb-0">
<a href="index.html" class="text-blue-100 hover:text-white mr-4 text-xl"><i class="fas fa-home"></i></a>
<h1 class="text-3xl font-bold">Attendance Form B</h1>
<p class="text-blue-100">For Students Who Have Eaten At The Dining Hall</p>
</div>
<div class="flex items-center space-x-2">
<i id="meal-period-icon" class="fas fa-utensils text-2xl"></i>
<i class="fas fa-calendar-alt text-2xl"></i>
<i class="fas fa-users text-2xl"></i>
</div>
</div>
</header>
<!-- Current Time Display -->
<div class="bg-white rounded-lg shadow-md p-4 mb-8 text-center">
<div class="text-xl font-semibold text-gray-700" id="current-time">Loading time...</div>
<div class="text-blue-600 font-medium" id="current-date">Loading date...</div>
</div>
<!-- Meal Periods -->
<div class="bg-white rounded-lg shadow-md p-6 mb-8">
<h2 class="text-xl font-semibold mb-4 text-gray-800">Meal Periods</h2>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 mb-6">
<div class="meal-card px-6 py-5 rounded-xl border-2 cursor-pointer transition-all duration-300"
style="border-color: #fde68a; background: linear-gradient(135deg, #fef9c3, #fef3c7);"
data-meal="breakfast" onclick="showMealMenu('breakfast')">
<div class="flex items-center">
<div class="p-3 rounded-full mr-4" style="background: rgba(234, 179, 8, 0.15);">
<i class="fas fa-sun text-yellow-600 text-2xl"></i>
</div>
<div>
<div class="text-lg font-bold text-yellow-800">Breakfast</div>
<div class="text-yellow-700 text-sm font-medium">6:20 AM - 6:50 AM</div>
</div>
</div>
</div>
<div class="meal-card px-6 py-5 rounded-xl border-2 cursor-pointer transition-all duration-300"
style="border-color: #bbf7d0; background: linear-gradient(135deg, #dcfce7, #d1fae5);"
data-meal="lunch" onclick="showMealMenu('lunch')">
<div class="flex items-center">
<div class="p-3 rounded-full mr-4" style="background: rgba(22, 163, 74, 0.15);">
<i class="fas fa-utensils text-green-600 text-2xl"></i>
</div>
<div>
<div class="text-lg font-bold text-green-800">Lunch</div>
<div class="text-green-700 text-sm font-medium">1:30 PM - 2:30 PM</div>
</div>
</div>
</div>
<div class="meal-card px-6 py-5 rounded-xl border-2 cursor-pointer transition-all duration-300"
style="border-color: #c7d2fe; background: linear-gradient(135deg, #e0e7ff, #ddd6fe);"
data-meal="dinner" onclick="showMealMenu('dinner')">
<div class="flex items-center">
<div class="p-3 rounded-full mr-4" style="background: rgba(99, 102, 241, 0.15);">
<i class="fas fa-moon text-indigo-600 text-2xl"></i>
</div>
<div>
<div class="text-lg font-bold text-indigo-800">Dinner</div>
<div class="text-indigo-700 text-sm font-medium">5:50 PM - 7:00 PM</div>
</div>
</div>
</div>
<div class="meal-card px-6 py-5 rounded-xl border-2 cursor-pointer transition-all duration-300"
style="border-color: #fbcfe8; background: linear-gradient(135deg, #fce7f3, #f5d0fe);"
data-meal="supper" onclick="showMealMenu('supper')">
<div class="flex items-center">
<div class="p-3 rounded-full mr-4" style="background: rgba(192, 38, 211, 0.15);">
<i class="fas fa-bed text-fuchsia-600 text-2xl"></i>
</div>
<div>
<div class="text-lg font-bold text-fuchsia-800">Supper</div>
<div class="text-fuchsia-700 text-sm font-medium">10:30 PM - 11:00 PM</div>
</div>
</div>
</div>
</div>
<!-- Menu Display -->
<div id="menu-display-container" class="hidden menu-card">
<div class="rounded-xl p-6 shadow-inner border" id="menu-display" style="background: linear-gradient(135deg, #f8fafc, #f1f5f9); border-color: #e2e8f0;">
<div class="font-bold mb-4 flex items-center text-lg" id="selected-meal-time-display">
<i class="fas fa-utensils mr-3 text-gray-600"></i>
<span>Select a meal period</span>
</div>
<div class="space-y-3" id="regular-menu">
<div class="text-gray-500 italic" id="default-menu-message">Please click on a meal period above to view its menu</div>
</div>
</div>
</div>
<div class="text-sm text-gray-600 mt-4 bg-gray-50 p-3 rounded-lg">
<p>Current time: <span id="current-meal-time-display" class="font-medium text-gray-800"></span></p>
<p>Next meal: <span id="next-meal-time-display" class="font-medium text-gray-800"></span></p>
</div>
</div>
<!-- RFID Scan Section -->
<div class="bg-white rounded-lg shadow-md p-6 mb-8 bg-gradient-to-r from-blue-50 to-indigo-50 border-2 border-blue-200">
<h2 class="text-xl font-semibold mb-4 text-gray-800 flex items-center">
<i class="fas fa-wifi mr-2 text-blue-600"></i> RFID Quick Scan
</h2>
<div class="flex flex-col md:flex-row gap-4 items-end">
<div class="flex-1">
<label for="rfid-input" class="block text-gray-700 font-medium mb-2">Tap RFID Card to Confirm</label>
<input type="text" id="rfid-input"
class="w-full px-4 py-3 border-2 border-blue-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 font-mono text-lg tracking-widest rfid-pulse"
placeholder="Tap card or enter ID..." autocomplete="off">
</div>
<button id="rfid-scan-btn" class="bg-blue-600 hover:bg-blue-700 text-white font-bold py-3 px-6 rounded-lg transition duration-200">
<i class="fas fa-search mr-2"></i> Lookup
</button>
</div>
<div id="rfid-status" class="mt-3 hidden"></div>
<p class="text-sm text-gray-500 mt-2"><i class="fas fa-info-circle mr-1"></i> Or use the manual form below to select student details</p>
</div>
<!-- Eating Confirmation Form -->
<div id="attendance-form" class="bg-white rounded-lg shadow-md p-6 mb-8">
<h2 class="text-xl font-semibold mb-4 text-gray-800">Dining Confirmation</h2>
<h3 class="text-lg font-medium mb-4 text-center text-blue-600">Confirm Student Has Eaten</h3>
<div id="eating-details" class="space-y-4 mt-6">
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div>
<label for="class" class="block text-gray-700 font-medium mb-2">Class</label>
<select id="class" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500" onchange="loadStudents()">
<option value="">Select Class</option>
</select>
</div>
<div>
<label for="form" class="block text-gray-700 font-medium mb-2">Form</label>
<select id="form" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500" onchange="loadStudents()">
<option value="">Select Form</option>
<option value="1">Form 1</option>
<option value="2">Form 2</option>
<option value="3">Form 3</option>
<option value="4">Form 4</option>
<option value="5">Form 5</option>
</select>
</div>
</div>
<div id="student-container" class="mt-4 hidden">
<label for="student" class="block text-gray-700 font-medium mb-2">Student Name</label>
<select id="student" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500" disabled>
<option value="">Please select Class and Form first</option>
</select>
</div>
</div>
<div class="mt-6">
<button id="submit-btn" class="w-full bg-green-600 hover:bg-green-700 text-white font-bold py-3 px-4 rounded-lg transition duration-200">
<i class="fas fa-check-circle mr-2"></i> Confirm Meal Taken
</button>
</div>
</div>
<!-- Success Message -->
<div id="success-message" class="hidden fade-in bg-green-50 border border-green-200 text-green-700 p-4 rounded-lg mb-8">
<div class="flex items-center mb-3">
<i class="fas fa-check-circle text-green-500 text-2xl mr-3"></i>
<div>
<h3 class="font-bold">Attendance Submitted Successfully!</h3>
<p class="text-sm">Your dining hall attendance has been recorded.</p>
</div>
</div>
<button id="fill-again-btn" class="w-full bg-green-600 hover:bg-green-700 text-white font-medium py-2 px-4 rounded transition duration-200">
<i class="fas fa-redo mr-2"></i> Fill Again
</button>
</div>
<!-- Footer -->
<footer class="text-center text-gray-600 text-sm mt-12">
<p>© 2025 WASTE-LESS Dining Hall Attendance System. All rights reserved.</p>
<p class="mt-1">Data will be saved to <a href="https://github.com/WaffleExecutors/Waste-LessV5/blob/main/data%20who%20has%20ate%20at%20dm" class="text-blue-600 hover:underline" target="_blank">GitHub repository</a></p>
</footer>
</div>
<script src="config.js"></script>
<script>
// ===== RFID SYSTEM =====
let rfidMappings = {};
async function loadRfidMappings() {
try {
const response = await fetch(`https://api.github.com/repos/${GITHUB_CONFIG.REPOS.ATTENDANCE}/contents/${GITHUB_CONFIG.PATHS.RFID || 'rfid-mappings.json'}`, {
headers: {
'Authorization': `token ${GITHUB_CONFIG.TOKEN}`,
'Accept': 'application/vnd.github.v3+json'
}
});
if (response.ok) {
const data = await response.json();
rfidMappings = JSON.parse(atob(data.content));
} else if (response.status === 404) {
rfidMappings = {};
}
} catch (e) {
console.error('Error loading RFID mappings:', e);
rfidMappings = {};
}
}
async function handleRfidScan() {
const rfidId = document.getElementById('rfid-input').value.trim();
if (!rfidId) return;
if (!rfidMappings || Object.keys(rfidMappings).length === 0) {
await loadRfidMappings();
}
const mapping = rfidMappings[rfidId];
const statusDiv = document.getElementById('rfid-status');
if (mapping) {
document.getElementById('class').value = mapping.class;
document.getElementById('form').value = mapping.form;
loadStudents();
setTimeout(() => {
const studentSelect = document.getElementById('student');
for (let i = 0; i < studentSelect.options.length; i++) {
if (studentSelect.options[i].value === mapping.studentName) {
studentSelect.selectedIndex = i;
break;
}
}
}, 600);
statusDiv.className = 'mt-3 p-3 bg-green-100 border border-green-300 rounded-lg text-green-700 flex items-center';
statusDiv.innerHTML = `<i class="fas fa-check-circle mr-2"></i> Card recognized: <strong>${mapping.studentName}</strong> (${mapping.class} Form ${mapping.form}). You can now submit.`;
statusDiv.classList.remove('hidden');
} else {
statusDiv.className = 'mt-3 p-3 bg-red-100 border border-red-300 rounded-lg text-red-700 flex items-center';
statusDiv.innerHTML = `<i class="fas fa-exclamation-circle mr-2"></i> RFID card not found in system. Please use manual entry below.`;
statusDiv.classList.remove('hidden');
}
}
document.getElementById('rfid-scan-btn').addEventListener('click', handleRfidScan);
document.getElementById('rfid-input').addEventListener('keypress', function(e) {
if (e.key === 'Enter') {
e.preventDefault();
handleRfidScan();
}
});
// ===== DYNAMIC STUDENT LIST =====
let students = {};
let availableClasses = [];
async function loadStudentList() {
try {
const response = await fetch(`https://api.github.com/repos/${GITHUB_CONFIG.REPOS.STUDENT_LIST || GITHUB_CONFIG.REPOS.CONSUMED}/contents/student-list.json`, {
headers: {
'Authorization': `token ${GITHUB_CONFIG.TOKEN}`,
'Accept': 'application/vnd.github.v3+json'
}
});
if (response.status === 404) {
students = {};
availableClasses = [];
updateClassDropdown();
return;
}
if (!response.ok) throw new Error('Failed to load student list');
const data = await response.json();
students = JSON.parse(atob(data.content));
availableClasses = [...new Set(Object.keys(students).map(key => key.split('-')[0]))].sort();
updateClassDropdown();
} catch (error) {
console.error('Error loading student list:', error);
alert('Could not load student list. Using empty list.');
students = {};
availableClasses = [];
updateClassDropdown();
}
loadStudents();
}
function updateClassDropdown() {
const classSelect = document.getElementById('class');
classSelect.innerHTML = '<option value="">Select Class</option>';
availableClasses.forEach(cls => {
const opt = document.createElement('option');
opt.value = cls;
opt.textContent = cls;
classSelect.appendChild(opt);
});
}
function loadStudents() {
const classVal = document.getElementById('class').value;
const formVal = document.getElementById('form').value;
const studentContainer = document.getElementById('student-container');
const studentSelect = document.getElementById('student');
studentSelect.innerHTML = '<option value="">Select Student</option>';
studentSelect.disabled = true;
studentContainer.classList.add('hidden');
if (classVal && formVal) {
const key = `${classVal}-${formVal}`;
if (students[key] && students[key].length > 0) {
students[key].forEach(name => {
const option = document.createElement('option');
option.value = name;
option.textContent = name;
studentSelect.appendChild(option);
});
studentSelect.disabled = false;
studentContainer.classList.remove('hidden');
} else {
studentSelect.innerHTML = '<option value="">No students found</option>';
}
}
}
window.addEventListener('load', loadStudentList);
// ===== TIME & MEAL FUNCTIONS =====
function updateDateTime() {
const now = new Date();
document.getElementById('current-time').textContent = now.toLocaleTimeString('en-US', { hour: '2-digit', minute: '2-digit', second: '2-digit' });
document.getElementById('current-date').textContent = now.toLocaleDateString('en-US', { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' });
const currentMeal = getCurrentMealTime();
document.getElementById('current-meal-time-display').textContent = currentMeal.charAt(0).toUpperCase() + currentMeal.slice(1);
const hours = now.getHours();
let nextMeal = '';
if (hours < 6) nextMeal = 'Breakfast (6:20 AM)';
else if (hours < 13) nextMeal = 'Lunch (1:30 PM)';
else if (hours < 17) nextMeal = 'Dinner (5:50 PM)';
else if (hours < 22) nextMeal = 'Supper (10:30 PM)';
else nextMeal = 'Breakfast (6:20 AM)';
document.getElementById('next-meal-time-display').textContent = nextMeal;
}
setInterval(updateDateTime, 1000);
updateDateTime();
function getCurrentMealTime() {
const now = new Date();
const hours = now.getHours();
const minutes = now.getMinutes();
if (hours === 6 && minutes >= 20 || hours === 6 && minutes <= 50) return 'breakfast';
if (hours === 13 && minutes >= 30 || hours === 14 && minutes <= 30) return 'lunch';
if (hours === 17 && minutes >= 50 || hours === 18 && minutes <= 30 || hours === 19 && minutes <= 0) return 'dinner';
if (hours === 22 && minutes >= 30 || hours === 23 && minutes <= 0) return 'supper';
if (hours < 6) return 'breakfast';
if (hours < 13) return 'lunch';
if (hours < 17) return 'dinner';
if (hours < 22) return 'supper';
return 'breakfast';
}
function isCurrentTimeMealPeriod() {
const now = new Date();
const hours = now.getHours();
const minutes = now.getMinutes();
return (
(hours === 6 && minutes >= 20 && minutes <= 50) ||
(hours === 13 && minutes >= 30 || hours === 14 && minutes <= 30) ||
(hours === 17 && minutes >= 50 || hours === 18 || (hours === 19 && minutes <= 0)) ||
(hours === 22 && minutes >= 30 || hours === 23)
);
}
const menus = {
breakfast: {
regular: ["Nasi Lemak with Fried Chicken", "Fried Noodles with Vegetables", "Fruits (Watermelon & Papaya)", "Teh Tarik / Coffee"],
color: '#ca8a04', bg: 'linear-gradient(135deg, #fef9c3, #fef3c7)', border: '#fde68a', icon: 'fa-sun', name: 'Breakfast',
time: '6:20 AM - 6:50 AM'
},
lunch: {
regular: ["Steamed Rice with Beef Rendang", "Stir-fried Vegetables", "Fish Ball Soup", "Fruits (Pineapple & Dragon Fruit)"],
color: '#16a34a', bg: 'linear-gradient(135deg, #dcfce7, #d1fae5)', border: '#bbf7d0', icon: 'fa-utensils', name: 'Lunch',
time: '1:30 PM - 2:30 PM'
},
dinner: {
regular: ["Fried Rice with Chicken Satay", "Mixed Vegetables", "Egg Drop Soup", "Fruits (Apple & Pear)"],
color: '#4f46e5', bg: 'linear-gradient(135deg, #e0e7ff, #ddd6fe)', border: '#c7d2fe', icon: 'fa-moon', name: 'Dinner',
time: '5:50 PM - 7:00 PM'
},
supper: {
regular: ["Sandwiches with Egg Mayo", "Milo and Biscuits", "Fruits (Banana)"],
color: '#c026d3', bg: 'linear-gradient(135deg, #fce7f3, #f5d0fe)', border: '#fbcfe8', icon: 'fa-bed', name: 'Supper',
time: '10:30 PM - 11:00 PM'
}
};
let selectedMeal = getCurrentMealTime();
function showMealMenu(mealTime) {
selectedMeal = mealTime;
const container = document.getElementById('menu-display-container');
container.classList.remove('hidden');
const mealData = menus[mealTime];
// Reset all meal cards
document.querySelectorAll('.meal-card').forEach(btn => {
btn.classList.remove('active');
btn.style.borderWidth = '2px';
});
// Highlight selected
const selectedBtn = document.querySelector(`.meal-card[data-meal="${mealTime}"]`);
if (selectedBtn) {
selectedBtn.classList.add('active');
selectedBtn.style.borderColor = mealData.color;
selectedBtn.style.borderWidth = '3px';
}
// Update meal icon
const mealIcon = document.getElementById('meal-period-icon');
mealIcon.className = `fas ${mealData.icon} text-2xl`;
mealIcon.style.color = mealData.color;
updateMenuDisplay(mealTime);
document.getElementById('selected-meal-time-display').innerHTML =
`<i class="fas ${mealData.icon} mr-3" style="color: ${mealData.color}"></i>` +
`<span class="font-bold" style="color: ${mealData.color}">${mealData.name} (${mealData.time})</span>`;
document.getElementById('default-menu-message').classList.add('hidden');
document.getElementById('attendance-form').classList.remove('hidden');
}
function updateMenuDisplay(mealTime) {
const regularMenu = document.getElementById('regular-menu');
const mealData = menus[mealTime];
regularMenu.innerHTML = '';
mealData.regular.forEach((item, index) => {
const div = document.createElement('div');
div.className = 'flex items-center p-3 rounded-lg hover:bg-white/50 transition-colors';
div.style.background = index % 2 === 0 ? 'rgba(255,255,255,0.4)' : 'transparent';
div.innerHTML = `
<div class="w-8 h-8 rounded-full flex items-center justify-center mr-3 flex-shrink-0" style="background: ${mealData.color}15;">
<i class="fas fa-circle text-xs" style="color: ${mealData.color}"></i>
</div>
<span class="font-medium text-gray-700">${item}</span>
`;
regularMenu.appendChild(div);
});
const menuDisplay = document.getElementById('menu-display');
menuDisplay.style.borderColor = mealData.border;
}
const initialMeal = getCurrentMealTime();
if (isCurrentTimeMealPeriod()) {
showMealMenu(initialMeal);
} else {
document.getElementById('menu-display-container').classList.add('hidden');
}
// ===== SUBMISSION =====
document.getElementById('submit-btn').addEventListener('click', async function() {
this.disabled = true;
this.innerHTML = '<i class="fas fa-spinner fa-spin mr-2"></i> Submitting...';
const studentClass = document.getElementById('class').value;
const form = document.getElementById('form').value;
const student = document.getElementById('student').value;
if (!student) {
alert('Please select a student name');
this.disabled = false;
this.innerHTML = '<i class="fas fa-check-circle mr-2"></i> Confirm Meal Taken';
return;
}
if (!studentClass || !form) {
alert('Please select both class and form');
this.disabled = false;
this.innerHTML = '<i class="fas fa-check-circle mr-2"></i> Confirm Meal Taken';
return;
}
const data = {
timestamp: new Date().toISOString(),
mealTime: getCurrentMealTime(),
attendance: 'yes',
class: studentClass,
form: form,
studentName: student
};
try {
const success = await sendDataToGitHub(data);
if (success) {
document.getElementById('attendance-form').classList.add('hidden');
document.getElementById('success-message').classList.remove('hidden');
document.getElementById('success-message').classList.add('fade-in');
}
} catch (error) {
alert('Failed to submit: ' + error.message);
} finally {
this.disabled = false;
this.innerHTML = '<i class="fas fa-check-circle mr-2"></i> Confirm Meal Taken';
}
});
async function sendDataToGitHub(data) {
try {
let currentContent = '';
let sha = '';
const filePath = 'data%20who%20has%20ate%20at%20dm';
const repoUrl = `https://api.github.com/repos/${GITHUB_CONFIG.REPOS.CONSUMED}/contents/${filePath}`;
const getResponse = await fetch(repoUrl, {
headers: {
'Authorization': `token ${GITHUB_CONFIG.TOKEN}`,
'Accept': 'application/vnd.github.v3+json'
}
});
if (getResponse.ok) {
const fileData = await getResponse.json();
sha = fileData.sha;
currentContent = atob(fileData.content);
} else if (getResponse.status !== 404) {
throw new Error('Failed to fetch existing data');
}
const record = JSON.stringify(data);
const newContent = currentContent + record + '\n';
const response = await fetch(repoUrl, {
method: 'PUT',
headers: {
'Authorization': `token ${GITHUB_CONFIG.TOKEN}`,
'Content-Type': 'application/json',
'Accept': 'application/vnd.github.v3+json'
},
body: JSON.stringify({
message: `Meal confirmation - ${new Date().toLocaleString()}`,
content: btoa(newContent),
sha: sha || undefined,
branch: 'main'
})
});
if (!response.ok) {
const errorData = await response.json();
throw new Error(errorData.message || 'Submission failed');
}
return true;
} catch (error) {
console.error('Submission error:', error);
throw new Error('Failed to confirm meal: ' + error.message);
}
}
function resetForm() {
document.getElementById('class').value = '';
document.getElementById('form').value = '';
document.getElementById('student').value = '';
document.getElementById('student').disabled = true;
document.getElementById('student-container').classList.add('hidden');
document.getElementById('success-message').classList.add('hidden');
document.getElementById('attendance-form').classList.remove('hidden');
document.getElementById('rfid-input').value = '';
document.getElementById('rfid-status').classList.add('hidden');
}
document.getElementById('fill-again-btn').addEventListener('click', resetForm);
setInterval(() => {
const currentMeal = getCurrentMealTime();
if (currentMeal !== selectedMeal) {
selectedMeal = currentMeal;
if (!document.getElementById('menu-display-container').classList.contains('hidden')) {
updateMenuDisplay(selectedMeal);
}
}
}, 60000);
</script>
</body>
</html>