Dynamic Links re-integrate with availability logic (#3687)

* -re init dynamic links

* typing fix 001

* added missing div closing tag

* added necessary DB column pull to satisfy Type errors

* further type fixes

* WIP

* removed console logs

* some revert

* WIP

* another approach

* enabled dynamic links availability fetch

* Added users to eventTypeObject for consistency

* WIP: Moving user and changing map item name

* Fix user list call

* Removed explicit User type in map

* modify default user attributes

* adds explicit users to EventTypeObject in teams

* Updated availability page

* Updates Availability

* Futher availability change

* Remove explicit user type from slot router

* more fixes

* more fixes WIP

* cleaning up more errors WIP

* object assign used for typesafety

* added check if dynamic booking is allowed by all users

* cleaned up console logs

* clean up

* Improvement

* resolving suggestions by alex

* changes requested by Omar

* Filter out empty usernames instead of accepting null

Co-authored-by: Peer Richelsen <[email protected]>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: zomars <[email protected]>
This commit is contained in:
authored and GitHub committed 2022-08-12 19:29:29 +00:00
1 parent 870f70fc38
commit ee02112a7c
17 files changed
+197 -101

No files matched your search

+6
View File
@@ -320,6 +320,7 @@ describe("getSchedule", () => {
const scheduleOnCompletelyFreeDay = await getSchedule(
{
eventTypeId: eventType.id,
eventTypeSlug: "",
startTime: `${plus1DateString}T18:30:00.000Z`,
endTime: `${plus2DateString}T18:29:59.999Z`,
timeZone: "Asia/Kolkata",
@@ -349,6 +350,7 @@ describe("getSchedule", () => {
const scheduleForDayWithOneBooking = await getSchedule(
{
eventTypeId: eventType.id,
eventTypeSlug: "",
startTime: `${plus2DateString}T18:30:00.000Z`,
endTime: `${plus3DateString}T18:29:59.999Z`,
timeZone: "Asia/Kolkata", // GMT+5:30
@@ -438,6 +440,7 @@ describe("getSchedule", () => {
const scheduleForDayWithAGoogleCalendarBooking = await getSchedule(
{
eventTypeId: eventType.id,
eventTypeSlug: "",
startTime: `${plus1DateString}T18:30:00.000Z`,
endTime: `${plus2DateString}T18:29:59.999Z`,
timeZone: "Asia/Kolkata",
@@ -480,6 +483,7 @@ describe("getSchedule", () => {
const scheduleForTeamEventOnADayWithNoBooking = await getSchedule(
{
eventTypeId: 1,
eventTypeSlug: "",
startTime: `${todayDateString}T18:30:00.000Z`,
endTime: `${plus1DateString}T18:29:59.999Z`,
timeZone: "Asia/Kolkata",
@@ -509,6 +513,7 @@ describe("getSchedule", () => {
const scheduleForTeamEventOnADayWithOneBooking = await getSchedule(
{
eventTypeId: 1,
eventTypeSlug: "",
startTime: `${plus1DateString}T18:30:00.000Z`,
endTime: `${plus2DateString}T18:29:59.999Z`,
timeZone: "Asia/Kolkata",
@@ -557,6 +562,7 @@ describe("getSchedule", () => {
const scheduleOfTeamEventHavingAUserWithBlockedTimeInAnotherEvent = await getSchedule(
{
eventTypeId: 1,
eventTypeSlug: "",
startTime: `${plus1DateString}T18:30:00.000Z`,
endTime: `${plus2DateString}T18:29:59.999Z`,
timeZone: "Asia/Kolkata",
@@ -24,6 +24,7 @@ const baseUser = {
plan: UserPlan.PRO,
avatar: "",
hideBranding: true,
allowDynamicBooking: true,
};
it("can find lucky users", async () => {