From a6356ea2a26c10f53c258584073c865a0b7ac4e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E5=B1=95=E9=B9=8F?= Date: Sat, 6 Dec 2025 01:10:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B7=B2=E8=BF=87=E6=9C=9F?= =?UTF-8?q?=E5=92=8C=E5=B7=B2=E9=A2=84=E7=BA=A6=E6=97=B6=E9=97=B4=E6=AE=B5?= =?UTF-8?q?=E5=8F=AF=E7=82=B9=E5=87=BB=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pending_bookings.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pending_bookings.php b/pending_bookings.php index 794b9e4..f7d19ff 100644 --- a/pending_bookings.php +++ b/pending_bookings.php @@ -725,7 +725,14 @@ try { slotDiv.className = `time-slot ${isPast ? 'past' : ''} ${isBooked ? 'booked' : 'available'}`; slotDiv.textContent = timeString; slotDiv.dataset.time = timeString; - slotDiv.onclick = () => selectTimeSlot(submissionId, timeString); + + // 只有可用的时间段才添加点击事件 + if (!isPast && !isBooked) { + slotDiv.onclick = () => selectTimeSlot(submissionId, timeString); + } else { + // 禁用不可点击的时间段 + slotDiv.style.cursor = 'not-allowed'; + } timeGrid.appendChild(slotDiv); }