fix: typos in packages/features (#19220)
Found via `codespell -q 3 -S "*.svg,./apps/web/public/static/locales,./packages/app-store/stripepayment/lib/currencyOptions.ts,./packages/lib/freeEmailDomainCheck/freeEmailDomains.ts" -L afterall,atleast,datea,fo,incase,ist,nam,notin,optionel,perview,reccuring` Closes #19219
This commit is contained in:
1 parent
e6daed762b
commit
197a7ba6e9
48 files changed
+71
-71
No files matched your search
@@ -42,7 +42,7 @@ export async function getServerSession(options: {
|
||||
log.debug("Getting server session", safeStringify({ token }));
|
||||
|
||||
if (!token || !token.email || !token.sub) {
|
||||
log.debug("Couldnt get token");
|
||||
log.debug("Couldn't get token");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ const gridAreaClassNameMap: { [key in BookerAreas]: string } = {
|
||||
};
|
||||
|
||||
/**
|
||||
* Small helper compnent that renders a booker section in a specific grid area.
|
||||
* Small helper component that renders a booker section in a specific grid area.
|
||||
*/
|
||||
export const BookerSection = forwardRef<HTMLDivElement, BookerSectionProps>(function BookerSection(
|
||||
{ children, area, visible, className, ...props },
|
||||
|
||||
@@ -141,8 +141,8 @@ export const getBookerSizeClassNames = (
|
||||
"[--booker-timeslots-width:240px] lg:[--booker-timeslots-width:280px]",
|
||||
// Small calendar defaults
|
||||
layout === BookerLayouts.MONTH_VIEW && getBookerMetaClass("[--booker-meta-width:240px]"),
|
||||
// Meta column get's wider in booking view to fit the full date on a single row in case
|
||||
// of a multi occurance event. Also makes form less wide, which also looks better.
|
||||
// Meta column gets wider in booking view to fit the full date on a single row in case
|
||||
// of a multi occurence event. Also makes form less wide, which also looks better.
|
||||
layout === BookerLayouts.MONTH_VIEW &&
|
||||
bookerState === "booking" &&
|
||||
`[--booker-main-width:420px] ${getBookerMetaClass("lg:[--booker-meta-width:340px]")}`,
|
||||
|
||||
@@ -134,7 +134,7 @@ export type BookerStore = {
|
||||
initialize: (data: StoreInitializeType) => void;
|
||||
/**
|
||||
* Stored form state, used when user navigates back and
|
||||
* forth between timeslots and form. Get's cleared on submit
|
||||
* forth between timeslots and form. Gets cleared on submit
|
||||
* to prevent sticky data.
|
||||
*/
|
||||
formValues: Record<string, any>;
|
||||
|
||||
@@ -51,7 +51,7 @@ export const EventTypeFilter = () => {
|
||||
(item) => item?.team?.name || ""
|
||||
); // Add the team name
|
||||
const individualEvents = data.filter((el) => !el.team);
|
||||
// push indivdual events to the start of grouped array
|
||||
// push individual events to the start of grouped array
|
||||
return individualEvents.length > 0 ? { user_own_event_types: individualEvents, ...grouped } : grouped;
|
||||
}, [eventTypes.data]);
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ export const mapBookingToMutationInput = ({
|
||||
|
||||
// This method is here to ensure that the types are correct (recurring count is required),
|
||||
// as well as generate a unique ID for the recurring bookings and turn one single booking
|
||||
// into an array of mutiple bookings based on the recurring count.
|
||||
// into an array of multiple bookings based on the recurring count.
|
||||
// Other than that it forwards the mapping to mapBookingToMutationInput.
|
||||
export const mapRecurringBookingToMutationInput = (
|
||||
booking: BookingOptions,
|
||||
|
||||
@@ -315,7 +315,7 @@ export const ensureBookingInputsHaveSystemFields = ({
|
||||
|
||||
// Backward Compatibility for SMS Reminder Number
|
||||
// Note: We still need workflows in `getBookingFields` due to Backward Compatibility. If we do a one time entry for all event-types, we can remove workflows from `getBookingFields`
|
||||
// Also, note that even if Workflows don't explicity add smsReminderNumber field to bookingFields, it would be added as a side effect of this backward compatibility logic
|
||||
// Also, note that even if Workflows don't explicitly add smsReminderNumber field to bookingFields, it would be added as a side effect of this backward compatibility logic
|
||||
if (
|
||||
smsNumberSources.length &&
|
||||
!bookingFields.find((f) => getFieldIdentifier(f.name) !== getFieldIdentifier(SMS_REMINDER_NUMBER_FIELD))
|
||||
|
||||
@@ -717,7 +717,7 @@ describe("getBookingResponsesSchema", () => {
|
||||
});
|
||||
|
||||
describe("multiemail field type", () => {
|
||||
test("should succesfully parse a multiemail type field", async () => {
|
||||
test("should successfully parse a multiemail type field", async () => {
|
||||
const schema = getBookingResponsesSchema({
|
||||
bookingFields: [
|
||||
{
|
||||
@@ -794,7 +794,7 @@ describe("getBookingResponsesSchema", () => {
|
||||
);
|
||||
});
|
||||
|
||||
test("should succesfully parse a multiemail type field response, even when the value is just a string[Prefill needs it]", async () => {
|
||||
test("should successfully parse a multiemail type field response, even when the value is just a string[Prefill needs it]", async () => {
|
||||
const schema = getBookingResponsesSchema({
|
||||
bookingFields: [
|
||||
{
|
||||
@@ -833,7 +833,7 @@ describe("getBookingResponsesSchema", () => {
|
||||
});
|
||||
|
||||
describe("multiselect field type", () => {
|
||||
test("should succesfully parse a multiselect type field", async () => {
|
||||
test("should successfully parse a multiselect type field", async () => {
|
||||
const schema = getBookingResponsesSchema({
|
||||
bookingFields: [
|
||||
{
|
||||
@@ -870,7 +870,7 @@ describe("getBookingResponsesSchema", () => {
|
||||
testMultiselect: ["option1", "option-2"],
|
||||
});
|
||||
});
|
||||
test("should succesfully parse a multiselect type field", async () => {
|
||||
test("should successfully parse a multiselect type field", async () => {
|
||||
const schema = getBookingResponsesSchema({
|
||||
bookingFields: [
|
||||
{
|
||||
@@ -950,7 +950,7 @@ describe("getBookingResponsesSchema", () => {
|
||||
});
|
||||
|
||||
describe("multiselect field type", () => {
|
||||
test("should succesfully parse a multiselect type field", async () => {
|
||||
test("should successfully parse a multiselect type field", async () => {
|
||||
const schema = getBookingResponsesSchema({
|
||||
bookingFields: [
|
||||
{
|
||||
@@ -1321,7 +1321,7 @@ describe("excluded email/domain validation", () => {
|
||||
});
|
||||
|
||||
describe("require email/domain validation", () => {
|
||||
test("should fail if the requried email/domain is not present", async () => {
|
||||
test("should fail if the required email/domain is not present", async () => {
|
||||
const requiredEmails = "gmail.com, [email protected], @yahoo.com";
|
||||
const schema = getBookingResponsesSchema({
|
||||
bookingFields: [
|
||||
|
||||
@@ -22,7 +22,7 @@ export default function getLocationsOptionsForSelect(
|
||||
const translatedLocation = getTranslatedLocation(location, eventLocation, t);
|
||||
|
||||
return {
|
||||
// XYZ: is considered a namespace in i18next https://www.i18next.com/principles/namespaces and thus it get's cleaned up.
|
||||
// XYZ: is considered a namespace in i18next https://www.i18next.com/principles/namespaces and thus it gets cleaned up.
|
||||
label: translatedLocation || locationString,
|
||||
value: type,
|
||||
inputPlaceholder: t(eventLocation?.attendeeInputPlaceholder || ""),
|
||||
|
||||
@@ -701,7 +701,7 @@ async function handler(
|
||||
);
|
||||
// no more freeUsers after subtracting notAvailableLuckyUsers from luckyUsers :(
|
||||
if (freeUsers.length === 0) break;
|
||||
assertNonEmptyArray(freeUsers); // make sure TypeScript knows it too wih an assertion; the error will never be thrown.
|
||||
assertNonEmptyArray(freeUsers); // make sure TypeScript knows it too with an assertion; the error will never be thrown.
|
||||
// freeUsers is ensured
|
||||
|
||||
const userIdsSet = new Set(users.map((user) => user.id));
|
||||
@@ -976,7 +976,7 @@ async function handler(
|
||||
organizerEmail = eventType.secondaryEmail.email;
|
||||
}
|
||||
|
||||
//udpate cal event responses with latest location value , later used by webhook
|
||||
//update cal event responses with latest location value , later used by webhook
|
||||
if (reqBody.calEventResponses)
|
||||
reqBody.calEventResponses["location"].value = {
|
||||
value: platformBookingLocation ?? bookingLocation,
|
||||
|
||||
@@ -137,7 +137,7 @@ describe("handleNewBooking", () => {
|
||||
timeout
|
||||
);
|
||||
|
||||
describe("Availablity Check During Booking", () => {
|
||||
describe("Availability Check During Booking", () => {
|
||||
test(
|
||||
`should fail a booking if there is already a conflicting booking in the first user's selectedCalendars`,
|
||||
async () => {
|
||||
|
||||
+6
-6
@@ -60,7 +60,7 @@ describe("handleNewBooking", () => {
|
||||
describe("Collective Assignment", () => {
|
||||
describe("When there is no schedule set on eventType - Hosts schedules would be used", () => {
|
||||
test(
|
||||
`succesfully creates a booking when all the hosts are free as per their schedules
|
||||
`successfully creates a booking when all the hosts are free as per their schedules
|
||||
- Destination calendars for event-type and non-first hosts are used to create calendar events
|
||||
`,
|
||||
async ({ emails }) => {
|
||||
@@ -375,7 +375,7 @@ describe("handleNewBooking", () => {
|
||||
|
||||
describe("When there is a schedule set on eventType - Event Type common schedule would be used", () => {
|
||||
test(
|
||||
`succesfully creates a booking when the users are available as per the common schedule selected in the event-type
|
||||
`successfully creates a booking when the users are available as per the common schedule selected in the event-type
|
||||
- Destination calendars for event-type and non-first hosts are used to create calendar events
|
||||
`,
|
||||
async ({ emails }) => {
|
||||
@@ -551,7 +551,7 @@ describe("handleNewBooking", () => {
|
||||
timeout
|
||||
);
|
||||
test(
|
||||
`[Event Type with both Attendee Phone number and Email as required fields] succesfully creates a booking when the users are available as per the common schedule selected in the event-type
|
||||
`[Event Type with both Attendee Phone number and Email as required fields] successfully creates a booking when the users are available as per the common schedule selected in the event-type
|
||||
- Destination calendars for event-type and non-first hosts are used to create calendar events
|
||||
`,
|
||||
async ({ emails, sms }) => {
|
||||
@@ -788,7 +788,7 @@ describe("handleNewBooking", () => {
|
||||
);
|
||||
|
||||
test(
|
||||
`[Event Type with only Attendee Phone number as required field and Email as hidden field] succesfully creates a booking when the users are available as per the common schedule selected in the event-type
|
||||
`[Event Type with only Attendee Phone number as required field and Email as hidden field] successfully creates a booking when the users are available as per the common schedule selected in the event-type
|
||||
- Destination calendars for event-type and non-first hosts are used to create calendar events
|
||||
`,
|
||||
async ({ emails, sms }) => {
|
||||
@@ -1029,7 +1029,7 @@ describe("handleNewBooking", () => {
|
||||
timeout
|
||||
);
|
||||
test(
|
||||
`[Event Type that requires confirmation with only Attendee Phone number as required field and Email as optional field] succesfully creates a booking when the users are available as per the common schedule selected in the event-type
|
||||
`[Event Type that requires confirmation with only Attendee Phone number as required field and Email as optional field] successfully creates a booking when the users are available as per the common schedule selected in the event-type
|
||||
- Destination calendars for event-type and non-first hosts are used to create calendar events
|
||||
`,
|
||||
async ({ emails, sms }) => {
|
||||
@@ -1931,7 +1931,7 @@ describe("handleNewBooking", () => {
|
||||
|
||||
describe("Team(T1) not part of any org but the organizer is part of an organization(O1)", () => {
|
||||
test(
|
||||
`succesfully creates a booking when all the hosts are free as per their schedules
|
||||
`successfully creates a booking when all the hosts are free as per their schedules
|
||||
- Destination calendars for event-type and non-first hosts are used to create calendar events
|
||||
- Reschedule and Cancel link in email are not of the org domain because the team is not part of any org
|
||||
`,
|
||||
|
||||
@@ -2438,7 +2438,7 @@ describe("handleSeats", () => {
|
||||
const firstBookingEndTime = `${plus1DateString}T04:30:00Z`;
|
||||
|
||||
const { dateString: plus2DateString } = getDate({ dateIncrement: 2 });
|
||||
// Non-available time slot choosen (7:30PM - 8:00PM IST) while rescheduling
|
||||
// Non-available time slot chosen (7:30PM - 8:00PM IST) while rescheduling
|
||||
const secondBookingStartTime = `${plus2DateString}T14:00:00Z`;
|
||||
const secondBookingEndTime = `${plus2DateString}T14:30:00Z`;
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ export enum EventDetailBlocks {
|
||||
DURATION,
|
||||
LOCATION,
|
||||
REQUIRES_CONFIRMATION,
|
||||
// Includes input to select # of occurences.
|
||||
// Includes input to select # of occurrences.
|
||||
OCCURENCES,
|
||||
PRICE,
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ const handleCalendarsToWatch = async () => {
|
||||
return result;
|
||||
};
|
||||
|
||||
// This cron is used to activate and renew calendar subcriptions
|
||||
// This cron is used to activate and renew calendar subscriptions
|
||||
const handler = defaultResponder(async (request: NextApiRequest) => {
|
||||
validateRequest(request);
|
||||
await Promise.allSettled([handleCalendarsToWatch(), handleCalendarsToUnwatch()]);
|
||||
|
||||
@@ -17,7 +17,7 @@ import { Calendar } from "./Calendar";
|
||||
|
||||
## Props
|
||||
|
||||
The Args Table below shows you a breakdown of what props can be passed into the Calendar component. All props should have a desciption to make it self explanitory to see what is going on.
|
||||
The Args Table below shows you a breakdown of what props can be passed into the Calendar component. All props should have a description to make it self explanatory to see what is going on.
|
||||
|
||||
<CustomArgsTable of="calendar" />
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ export function CurrentTime() {
|
||||
if (!currentTimeRef.current || scrolledIntoView) return;
|
||||
// Within a small timeout so element has time to render.
|
||||
setTimeout(() => {
|
||||
// eslint-disable-next-line @calcom/eslint/no-scroll-into-view-embed -- Does't seem to cause any issue. Put it under condition if needed
|
||||
// eslint-disable-next-line @calcom/eslint/no-scroll-into-view-embed -- Doesn't seem to cause any issue. Put it under condition if needed
|
||||
currentTimeRef?.current?.scrollIntoView({ block: "center" });
|
||||
setScrolledIntoView(true);
|
||||
}, 100);
|
||||
|
||||
@@ -87,7 +87,7 @@ export type CalendarState = {
|
||||
loading?: boolean;
|
||||
/** Disables all actions on Events*/
|
||||
eventsDisabled?: boolean;
|
||||
/** If you don't want the date to be scrollable past a certian date */
|
||||
/** If you don't want the date to be scrollable past a certain date */
|
||||
minDate?: Date;
|
||||
/** If you don't want the date to be scrollable past a certain date */
|
||||
maxDate?: Date;
|
||||
|
||||
@@ -19,7 +19,7 @@ export const cityTimezonesHandler = async () => {
|
||||
}
|
||||
});
|
||||
const uniqueCities = Object.values(topPopulatedCities);
|
||||
/** Add specific overries in here */
|
||||
/** Add specific overrides in here */
|
||||
uniqueCities.forEach((city) => {
|
||||
if (city.city === "London") city.timezone = "Europe/London";
|
||||
if (city.city === "Londonderry") city.city = "London";
|
||||
|
||||
@@ -58,6 +58,6 @@ export const stripeWebhookHandler = (handlers: SWHandlers) => async (req: NextAp
|
||||
const handler = (await handlerGetter())?.default;
|
||||
// auto catch unsupported Stripe events.
|
||||
if (!handler) throw new HttpCode(202, `Unhandled Stripe Webhook event type ${event.type}`);
|
||||
// @ts-expect-error - we know the handler is defined and accpets the data type
|
||||
// @ts-expect-error - we know the handler is defined and accepts the data type
|
||||
return await handler(event.data);
|
||||
};
|
||||
@@ -13,7 +13,7 @@ export class TeamBilling {
|
||||
if (IS_TEAM_BILLING_ENABLED) return new InternalTeamBilling(team);
|
||||
return new StubTeamBilling(team);
|
||||
}
|
||||
/** Initialize multuple team billings at once for bulk operations */
|
||||
/** Initialize multiple team billings at once for bulk operations */
|
||||
static initMany(teams: TeamBillingInput[]) {
|
||||
return teams.map((team) => TeamBilling.init(team));
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ export const DEFAULT_PROMPT_VALUE = `## You are helping user set up a call with
|
||||
## Task Steps
|
||||
1. I am here to learn more about your issue and help schedule an appointment with our support team.
|
||||
2. If {{email}} is not unknown then Use name {{name}} and email {{email}} for creating booking else Ask for user name and email and Confirm the name and email with user by reading it back to user.
|
||||
3. Ask user for \"When would you want to meet with one of our representive\".
|
||||
3. Ask user for \"When would you want to meet with one of our representatives\".
|
||||
4. Call function check_availability to check for availability in the user provided time range.
|
||||
- if availability exists, inform user about the availability range (do not repeat the detailed available slot) and ask user to choose from it. Make sure user chose a slot within detailed available slot.
|
||||
- if availability does not exist, ask user to select another time range for the appointment, repeat this step 3.
|
||||
|
||||
@@ -216,7 +216,7 @@ async function isReturningToSelf({ session, creds }: { session: Session | null;
|
||||
if (returningUser) {
|
||||
// Skip for none org users
|
||||
const inOrg =
|
||||
returningUser.organizationId || // Keep for backwards compatability
|
||||
returningUser.organizationId || // Keep for backwards compatibility
|
||||
returningUser.profiles.some((profile) => profile.organizationId !== undefined); // New way of seeing if the user has a profile in orgs.
|
||||
if (returningUser.role !== "ADMIN" && !inOrg) return;
|
||||
|
||||
|
||||
@@ -288,7 +288,7 @@ const CreateANewOrganizationFormChild = ({
|
||||
</>
|
||||
)}
|
||||
|
||||
{/* This radio group does nothing - its just for visuall purposes */}
|
||||
{/* This radio group does nothing - its just for visual purposes */}
|
||||
{!isAdmin && (
|
||||
<>
|
||||
<div className="bg-subtle space-y-5 rounded-lg p-5">
|
||||
|
||||
@@ -7,7 +7,7 @@ import type { teamMetadataSchema } from "@calcom/prisma/zod-utils";
|
||||
/**
|
||||
* Organization branding
|
||||
*
|
||||
* Entries consist of the different properties that constitues a brand for an organization.
|
||||
* Entries consist of the different properties that constitute a brand for an organization.
|
||||
*/
|
||||
export type OrganizationBranding =
|
||||
| ({
|
||||
|
||||
@@ -15,7 +15,7 @@ type Attendee = {
|
||||
noShow: boolean | null;
|
||||
};
|
||||
|
||||
// TODO: We have far too many differnt types here. Theyre all users or hosts at the end of the day.
|
||||
// TODO: We have far too many different types here. They're all users or hosts at the end of the day.
|
||||
type OrganizerType =
|
||||
| getEventTypeResponse["hosts"][number]["user"]
|
||||
| IsFixedAwareUser
|
||||
|
||||
@@ -234,7 +234,7 @@ export default function MemberInvitationModal(props: MemberInvitationModalProps)
|
||||
|
||||
<Form form={newMemberFormMethods} handleSubmit={(values) => props.onSubmit(values, resetFields)}>
|
||||
<div className="mb-10 mt-6 space-y-6">
|
||||
{/* Indivdual Invite */}
|
||||
{/* Individual Invite */}
|
||||
{modalImportMode === "INDIVIDUAL" && (
|
||||
<Controller
|
||||
name="emailOrUsername"
|
||||
|
||||
@@ -42,9 +42,9 @@ function UsersTableBare() {
|
||||
const mutation = trpc.viewer.users.delete.useMutation({
|
||||
onSuccess: async () => {
|
||||
showToast("User has been deleted", "success");
|
||||
// Lets not invalidated the whole cache, just remove the user from the cache.
|
||||
// usefull cause in prod this will be fetching 100k+ users
|
||||
// FIXME: Tested locally and it doesnt't work, need to investigate
|
||||
// Lets not invalidate the whole cache, just remove the user from the cache.
|
||||
// Useful cause in prod this will be fetching 100k+ users
|
||||
// FIXME: Tested locally and it doesn't work, need to investigate
|
||||
utils.viewer.admin.listPaginated.setInfiniteData({ limit: FETCH_LIMIT }, (cachedData) => {
|
||||
if (!cachedData) {
|
||||
return {
|
||||
|
||||
@@ -33,7 +33,7 @@ const smsReminderTemplate = (
|
||||
name ? ` ${name}` : ``
|
||||
}, this is a reminder that your meeting (${eventName}) with ${attendee} is on ${eventDate} at ${startTime} ${timeZone}.`;
|
||||
|
||||
//Twilio recomments message to be no longer than 320 characters
|
||||
//Twilio recommends message to be no longer than 320 characters
|
||||
if (templateOne.length <= 320) return templateOne;
|
||||
|
||||
const templateTwo = `Hi, this is a reminder that your meeting with ${attendee} is on ${eventDate} at ${startTime} ${timeZone}`;
|
||||
|
||||
@@ -326,7 +326,7 @@ describe("deleteRemindersOfActiveOnIds", () => {
|
||||
let removedActiveOnIds = [1];
|
||||
const activeOnIds = [2];
|
||||
|
||||
//workflow removed from team 2, but still acitve on team 3 --> so reminder should not be removed
|
||||
//workflow removed from team 2, but still active on team 3 --> so reminder should not be removed
|
||||
await deleteRemindersOfActiveOnIds({
|
||||
removedActiveOnIds,
|
||||
workflowSteps: workflow?.steps || [],
|
||||
@@ -613,7 +613,7 @@ describe("scheduleBookingReminders", () => {
|
||||
null //teamId
|
||||
);
|
||||
|
||||
// two sms schould be scheduled
|
||||
// two sms should be scheduled
|
||||
expectSMSWorkflowToBeTriggered({
|
||||
sms,
|
||||
toNumber: "000",
|
||||
|
||||
@@ -74,7 +74,7 @@ export const CheckedTeamSelect = ({
|
||||
className={customClassNames?.hostsSelect?.select}
|
||||
innerClassNames={customClassNames?.hostsSelect?.innerClassNames}
|
||||
/>
|
||||
{/* This class name conditional looks a bit odd but it allows a seemless transition when using autoanimate
|
||||
{/* This class name conditional looks a bit odd but it allows a seamless transition when using autoanimate
|
||||
- Slides down from the top instead of just teleporting in from nowhere*/}
|
||||
<ul
|
||||
className={classNames(
|
||||
|
||||
@@ -75,7 +75,7 @@ export const ChildrenEventTypeSelect = ({
|
||||
isMulti
|
||||
{...props}
|
||||
/>
|
||||
{/* This class name conditional looks a bit odd but it allows a seemless transition when using autoanimate
|
||||
{/* This class name conditional looks a bit odd but it allows a seamless transition when using autoanimate
|
||||
- Slides down from the top instead of just teleporting in from nowhere*/}
|
||||
<ul
|
||||
className={classNames(
|
||||
|
||||
@@ -146,7 +146,7 @@ function EventTypeSingleLayout({
|
||||
<ButtonGroup combined containerProps={{ className: "border-default hidden lg:flex" }}>
|
||||
{!isManagedEventType && (
|
||||
<>
|
||||
{/* We have to warp this in tooltip as it has a href which disabels the tooltip on buttons */}
|
||||
{/* We have to warp this in tooltip as it has a href which disables the tooltip on buttons */}
|
||||
{!isPlatform && (
|
||||
<Tooltip content={t("preview")} side="bottom" sideOffset={4}>
|
||||
<Button
|
||||
|
||||
@@ -235,7 +235,7 @@ export const getPublicEvent = async (
|
||||
const defaultEvent = getDefaultEvent(eventSlug);
|
||||
let locations = defaultEvent.locations ? (defaultEvent.locations as LocationObject[]) : [];
|
||||
|
||||
// Get the prefered location type from the first user
|
||||
// Get the preferred location type from the first user
|
||||
const firstUsersMetadata = userMetadataSchema.parse(users[0].metadata || {});
|
||||
const preferedLocationType = firstUsersMetadata?.defaultConferencingApp;
|
||||
|
||||
@@ -243,7 +243,7 @@ export const getPublicEvent = async (
|
||||
const foundApp = getAppFromSlug(preferedLocationType.appSlug);
|
||||
const appType = foundApp?.appData?.location?.type;
|
||||
if (appType) {
|
||||
// Replace the location with the prefered location type
|
||||
// Replace the location with the preferred location type
|
||||
// This will still be default to daily if the app is not found
|
||||
locations = [{ type: appType, link: preferedLocationType.appLink }] as LocationObject[];
|
||||
}
|
||||
|
||||
@@ -546,4 +546,4 @@ export const Components: Record<FieldType, Component> = {
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
// Should use `statisfies` to check if the `type` is from supported types. But satisfies doesn't work with Next.js config
|
||||
// Should use `satisfies` to check if the `type` is from supported types. But satisfies doesn't work with Next.js config
|
||||
@@ -770,7 +770,7 @@ function VariantFields({
|
||||
const fieldTypeConfigVariantsConfig = fieldTypesConfigMap[fieldForm.getValues("type")]?.variantsConfig;
|
||||
|
||||
if (!fieldTypeConfigVariantsConfig) {
|
||||
throw new Error("Coniguration Issue: FieldType doesn't have `variantsConfig`");
|
||||
throw new Error("Configuration Issue: FieldType doesn't have `variantsConfig`");
|
||||
}
|
||||
|
||||
const variantToggleLabel = t(fieldTypeConfigVariantsConfig.toggleLabel || "");
|
||||
|
||||
@@ -30,7 +30,7 @@ function getTranslatedConfigVariants(configVariants: ConfigVariants, translate:
|
||||
}
|
||||
|
||||
/**
|
||||
* Get's the field's variantsConfig and if not available, then it will get the default variantsConfig from the fieldTypesConfigMap
|
||||
* Gets the field's variantsConfig and if not available, then it will get the default variantsConfig from the fieldTypesConfigMap
|
||||
*/
|
||||
export const getConfig = (field: Pick<Field, "variantsConfig" | "type">) => {
|
||||
const fieldVariantsConfig = field.variantsConfig;
|
||||
|
||||
@@ -17,7 +17,7 @@ export const InputComponent = <Option, IsMulti extends boolean, Group extends Gr
|
||||
}: InputProps<Option, IsMulti, Group>) => {
|
||||
return (
|
||||
<components.Input
|
||||
// disables our default form focus hightlight on the react-select input element
|
||||
// disables our default form focus highlight on the react-select input element
|
||||
inputClassName={classNames("focus:ring-0 focus:ring-offset-0", inputClassName)}
|
||||
{...props}
|
||||
/>
|
||||
|
||||
@@ -493,12 +493,12 @@ class RoutingEventsInsights {
|
||||
|
||||
const teamConditions = [];
|
||||
|
||||
// @ts-expect-error it doest exist but TS isnt smart enough when its unmber or int filter
|
||||
// @ts-expect-error it doesn't exist but TS isn't smart enough when it's a number or int filter
|
||||
if (formsWhereCondition.teamId?.in) {
|
||||
// @ts-expect-error it doest exist but TS isnt smart enough when its unmber or int filter
|
||||
// @ts-expect-error it doesn't exist but TS isn't smart enough when it's a number or int filter
|
||||
teamConditions.push(`f."teamId" IN (${formsWhereCondition.teamId.in.join(",")})`);
|
||||
}
|
||||
// @ts-expect-error it doest exist but TS isnt smart enough when its unmber or int filter
|
||||
// @ts-expect-error it doesn't exist but TS isn't smart enough when it's a number or int filter
|
||||
if (!formsWhereCondition.teamId?.in && userId) {
|
||||
teamConditions.push(`f."userId" = ${userId}`);
|
||||
}
|
||||
@@ -510,7 +510,7 @@ class RoutingEventsInsights {
|
||||
? Prisma.sql`AND ${Prisma.raw(teamConditions.join(" AND "))}`
|
||||
: Prisma.sql``;
|
||||
|
||||
// If youre at this point wondering what this does. This groups the responses by form and field and counts the number of responses for each option that don't have a booking.
|
||||
// If you're at this point wondering what this does. This groups the responses by form and field and counts the number of responses for each option that don't have a booking.
|
||||
const result = await prisma.$queryRaw<
|
||||
{
|
||||
formId: string;
|
||||
@@ -717,12 +717,12 @@ class RoutingEventsInsights {
|
||||
|
||||
const teamConditions = [];
|
||||
|
||||
// @ts-expect-error it does exist but TS isn't smart enough when it's number or int filter
|
||||
// @ts-expect-error it does exist but TS isn't smart enough when it's a number or int filter
|
||||
if (formsWhereCondition.teamId?.in) {
|
||||
// @ts-expect-error same as above
|
||||
teamConditions.push(`f."teamId" IN (${formsWhereCondition.teamId.in.join(",")})`);
|
||||
}
|
||||
// @ts-expect-error it does exist but TS isn't smart enough when it's number or int filter
|
||||
// @ts-expect-error it does exist but TS isn't smart enough when it's a number or int filter
|
||||
if (!formsWhereCondition.teamId?.in && userId) {
|
||||
teamConditions.push(`f."userId" = ${userId}`);
|
||||
}
|
||||
@@ -972,12 +972,12 @@ class RoutingEventsInsights {
|
||||
|
||||
const teamConditions = [];
|
||||
|
||||
// @ts-expect-error it does exist but TS isn't smart enough when it's number or int filter
|
||||
// @ts-expect-error it does exist but TS isn't smart enough when it's a number or int filter
|
||||
if (formsWhereCondition.teamId?.in) {
|
||||
// @ts-expect-error same as above
|
||||
teamConditions.push(`f."teamId" IN (${formsWhereCondition.teamId.in.join(",")})`);
|
||||
}
|
||||
// @ts-expect-error it does exist but TS isn't smart enough when it's number or int filter
|
||||
// @ts-expect-error it does exist but TS isn't smart enough when it's a number or int filter
|
||||
if (!formsWhereCondition.teamId?.in && userId) {
|
||||
teamConditions.push(`f."userId" = ${userId}`);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ import { useMemo } from "react";
|
||||
import type { Slots } from "./types";
|
||||
|
||||
/**
|
||||
* Get's slots for a specific date from the schedule cache.
|
||||
* Gets slots for a specific date from the schedule cache.
|
||||
* @param date Format YYYY-MM-DD
|
||||
* @param scheduleCache Instance of useScheduleWithCache
|
||||
*/
|
||||
|
||||
@@ -35,7 +35,7 @@ export const OutOfOfficeEntriesList = () => {
|
||||
useFormState;
|
||||
},
|
||||
onError: () => {
|
||||
showToast(`An error ocurred`, "error");
|
||||
showToast(`An error occurred`, "error");
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ export function SideBar({ bannersHeight, user }: SideBarProps) {
|
||||
onClick: (e: { preventDefault: () => void }) => {
|
||||
e.preventDefault();
|
||||
setIsReferalLoading(true);
|
||||
// Create an artificial delay to show the loading state so it doesnt flicker if this request is fast
|
||||
// Create an artificial delay to show the loading state so it doesn't flicker if this request is fast
|
||||
setTimeout(() => {
|
||||
fetchAndCopyToClipboard(
|
||||
fetch("/api/generate-referral-link", {
|
||||
|
||||
@@ -4,7 +4,7 @@ import tasksMap from "./tasks";
|
||||
|
||||
/**
|
||||
* This is the default internal Tasker that uses the Task repository to create tasks.
|
||||
* It doens't have any external dependencies and is suitable for most use cases.
|
||||
* It doesn't have any external dependencies and is suitable for most use cases.
|
||||
* To use a different Tasker, you can create a new class that implements the Tasker interface.
|
||||
* Then, you can use the TaskerFactory to select the new Tasker.
|
||||
*/
|
||||
|
||||
@@ -140,7 +140,7 @@ export function HoverOverview() {
|
||||
);
|
||||
|
||||
return (
|
||||
<div ref={el} className="absoulte inset-0 w-full">
|
||||
<div ref={el} className="absolute inset-0 w-full">
|
||||
<div className="bg-default/80 absolute" style={leftWhiteout} />
|
||||
<div className="bg-default/80 absolute" style={rightWhiteout} />
|
||||
<div className="border-emphasis border border-dashed" style={position} />
|
||||
|
||||
@@ -32,7 +32,7 @@ type TimezoneBuddyState = TimezoneBuddyProps & {
|
||||
export type TimezoneBuddyStore = ReturnType<typeof createTimezoneBuddyStore>;
|
||||
|
||||
/**
|
||||
* Differnt type of zustand store compared to what we are used to
|
||||
* Different type of zustand store compared to what we are used to
|
||||
* This is a function that returns a store instead of a hook. This allows us to properly set the initial state of the store
|
||||
* from the props passed in to the component.
|
||||
*/
|
||||
|
||||
@@ -42,7 +42,7 @@ export function TeamListBulkAction({ table }: Props) {
|
||||
"success"
|
||||
);
|
||||
// Optimistically update the data from query trpc cache listMembers
|
||||
// We may need to set this data instread of invalidating. Will see how performance handles it
|
||||
// We may need to set this data instead of invalidating. Will see how performance handles it
|
||||
utils.viewer.organizations.listMembers.invalidate();
|
||||
|
||||
// Clear the selected values
|
||||
|
||||
@@ -57,7 +57,7 @@ export function DeleteMemberModal({
|
||||
title={t("remove_member")}
|
||||
confirmBtnText={t("confirm_remove_member")}
|
||||
onConfirm={() => {
|
||||
// Shouldnt ever happen just for type safety
|
||||
// Shouldn't ever happen just for type safety
|
||||
if (!session?.user.org?.id || !state?.deleteMember?.user?.id) return;
|
||||
|
||||
removeMemberMutation.mutate({
|
||||
|
||||
@@ -159,7 +159,7 @@ export function EditForm({
|
||||
avatar: values.avatar,
|
||||
bio: values.bio,
|
||||
timeZone: values.timeZone,
|
||||
// @ts-expect-error theyre there in local types but for some reason it errors?
|
||||
// @ts-expect-error they're there in local types but for some reason it errors?
|
||||
attributeOptions: values.attributes
|
||||
? // @ts-expect-error same as above
|
||||
{ userId: selectedUser?.id ?? "", attributes: values.attributes }
|
||||
|
||||
Reference in new issue
Block a user