Skip to content

Commit

Permalink
Merge pull request #63 from untilhamza:release/v1.14.0
Browse files Browse the repository at this point in the history
Release/v1.14.0
  • Loading branch information
untilhamza authored Mar 22, 2023
2 parents 126a674 + 698a885 commit 0abc0c3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion src/http/serverInterface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ function processSlot(result) {
async function checkUserAlreadyBookedDay(bookingData: NewBooking): Promise<boolean> {
const ADMINS = ["Nwzxrf32Uee9i6hbTXSN2mWVzlC2", "lHxJifUfgHhJkECibwAudvf3MGp1", "lru8dL4JVWTycq0LHhHgyaWqX133"];

// const BLOCKED_USERS = ["lHxJifUfgHhJkECibwAudvf3MGp1", "lru8dL4JVWTycq0LHhHgyaWqX133"];

if (ADMINS.includes(bookingData.userId)) {
return true;
}
Expand All @@ -68,7 +70,9 @@ async function checkUserAlreadyBookedDay(bookingData: NewBooking): Promise<boole

const bookingsSnap = await getDocs(bookingsQuery);

return bookingsSnap.empty;
const numberOfBookings = bookingsSnap.size;

return numberOfBookings <= 1;
}

function makeSlotMoment(momentDate: Moment, timeString) {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/NewBooking.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const NewBooking = () => {
if (submitBookingsError && submitBookingsError.includes("Looks like you have already booked today")) {
Swal.fire({
title: `Oops!`,
html: `<p>Looks like you have already booked on this day. Please cancel your previous appointment to make a new one.</p>
html: `<p>Looks like you have already booked twice on this day. Please cancel one of your previous appointments to make a new one.</p>
`,
icon: `info`,
confirmButtonText: "Okay",
Expand Down
2 changes: 1 addition & 1 deletion src/version.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "1.13.1"
"version": "1.14.0"
}

0 comments on commit 0abc0c3

Please sign in to comment.