fix: prevent browser caching of booked dates and ensure booked dates are immediately disabled
This commit is contained in:
@@ -79,6 +79,14 @@
|
||||
})
|
||||
.then((data) => {
|
||||
if (data.success) {
|
||||
try {
|
||||
const localBooked = JSON.parse(localStorage.getItem("bookedDates") || "[]");
|
||||
if (!localBooked.includes(selectedDate)) {
|
||||
localBooked.push(selectedDate);
|
||||
localStorage.setItem("bookedDates", JSON.stringify(localBooked));
|
||||
}
|
||||
} catch (e) {}
|
||||
|
||||
summarySection.classList.add("hidden");
|
||||
if (backLink) {
|
||||
backLink.classList.add("hidden");
|
||||
|
||||
Reference in New Issue
Block a user