chore: tidy up typos across docs, comments, and setup copy (#29260)
This commit is contained in:
+2
-2
@@ -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.
|
||||
|
||||
|
||||
@@ -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`.
|
||||
|
||||
## Requirements
|
||||
|
||||
|
||||
@@ -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{" "}
|
||||
<a
|
||||
target="_blank"
|
||||
href="https://developer.paypal.com/dashboard/applications/live"
|
||||
|
||||
@@ -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 = topLevelRoutesExcludedFromOrgRewrite
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
});
|
||||
|
||||
/**
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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 future
|
||||
bookingToReschedule.attendees as unknown as PersonAttendeeCommonFields[],
|
||||
tAttendees
|
||||
),
|
||||
|
||||
@@ -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 future
|
||||
bookingToReschedule.attendees as unknown as PersonAttendeeCommonFields[],
|
||||
tAttendees
|
||||
),
|
||||
|
||||
@@ -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 layout
|
||||
It causes that space to keep on increasing as modal box is opened and closed repeatedly
|
||||
We set position:absolute to move it out of the regular flow of the grid layout
|
||||
*/
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 = [
|
||||
|
||||
@@ -417,7 +417,7 @@ export const AvailabilitySettings = forwardRef<AvailabilitySettingsFormRef, Avai
|
||||
isReady={!isLoading}
|
||||
disabled={disableEditableHeading}
|
||||
{...field}
|
||||
data-testid="availablity-title"
|
||||
data-testid="availability-title"
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
|
||||
@@ -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 compatibility
|
||||
location?: BookingInputLocation_2024_08_13 | string;
|
||||
|
||||
@ApiProperty({
|
||||
|
||||
@@ -129,7 +129,7 @@ export const requestRescheduleHandler = async ({ ctx, input, source }: RequestRe
|
||||
endTime: 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 future
|
||||
bookingToReschedule.attendees as unknown as PersonAttendeeCommonFields[],
|
||||
tAttendees
|
||||
),
|
||||
@@ -229,7 +229,7 @@ export const requestRescheduleHandler = async ({ ctx, input, source }: RequestRe
|
||||
endTime: 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 future
|
||||
bookingToReschedule.attendees as unknown as PersonAttendeeCommonFields[],
|
||||
tAttendees
|
||||
),
|
||||
|
||||
@@ -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 = (
|
||||
<Calendar
|
||||
initialFocus
|
||||
fromDate={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>
|
||||
|
||||
@@ -94,7 +94,7 @@ const DEFAULT_CHROMIUM: NonNullable<PlaywrightTestConfig["projects"]>[number]["u
|
||||
const 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-vars
|
||||
workers: process.env.PWDEBUG ? 1 : os.cpus().length,
|
||||
timeout: DEFAULT_TEST_TIMEOUT,
|
||||
|
||||
Reference in New Issue
Block a user