Skip to content

Commit 0abc0c3

Browse files
authored
Merge pull request #63 from untilhamza:release/v1.14.0
Release/v1.14.0
2 parents 126a674 + 698a885 commit 0abc0c3

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

src/http/serverInterface.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ function processSlot(result) {
5151
async function checkUserAlreadyBookedDay(bookingData: NewBooking): Promise<boolean> {
5252
const ADMINS = ["Nwzxrf32Uee9i6hbTXSN2mWVzlC2", "lHxJifUfgHhJkECibwAudvf3MGp1", "lru8dL4JVWTycq0LHhHgyaWqX133"];
5353

54+
// const BLOCKED_USERS = ["lHxJifUfgHhJkECibwAudvf3MGp1", "lru8dL4JVWTycq0LHhHgyaWqX133"];
55+
5456
if (ADMINS.includes(bookingData.userId)) {
5557
return true;
5658
}
@@ -68,7 +70,9 @@ async function checkUserAlreadyBookedDay(bookingData: NewBooking): Promise<boole
6870

6971
const bookingsSnap = await getDocs(bookingsQuery);
7072

71-
return bookingsSnap.empty;
73+
const numberOfBookings = bookingsSnap.size;
74+
75+
return numberOfBookings <= 1;
7276
}
7377

7478
function makeSlotMoment(momentDate: Moment, timeString) {

src/pages/NewBooking.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ const NewBooking = () => {
5858
if (submitBookingsError && submitBookingsError.includes("Looks like you have already booked today")) {
5959
Swal.fire({
6060
title: `Oops!`,
61-
html: `<p>Looks like you have already booked on this day. Please cancel your previous appointment to make a new one.</p>
61+
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>
6262
`,
6363
icon: `info`,
6464
confirmButtonText: "Okay",

src/version.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"version": "1.13.1"
2+
"version": "1.14.0"
33
}

0 commit comments

Comments
 (0)