Scheduling infrastructure for absolutely everyone.
chore: tidy up typos across docs, comments, and setup copy (#29260)
Mandar Joshi46eb533dbd20
diff --git a/apps/api/v2/src/platform/schedules/schedules_2024_06_11/controllers/schedules.controller.ts b/apps/api/v2/src/platform/schedules/schedules_2024_06_11/controllers/schedules.controller.tsindex c0184b6c6d2..149be5fbd8c 100644--- a/apps/api/v2/src/platform/schedules/schedules_2024_06_11/controllers/schedules.controller.ts+++ b/apps/api/v2/src/platform/schedules/schedules_2024_06_11/controllers/schedules.controller.ts@@ -60,8 +60,8 @@ export class SchedulesController_2024_06_11 {The point of creating schedules is for event types to be available at specific times.- The first goal of schedules is to have a default schedule. If you are platform customer and created managed users, then it is important to note that each managed user should have a default schedule.- 1. If you passed \`timeZone\` when creating managed user, then the default schedule from Monday to Friday from 9AM to 5PM will be created with that timezone. The managed user can then change the default schedule via the \`AvailabilitySettings\` atom.+ The first goal of schedules is to have a default schedule. If you are a platform customer and have created managed users, then it is important to note that each managed user should have a default schedule.+ 1. If you passed \`timeZone\` when creating a managed user, then the default schedule from Monday to Friday from 9AM to 5PM will be created with that timezone. The managed user can then change the default schedule via the \`AvailabilitySettings\` atom.2. If you did not, then we assume you want the user to have this specific schedule right away. You should create a default schedule by specifying\`"isDefault": true\` in the request body. Until the user has a default schedule the user can't be booked nor manage their schedule via the AvailabilitySettings atom.diff --git a/apps/docs/content/installation.mdx b/apps/docs/content/installation.mdxindex f028c604b84..7cdd6ea656e 100644--- a/apps/docs/content/installation.mdx+++ b/apps/docs/content/installation.mdx@@ -1,6 +1,6 @@# Installation-There are multiple ways in which you can deploy Cal.diy, providing support for customers who want to implement Cal.diy within their existing infrastructure stack. Let's go through them one-by-one. You can find the instructions for deployment in our README file, which is the section you see when you scroll down in our GitHub repository, or if you've got a copy of Cal.diy downloaded already, you can open the file contained in the downloaded repository called `README.md`.+There are multiple ways in which you can deploy Cal.diy, providing support for customers who want to implement Cal.diy within their existing infrastructure stack. Let's go through them one by one. You can find the instructions for deployment in our README file, which is the section you see when you scroll down in our GitHub repository, or if you've got a copy of Cal.diy downloaded already, you can open the file contained in the downloaded repository called `README.md`.## Requirementsdiff --git a/apps/web/components/apps/paypal/Setup.tsx b/apps/web/components/apps/paypal/Setup.tsxindex 5a368efb00f..894df78b913 100644--- a/apps/web/components/apps/paypal/Setup.tsx+++ b/apps/web/components/apps/paypal/Setup.tsx@@ -83,19 +83,19 @@ export default function PayPalSetup() {</div></form><div>- <p className="text-lgf text-default mt-5 font-bold">Getting started with Paypal APP</p>+ <p className="text-lgf text-default mt-5 font-bold">Getting started with the PayPal app</p><p className="text-default font-semi mt-2">- Here in Cal.diy we offer Paypal as one of our payment gateway. You can use your own Paypal- Business account to receive payments from your customers enabling and setting up price and- currency for each of your event types.+ Cal.diy offers PayPal as one of its payment gateways. You can use your own PayPal+ Business account to receive payments from your customers by setting a price and currency+ for each of your event types.</p><p className="text-lgf text-default mt-5 inline-flex font-bold"><CircleAlertIcon className="mr-2 mt-1 h-4 w-4" /> Important requirements:</p><ul className="text-default ml-1 mt-2 list-disc pl-2">- <li>Paypal Business account</li>- <li>Paypal Developer account</li>+ <li>PayPal Business account</li>+ <li>PayPal Developer account</li></ul><p className="text-default mb-2 mt-5 font-bold">Resources:</p>@@ -118,7 +118,7 @@ export default function PayPalSetup() {<ol className="text-default ml-1 mt-5 list-decimal pl-2">{/* @TODO: translate */}<li>- Log into your Paypal Developer account and create a new app{" "}+ Log into your PayPal Developer account and create a new app{" "}<atarget="_blank"href="https://developer.paypal.com/dashboard/applications/live"diff --git a/apps/web/pagesAndRewritePaths.ts b/apps/web/pagesAndRewritePaths.tsindex fdcbf9cfdfd..b2d863e3b3b 100644--- a/apps/web/pagesAndRewritePaths.ts+++ b/apps/web/pagesAndRewritePaths.ts@@ -4,7 +4,7 @@ import { nextJsOrgRewriteConfig } from "./getNextjsOrgRewriteConfig";// Top-level route names that are explicitly allowed for org rewrite (whitelist)export const topLevelRouteNamesWhitelistedForRewrite: string[] = [- // We don't allow all dashboard route names to be used as slug because people are probably accustomed to access links like acme.cal.com/event-types etc.+ // We don't allow all dashboard route names to be used as slug because people are probably accustomed to accessing links like acme.cal.com/event-types etc.// So, we carefully allow, what is absolutely needed.// Allowed to be a team/user slug in organization because onboarding is a common team name"onboarding",@@ -81,7 +81,7 @@ function getRegExpMatchingAllReservedRoutes(suffix: string): string {const staticAssets = ["embed"];// FIXME: I am not sure why public is needed here, an asset 'test' in public isn't accessible through "/public/test" but only through "/test"- // We should infact scan through all files in public and exclude them instead.+ // We should in fact scan through all files in public and exclude them instead.const nextJsSpecialPaths = ["_next", "public"];const allTopLevelRoutesExcludedFromOrgRewrite = topLevelRoutesExcludedFromOrgRewritediff --git a/apps/web/playwright/availability.e2e.ts b/apps/web/playwright/availability.e2e.tsindex 0e6d0ef3fe9..9d338bda96f 100644--- a/apps/web/playwright/availability.e2e.ts+++ b/apps/web/playwright/availability.e2e.ts@@ -116,7 +116,7 @@ test.describe("Availability", () => {await page.getByTestId("new-schedule").first().click();await page.locator('[id="name"]').fill("More working hours");page.locator('[type="submit"]').click();- await expect(page.getByTestId("availablity-title")).toHaveValue("More working hours");+ await expect(page.getByTestId("availability-title")).toHaveValue("More working hours");});await test.step("Can delete a schedule", async () => {await page.getByTestId("go-back-button").click();@@ -147,11 +147,11 @@ test.describe("Availability", () => {const save = (await localize("en"))("save");const copyTimesTo = (await localize("en"))("copy_times_to");- const availTitle = page.getByTestId("availablity-title");+ const availTitle = page.getByTestId("availability-title");await availTitle.locator("xpath=..").locator("span.whitespace-pre").first().click();await expect(availTitle).toBeEditable();// change availability name- await page.getByTestId("availablity-title").fill("Working Hours test");+ await page.getByTestId("availability-title").fill("Working Hours test");await expect(page.getByTestId("subtitle").first()).toBeVisible();await page.getByTestId(sunday).getByRole("switch").click();await page.getByTestId(monday).first().click();diff --git a/apps/web/playwright/payment-apps.e2e.ts b/apps/web/playwright/payment-apps.e2e.tsindex e7875cb297a..f6815531bad 100644--- a/apps/web/playwright/payment-apps.e2e.ts+++ b/apps/web/playwright/payment-apps.e2e.ts@@ -239,8 +239,8 @@ test.describe("Payment app", () => {await page.getByRole("button", { name: "Setup" }).click();- // Expect "Getting started with Paypal APP" to be displayed- await expect(page.locator("text=Getting started with Paypal APP").first()).toBeVisible();+ await expect(page).toHaveURL(/\/apps\/paypal\/setup/);+ await expect(page.getByText("Getting started with the PayPal app")).toBeVisible();});/**diff --git a/packages/app-store/_utils/stripe.ts b/packages/app-store/_utils/stripe.tsindex 8e8586975d6..22dffa82048 100644--- a/packages/app-store/_utils/stripe.ts+++ b/packages/app-store/_utils/stripe.ts@@ -30,7 +30,7 @@ const userType = {} satisfies Prisma.UserSelect;export type UserType = Prisma.UserGetPayload<{ select: typeof userType }>;-/** This will retrieve the customer ID from Stripe or create it if it doesn't exists yet. */+/** This will retrieve the customer ID from Stripe or create it if it doesn't exist yet. */export async function getStripeCustomerId(user: UserType): Promise<string> {let customerId: string | null = null;diff --git a/packages/app-store/stripepayment/lib/customer.ts b/packages/app-store/stripepayment/lib/customer.tsindex 4a214ffffa3..081e593b53f 100644--- a/packages/app-store/stripepayment/lib/customer.ts+++ b/packages/app-store/stripepayment/lib/customer.ts@@ -30,7 +30,7 @@ const userType = {type UserType = Prisma.UserGetPayload<{ select: typeof userType }>;-/** This will retrieve the customer ID from Stripe or create it if it doesn't exists yet. */+/** This will retrieve the customer ID from Stripe or create it if it doesn't exist yet. */export async function getStripeCustomerId(user: UserType): Promise<string> {let customerId: string | null = null;diff --git a/packages/app-store/vital/lib/reschedule.ts b/packages/app-store/vital/lib/reschedule.tsindex d682ef94fac..2fb4d3782bb 100644--- a/packages/app-store/vital/lib/reschedule.ts+++ b/packages/app-store/vital/lib/reschedule.ts@@ -113,7 +113,7 @@ const Reschedule = async (bookingUid: string, cancellationReason: string) => {startTime: bookingToReschedule.startTime.toISOString(),endTime: bookingToReschedule.endTime.toISOString(),attendees: usersToPeopleType(- // username field doesn't exists on attendee but could be in the future+ // username field doesn't exist on attendee but could be added in the futurebookingToReschedule.attendees as unknown as PersonAttendeeCommonFields[],tAttendees),diff --git a/packages/app-store/wipemycalother/lib/reschedule.ts b/packages/app-store/wipemycalother/lib/reschedule.tsindex 8637a22a0d8..c6a7f2c9e71 100644--- a/packages/app-store/wipemycalother/lib/reschedule.ts+++ b/packages/app-store/wipemycalother/lib/reschedule.ts@@ -116,7 +116,7 @@ const Reschedule = async (bookingUid: string, cancellationReason: string) => {startTime: bookingToReschedule.startTime.toISOString(),endTime: bookingToReschedule.endTime.toISOString(),attendees: usersToPeopleType(- // username field doesn't exists on attendee but could be in the future+ // username field doesn't exist on attendee but could be added in the futurebookingToReschedule.attendees as unknown as PersonAttendeeCommonFields[],tAttendees),diff --git a/packages/embeds/embed-core/src/ModalBox/ModalBoxHtml.ts b/packages/embeds/embed-core/src/ModalBox/ModalBoxHtml.tsindex 5f49710e5d0..19a6bc21ff8 100644--- a/packages/embeds/embed-core/src/ModalBox/ModalBoxHtml.ts+++ b/packages/embeds/embed-core/src/ModalBox/ModalBoxHtml.ts@@ -7,7 +7,7 @@ function getStyle() {<style>/*Modal box is added as a child of the top-most element which is body(the container)- If the container has grid layout being used. Even if the cal-modal-box is visiblity:hidden, it causes it to take up space in the grid layout+ If the container has grid layout being used. Even if the cal-modal-box is visibility:hidden, it causes it to take up space in the grid layoutIt causes that space to keep on increasing as modal box is opened and closed repeatedlyWe set position:absolute to move it out of the regular flow of the grid layout*/diff --git a/packages/features/bookings/lib/EventManager.ts b/packages/features/bookings/lib/EventManager.tsindex 3a08cd7465d..235ae2f540d 100644--- a/packages/features/bookings/lib/EventManager.ts+++ b/packages/features/bookings/lib/EventManager.ts@@ -1130,9 +1130,9 @@ export default class EventManager {let result = [];for (const reference of calendarReference) {const { uid: bookingRefUid, externalCalendarId: bookingExternalCalendarId } = reference;- let calenderExternalId: string | null = null;+ let calendarExternalId: string | null = null;if (bookingExternalCalendarId) {- calenderExternalId = bookingExternalCalendarId;+ calendarExternalId = bookingExternalCalendarId;}if (reference.credentialId) {@@ -1161,14 +1161,14 @@ export default class EventManager {};}}- result.push(updateEvent(credential, event, bookingRefUid, calenderExternalId));+ result.push(updateEvent(credential, event, bookingRefUid, calendarExternalId));} else {const credentials = this.calendarCredentials.filter((credential) => credential.type === reference?.type);for (const credential of credentials) {log.silly("updateAllCalendarEvents-credential", JSON.stringify({ credentials }));- result.push(updateEvent(credential, event, bookingRefUid, calenderExternalId));+ result.push(updateEvent(credential, event, bookingRefUid, calendarExternalId));}}}diff --git a/packages/features/schedules/lib/date-ranges.test.ts b/packages/features/schedules/lib/date-ranges.test.tsindex 3c2f6fab1e7..be7cc868239 100644--- a/packages/features/schedules/lib/date-ranges.test.ts+++ b/packages/features/schedules/lib/date-ranges.test.ts@@ -1185,7 +1185,7 @@ describe("intersect function comprehensive tests", () => {});describe("timezone offset exclusion bug", () => {- it("should succesfully mix UTC and timezone-aware dayjs objects in subtract", () => {+ it("should successfully mix UTC and timezone-aware dayjs objects in subtract", () => {const TIMEZONE = "Asia/Kolkata"; // IST timezone (+05:30)const sourceRanges = [diff --git a/packages/platform/atoms/availability/AvailabilitySettings.tsx b/packages/platform/atoms/availability/AvailabilitySettings.tsxindex 79fb263ad02..84184f7a788 100644--- a/packages/platform/atoms/availability/AvailabilitySettings.tsx+++ b/packages/platform/atoms/availability/AvailabilitySettings.tsx@@ -417,7 +417,7 @@ export const AvailabilitySettings = forwardRef<AvailabilitySettingsFormRef, AvaiisReady={!isLoading}disabled={disableEditableHeading}{...field}- data-testid="availablity-title"+ data-testid="availability-title"/>)}/>diff --git a/packages/platform/types/bookings/2024-08-13/inputs/create-booking.input.ts b/packages/platform/types/bookings/2024-08-13/inputs/create-booking.input.tsindex 08be1fb017c..a983ba84f5b 100644--- a/packages/platform/types/bookings/2024-08-13/inputs/create-booking.input.ts+++ b/packages/platform/types/bookings/2024-08-13/inputs/create-booking.input.ts@@ -345,7 +345,7 @@ export class CreateBookingInput_2024_08_13 {],})@Type(() => Object)- // note(Lauris): string is for backwards compatability+ // note(Lauris): string is for backwards compatibilitylocation?: BookingInputLocation_2024_08_13 | string;@ApiProperty({diff --git a/packages/trpc/server/routers/viewer/bookings/requestReschedule.handler.ts b/packages/trpc/server/routers/viewer/bookings/requestReschedule.handler.tsindex 314f7d728cb..fa7892d269b 100644--- a/packages/trpc/server/routers/viewer/bookings/requestReschedule.handler.ts+++ b/packages/trpc/server/routers/viewer/bookings/requestReschedule.handler.ts@@ -129,7 +129,7 @@ export const requestRescheduleHandler = async ({ ctx, input, source }: RequestReendTime: bookingToReschedule.endTime.toISOString(),hideOrganizerEmail: eventType?.hideOrganizerEmail,attendees: usersToPeopleType(- // username field doesn't exists on attendee but could be in the future+ // username field doesn't exist on attendee but could be added in the futurebookingToReschedule.attendees as unknown as PersonAttendeeCommonFields[],tAttendees),@@ -229,7 +229,7 @@ export const requestRescheduleHandler = async ({ ctx, input, source }: RequestReendTime: bookingToReschedule.endTime ? dayjs(bookingToReschedule.endTime).format() : "",organizer,attendees: usersToPeopleType(- // username field doesn't exists on attendee but could be in the future+ // username field doesn't exist on attendee but could be added in the futurebookingToReschedule.attendees as unknown as PersonAttendeeCommonFields[],tAttendees),diff --git a/packages/ui/components/form/datepicker/DatePicker.tsx b/packages/ui/components/form/datepicker/DatePicker.tsxindex ddf5abd8ade..ef32d9e5ef7 100644--- a/packages/ui/components/form/datepicker/DatePicker.tsx+++ b/packages/ui/components/form/datepicker/DatePicker.tsx@@ -20,7 +20,7 @@ const DatePicker = ({ minDate, disabled, date, onDatesChange, className, label }onDatesChange?.(newDate ?? new Date());}const fromDate = minDate ?? new Date();- const calender = (+ const calendar = (<CalendarinitialFocusfromDate={minDate === null ? undefined : fromDate}@@ -53,7 +53,7 @@ const DatePicker = ({ minDate, disabled, date, onDatesChange, className, label }align="start"sideOffset={4}>- {calender}+ {calendar}</Popover.Content></Popover.Portal></Popover.Root>diff --git a/playwright.config.ts b/playwright.config.tsindex f0e72806f9c..6eab6170306 100644--- a/playwright.config.ts+++ b/playwright.config.ts@@ -94,7 +94,7 @@ const DEFAULT_CHROMIUM: NonNullable<PlaywrightTestConfig["projects"]>[number]["uconst config: PlaywrightTestConfig = {forbidOnly: !!process.env.CI,retries: process.env.CI ? 2 : 0,- // While debugging it should be focussed mode+ // While debugging it should be focused mode// eslint-disable-next-line turbo/no-undeclared-env-varsworkers: process.env.PWDEBUG ? 1 : os.cpus().length,timeout: DEFAULT_TEST_TIMEOUT,