feat: destination calendar settings for CalendarSettings atom (#16133)
Co-authored-by: Morgan <[email protected]> Co-authored-by: Morgan Vernay <[email protected]> Co-authored-by: Peer Richelsen <[email protected]>
This commit is contained in:
28 files changed
+1137
-282
No files matched your search
@@ -1,14 +1,15 @@
|
||||
import { Fragment, useEffect } from "react";
|
||||
|
||||
import { InstallAppButton } from "@calcom/app-store/components";
|
||||
import { CalendarSettingsWebWrapper } from "@calcom/atoms/monorepo";
|
||||
import DestinationCalendarSelector from "@calcom/features/calendars/DestinationCalendarSelector";
|
||||
import {
|
||||
SelectedCalendarSettingsWebWrapper,
|
||||
DestinationCalendarSettingsWebWrapper,
|
||||
} from "@calcom/atoms/monorepo";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { trpc } from "@calcom/trpc/react";
|
||||
import {
|
||||
Button,
|
||||
EmptyScreen,
|
||||
Label,
|
||||
List,
|
||||
ShellSubHeading,
|
||||
AppSkeletonLoader as SkeletonLoader,
|
||||
@@ -105,31 +106,8 @@ export function CalendarListContainer(props: { heading?: boolean; fromOnboarding
|
||||
<>
|
||||
{heading && (
|
||||
<>
|
||||
<div className="border-subtle mb-6 mt-8 rounded-lg border">
|
||||
<div className="p-6">
|
||||
<h2 className="text-emphasis mb-1 text-base font-bold leading-5 tracking-wide">
|
||||
{t("add_to_calendar")}
|
||||
</h2>
|
||||
|
||||
<p className="text-subtle text-sm leading-tight">
|
||||
{t("add_to_calendar_description")}
|
||||
</p>
|
||||
</div>
|
||||
<div className="border-t">
|
||||
<div className="border-subtle flex w-full flex-col space-y-3 border-y-0 p-6">
|
||||
<div>
|
||||
<Label className="text-default mb-0 font-medium">{t("add_events_to")}</Label>
|
||||
<DestinationCalendarSelector
|
||||
hidePlaceholder
|
||||
value={data.destinationCalendar?.externalId}
|
||||
onChange={mutation.mutate}
|
||||
isPending={mutation.isPending}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<CalendarSettingsWebWrapper
|
||||
<DestinationCalendarSettingsWebWrapper />
|
||||
<SelectedCalendarSettingsWebWrapper
|
||||
onChanged={onChanged}
|
||||
fromOnboarding={fromOnboarding}
|
||||
destinationCalendarId={data.destinationCalendar?.externalId}
|
||||
|
||||
Reference in new issue
Block a user