Skip to content

Commit

Permalink
chore: reorganize event type files (#16393)
Browse files Browse the repository at this point in the history
* chore: reorganize event type files

* fixup! chore: reorganize event type files

* fixup! Merge branch 'main' into refactor-event-types-components-folder
  • Loading branch information
ThyMinimalDev authored Aug 30, 2024
1 parent f346277 commit 40fee7a
Show file tree
Hide file tree
Showing 43 changed files with 1,047 additions and 962 deletions.
3 changes: 1 addition & 2 deletions apps/web/components/apps/installation/ConfigureStepCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { useForm } from "react-hook-form";
import { z } from "zod";

import type { LocationObject } from "@calcom/core/location";
import { locationsResolver } from "@calcom/lib/event-types/utils/locationsResolver";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import type { AppCategories } from "@calcom/prisma/enums";
import type { EventTypeMetaDataSchema, eventTypeBookingFields } from "@calcom/prisma/zod-utils";
Expand All @@ -17,8 +18,6 @@ import { Button, Form, Icon } from "@calcom/ui";
import EventTypeAppSettingsWrapper from "@components/apps/installation/EventTypeAppSettingsWrapper";
import EventTypeConferencingAppSettings from "@components/apps/installation/EventTypeConferencingAppSettings";

import { locationsResolver } from "~/event-types/views/event-types-single-view";

export type TFormType = {
id: number;
metadata: z.infer<typeof EventTypeMetaDataSchema>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import { useEffect, type FC } from "react";

import { EventTypeAppSettings } from "@calcom/app-store/_components/EventTypeAppSettingsInterface";
import type { EventTypeAppsList } from "@calcom/app-store/utils";

import useAppsData from "@lib/hooks/useAppsData";
import useAppsData from "@calcom/lib/hooks/useAppsData";

import type { ConfigureStepCardProps } from "@components/apps/installation/ConfigureStepCard";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ import { useMemo } from "react";
import { useFormContext } from "react-hook-form";
import type { UseFormGetValues, UseFormSetValue, Control, FormState } from "react-hook-form";

import type { TLocationOptions } from "@calcom/features/eventtypes/components/Locations";
import type { TEventTypeLocation } from "@calcom/features/eventtypes/components/Locations";
import Locations from "@calcom/features/eventtypes/components/Locations";
import type { LocationFormValues } from "@calcom/features/eventtypes/lib/types";
import type { SingleValueLocationOption } from "@calcom/features/form/components/LocationSelect";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { SchedulingType } from "@calcom/prisma/client";
import { trpc } from "@calcom/trpc/react";
Expand All @@ -13,10 +17,6 @@ import { Skeleton, Label } from "@calcom/ui";
import { QueryCell } from "@lib/QueryCell";

import type { TFormType } from "@components/apps/installation/ConfigureStepCard";
import type { TLocationOptions } from "@components/eventtype/Locations";
import type { TEventTypeLocation } from "@components/eventtype/Locations";
import Locations from "@components/eventtype/Locations";
import type { SingleValueLocationOption } from "@components/ui/form/LocationSelect";

const LocationsWrapper = ({
eventType,
Expand Down
7 changes: 3 additions & 4 deletions apps/web/components/dialog/EditLocationDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,16 @@ import {
LocationType,
OrganizerDefaultConferencingAppType,
} from "@calcom/app-store/locations";
import CheckboxField from "@calcom/features/form/components/CheckboxField";
import type { LocationOption } from "@calcom/features/form/components/LocationSelect";
import LocationSelect from "@calcom/features/form/components/LocationSelect";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import type { RouterOutputs } from "@calcom/trpc/react";
import { trpc } from "@calcom/trpc/react";
import { Button, Icon, Input, Dialog, DialogContent, DialogFooter, Form, PhoneInput } from "@calcom/ui";

import { QueryCell } from "@lib/QueryCell";

import CheckboxField from "@components/ui/form/CheckboxField";
import type { LocationOption } from "@components/ui/form/LocationSelect";
import LocationSelect from "@components/ui/form/LocationSelect";

type BookingItem = RouterOutputs["viewer"]["bookings"]["get"]["bookings"][number];

interface ISetLocationDialog {
Expand Down
1 change: 0 additions & 1 deletion apps/web/components/eventtype/EventWorkfowsTab.tsx

This file was deleted.

3 changes: 1 addition & 2 deletions apps/web/components/ui/form/CheckedSelect.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import React from "react";
import type { Props } from "react-select";

import Select from "@calcom/features/form/components/Select";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { Avatar } from "@calcom/ui";
import { Icon } from "@calcom/ui";

import Select from "@components/ui/form/Select";

type CheckedSelectOption = {
avatar: string;
label: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ import { EventTypeEmbedButton, EventTypeEmbedDialog } from "@calcom/features/emb
import { EventTypeDescription } from "@calcom/features/eventtypes/components";
import CreateEventTypeDialog from "@calcom/features/eventtypes/components/CreateEventTypeDialog";
import { DuplicateDialog } from "@calcom/features/eventtypes/components/DuplicateDialog";
import SkeletonLoader, {
InfiniteSkeletonLoader,
} from "@calcom/features/eventtypes/components/SkeletonLoader";
import { TeamsFilter } from "@calcom/features/filters/components/TeamsFilter";
import { getTeamsFiltersFromQuery } from "@calcom/features/filters/lib/getTeamsFiltersFromQuery";
import Shell from "@calcom/features/shell/Shell";
Expand Down Expand Up @@ -66,8 +69,6 @@ import type { AppProps } from "@lib/app-providers";
import { useInViewObserver } from "@lib/hooks/useInViewObserver";
import useMeQuery from "@lib/hooks/useMeQuery";

import SkeletonLoader, { InfiniteSkeletonLoader } from "@components/eventtype/SkeletonLoader";

type GetUserEventGroupsResponse = RouterOutputs["viewer"]["eventTypes"]["getUserEventGroups"];
type GetEventTypesFromGroupsResponse = RouterOutputs["viewer"]["eventTypes"]["getEventTypesFromGroup"];

Expand Down
Loading

0 comments on commit 40fee7a

Please sign in to comment.