chore: rename calendar settings atom (#16329)
* update stripe service * init endpoints for stripe connect atom * update stripe controller * update stripe service * add generic function to create app credential * update stripe controller * update stripe service * add handler to construct redirectUrl * restructure files for better readibility * better naming * replace STRIPE_PRIVATE_KEY with STRIPE_API_KEY * fix naming * remove unused query param * frontend for stripe connect atom * custom hooks for stripe connect atom * abstract response schema into separate file * fixup * input dto for stripe controller * update stripe module * fixing naming * fix naming * rename atom from `SelectedCalendarSettings` to `SelectedCalendarsSettings` * revert stripe controllers commit * fixup * bring back stripe module * remove stripe atom --------- Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>
This commit is contained in:
1 parent
fd50728169
commit
c67877cc51
9 files changed
+21
-21
No files matched your search
@@ -2,7 +2,7 @@ import { Fragment, useEffect } from "react";
|
||||
|
||||
import { InstallAppButton } from "@calcom/app-store/components";
|
||||
import {
|
||||
SelectedCalendarSettingsWebWrapper,
|
||||
SelectedCalendarsSettingsWebWrapper,
|
||||
DestinationCalendarSettingsWebWrapper,
|
||||
} from "@calcom/atoms/monorepo";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
@@ -107,7 +107,7 @@ export function CalendarListContainer(props: { heading?: boolean; fromOnboarding
|
||||
{heading && (
|
||||
<>
|
||||
<DestinationCalendarSettingsWebWrapper />
|
||||
<SelectedCalendarSettingsWebWrapper
|
||||
<SelectedCalendarsSettingsWebWrapper
|
||||
onChanged={onChanged}
|
||||
fromOnboarding={fromOnboarding}
|
||||
destinationCalendarId={data.destinationCalendar?.externalId}
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
import { DestinationCalendarSettingsPlatformWrapper } from "../../destination-calendar/index";
|
||||
import { SelectedCalendarSettingsPlatformWrapper } from "../../selected-calendar/index";
|
||||
import { SelectedCalendarsSettingsPlatformWrapper } from "../../selected-calendars/index";
|
||||
|
||||
type CalendarSettingsPlatformWrapperProps = {
|
||||
classNames?: {
|
||||
@@ -16,7 +16,7 @@ export const CalendarSettingsPlatformWrapper = ({ classNames }: CalendarSettings
|
||||
statusLoader={<></>}
|
||||
classNames={classNames?.destinationCalendarSettingsCustomClassnames}
|
||||
/>
|
||||
<SelectedCalendarSettingsPlatformWrapper
|
||||
<SelectedCalendarsSettingsPlatformWrapper
|
||||
classNames={classNames?.selectedCalendarSettingsCustomClassnames}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -20,6 +20,6 @@ export { useDeleteCalendarCredentials } from "./hooks/calendars/useDeleteCalenda
|
||||
export { useAddSelectedCalendar } from "./hooks/calendars/useAddSelectedCalendar";
|
||||
export { useRemoveSelectedCalendar } from "./hooks/calendars/useRemoveSelectedCalendar";
|
||||
export { useTeams } from "./hooks/teams/useTeams";
|
||||
export { SelectedCalendarSettingsPlatformWrapper as SelectedCalendarSettings } from "./selected-calendar/index";
|
||||
export { SelectedCalendarsSettingsPlatformWrapper as SelectedCalendarsSettings } from "./selected-calendars/index";
|
||||
export { DestinationCalendarSettingsPlatformWrapper as DestinationCalendarSettings } from "./destination-calendar/index";
|
||||
export { CalendarSettingsPlatformWrapper as CalendarSettings } from "./calendar-settings/index";
|
||||
@@ -7,5 +7,5 @@ export { useEventTypeById } from "./hooks/event-types/private/useEventTypeById";
|
||||
export { useHandleBookEvent } from "./hooks/useHandleBookEvent";
|
||||
export * as Dialog from "./src/components/ui/dialog";
|
||||
export { Timezone } from "./timezone";
|
||||
export { SelectedCalendarSettingsWebWrapper } from "./selected-calendar/wrappers/SelectedCalendarSettingsWebWrapper";
|
||||
export { SelectedCalendarsSettingsWebWrapper } from "./selected-calendars/wrappers/SelectedCalendarsSettingsWebWrapper";
|
||||
export { DestinationCalendarSettingsWebWrapper } from "./destination-calendar/wrappers/DestinationCalendarSettingsWebWrapper";
|
||||
@@ -1 +0,0 @@
|
||||
export { SelectedCalendarSettingsPlatformWrapper } from "./wrappers/SelectedCalendarSettingsPlatformWrapper";
|
||||
+1
-1
@@ -2,6 +2,6 @@ import type { ReactNode } from "react";
|
||||
|
||||
import { cn } from "../src/lib/utils";
|
||||
|
||||
export const SelectedCalendarSettings = (props: { children: ReactNode; classNames?: string }) => {
|
||||
export const SelectedCalendarsSettings = (props: { children: ReactNode; classNames?: string }) => {
|
||||
return <div className={cn("border-subtle mt-6 rounded-lg border", props.classNames)}>{props.children}</div>;
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
export { SelectedCalendarsSettingsPlatformWrapper } from "./wrappers/SelectedCalendarsSettingsPlatformWrapper";
|
||||
+6
-6
@@ -20,9 +20,9 @@ import { useConnectedCalendars } from "../../hooks/useConnectedCalendars";
|
||||
import { AtomsWrapper } from "../../src/components/atoms-wrapper";
|
||||
import { Switch } from "../../src/components/ui/switch";
|
||||
import { useToast } from "../../src/components/ui/use-toast";
|
||||
import { SelectedCalendarSettings } from "../SelectedCalendarSettings";
|
||||
import { SelectedCalendarsSettings } from "../SelectedCalendarsSettings";
|
||||
|
||||
export const SelectedCalendarSettingsPlatformWrapper = ({
|
||||
export const SelectedCalendarsSettingsPlatformWrapper = ({
|
||||
classNames = "mx-5 mb-6",
|
||||
}: {
|
||||
classNames?: string;
|
||||
@@ -43,8 +43,8 @@ export const SelectedCalendarSettingsPlatformWrapper = ({
|
||||
}
|
||||
|
||||
return (
|
||||
<SelectedCalendarSettings classNames={classNames}>
|
||||
<SelectedCalendarSettingsHeading />
|
||||
<SelectedCalendarsSettings classNames={classNames}>
|
||||
<SelectedCalendarsSettingsHeading />
|
||||
<List noBorderTreatment className="p-6 pt-2">
|
||||
{data.connectedCalendars.map((connectedCalendar) => {
|
||||
if (!!connectedCalendar.calendars && connectedCalendar.calendars.length > 0) {
|
||||
@@ -112,7 +112,7 @@ export const SelectedCalendarSettingsPlatformWrapper = ({
|
||||
);
|
||||
})}
|
||||
</List>
|
||||
</SelectedCalendarSettings>
|
||||
</SelectedCalendarsSettings>
|
||||
);
|
||||
}}
|
||||
/>
|
||||
@@ -121,7 +121,7 @@ export const SelectedCalendarSettingsPlatformWrapper = ({
|
||||
);
|
||||
};
|
||||
|
||||
const SelectedCalendarSettingsHeading = () => {
|
||||
const SelectedCalendarsSettingsHeading = () => {
|
||||
const { t } = useLocale();
|
||||
|
||||
return (
|
||||
+7
-7
@@ -11,9 +11,9 @@ import { List } from "@calcom/ui";
|
||||
import AppListCard from "@calcom/web/components/AppListCard";
|
||||
import AdditionalCalendarSelector from "@calcom/web/components/apps/AdditionalCalendarSelector";
|
||||
|
||||
import { SelectedCalendarSettings } from "../SelectedCalendarSettings";
|
||||
import { SelectedCalendarsSettings } from "../SelectedCalendarsSettings";
|
||||
|
||||
type SelectedCalendarSettingsWebWrapperProps = {
|
||||
type SelectedCalendarsSettingsWebWrapperProps = {
|
||||
onChanged: () => unknown | Promise<unknown>;
|
||||
fromOnboarding?: boolean;
|
||||
destinationCalendarId?: string;
|
||||
@@ -21,7 +21,7 @@ type SelectedCalendarSettingsWebWrapperProps = {
|
||||
classNames?: string;
|
||||
};
|
||||
|
||||
export const SelectedCalendarSettingsWebWrapper = (props: SelectedCalendarSettingsWebWrapperProps) => {
|
||||
export const SelectedCalendarsSettingsWebWrapper = (props: SelectedCalendarsSettingsWebWrapperProps) => {
|
||||
const { t } = useLocale();
|
||||
const query = trpc.viewer.connectedCalendars.useQuery(undefined, {
|
||||
suspense: true,
|
||||
@@ -39,8 +39,8 @@ export const SelectedCalendarSettingsWebWrapper = (props: SelectedCalendarSettin
|
||||
}
|
||||
|
||||
return (
|
||||
<SelectedCalendarSettings classNames={props.classNames}>
|
||||
<SelectedCalendarSettingsHeading
|
||||
<SelectedCalendarsSettings classNames={props.classNames}>
|
||||
<SelectedCalendarsSettingsHeading
|
||||
isConnectedCalendarsPresent={!!data.connectedCalendars.length}
|
||||
isPending={isPending}
|
||||
/>
|
||||
@@ -122,7 +122,7 @@ export const SelectedCalendarSettingsWebWrapper = (props: SelectedCalendarSettin
|
||||
);
|
||||
})}
|
||||
</List>
|
||||
</SelectedCalendarSettings>
|
||||
</SelectedCalendarsSettings>
|
||||
);
|
||||
}}
|
||||
/>
|
||||
@@ -130,7 +130,7 @@ export const SelectedCalendarSettingsWebWrapper = (props: SelectedCalendarSettin
|
||||
);
|
||||
};
|
||||
|
||||
const SelectedCalendarSettingsHeading = (props: {
|
||||
const SelectedCalendarsSettingsHeading = (props: {
|
||||
isConnectedCalendarsPresent: boolean;
|
||||
isPending?: boolean;
|
||||
}) => {
|
||||
Reference in new issue
Block a user