fix: Booking Error - cannot be booked at this time (#15288)
Co-authored-by: Joe Au-Yeung <[email protected]>
This commit is contained in:
1 parent
3a22fdb428
commit
765d601ff9
5 files changed
+1345
-89
No files matched your search
@@ -166,6 +166,7 @@ type InputBooking = Partial<Omit<Booking, keyof WhiteListedBookingProps>> & Whit
|
||||
export const Timezones = {
|
||||
"+5:30": "Asia/Kolkata",
|
||||
"+6:00": "Asia/Dhaka",
|
||||
"-11:00": "Pacific/Pago_Pago",
|
||||
};
|
||||
|
||||
async function addHostsToDb(eventTypes: InputEventType[]) {
|
||||
@@ -928,6 +929,21 @@ export const TestData = {
|
||||
],
|
||||
timeZone: Timezones["+5:30"],
|
||||
}),
|
||||
IstWorkHoursNoWeekends: {
|
||||
id: 1,
|
||||
name: "9:30AM to 6PM in India - 4:00AM to 12:30PM in GMT",
|
||||
availability: [
|
||||
{
|
||||
// userId: null,
|
||||
// eventTypeId: null,
|
||||
days: [/*0*/ 1, 2, 3, 4, 5 /*6*/],
|
||||
startTime: new Date("1970-01-01T09:30:00.000Z"),
|
||||
endTime: new Date("1970-01-01T18:00:00.000Z"),
|
||||
date: null,
|
||||
},
|
||||
],
|
||||
timeZone: Timezones["+5:30"],
|
||||
},
|
||||
},
|
||||
users: {
|
||||
example: {
|
||||
@@ -1669,3 +1685,9 @@ export const getMockFailingAppStatus = ({ slug }: { slug: string }) => {
|
||||
export const getMockPassingAppStatus = ({ slug, overrideName }: { slug: string; overrideName?: string }) => {
|
||||
return getMockAppStatus({ slug, overrideName, failures: 0, success: 1 });
|
||||
};
|
||||
|
||||
export const replaceDates = (dates: string[], replacement: Record<string, string>) => {
|
||||
return dates.map((date) => {
|
||||
return date.replace(/(.*)T/, (_, group1) => `${replacement[group1]}T`);
|
||||
});
|
||||
};
|
||||
Reference in new issue
Block a user