-
-
Time Options
-
-
-
- am/pm
-
-
+
+
Time Options
+
+
+
+ am/pm
+
+
+ Use setting
+
- Use setting
-
-
-
- 24h
-
-
-
+ is24hClock ? "translate-x-3" : "translate-x-0",
+ "pointer-events-none inline-block h-4 w-4 rounded-full bg-white shadow transform ring-0 transition ease-in-out duration-200"
+ )}
+ />
+
+
+ 24h
+
+
- setSelectedTimeZone(tz.value)}
- className="mb-2 shadow-sm focus:ring-black focus:border-black mt-1 block w-full sm:text-sm border-gray-300 rounded-md"
- />
- )
- );
+
setSelectedTimeZone(tz.value)}
+ className="mb-2 shadow-sm focus:ring-black focus:border-black mt-1 block w-full sm:text-sm border-gray-300 rounded-md"
+ />
+
+ ) : null;
};
export default TimeOptions;
diff --git a/components/booking/pages/AvailabilityPage.tsx b/components/booking/pages/AvailabilityPage.tsx
index e3932d06..d4c9a33e 100644
--- a/components/booking/pages/AvailabilityPage.tsx
+++ b/components/booking/pages/AvailabilityPage.tsx
@@ -22,11 +22,14 @@ import AvatarGroup from "@components/ui/AvatarGroup";
import PoweredByCal from "@components/ui/PoweredByCal";
import { AvailabilityPageProps } from "../../../pages/[user]/[type]";
+import { AvailabilityTeamPageProps } from "../../../pages/team/[slug]/[type]";
dayjs.extend(utc);
dayjs.extend(customParseFormat);
-const AvailabilityPage = ({ profile, eventType, workingHours }: AvailabilityPageProps) => {
+type Props = AvailabilityTeamPageProps | AvailabilityPageProps;
+
+const AvailabilityPage = ({ profile, eventType, workingHours }: Props) => {
const router = useRouter();
const { rescheduleUid } = router.query;
const { isReady } = useTheme(profile.theme);
diff --git a/components/booking/pages/BookingPage.tsx b/components/booking/pages/BookingPage.tsx
index da44475d..74395813 100644
--- a/components/booking/pages/BookingPage.tsx
+++ b/components/booking/pages/BookingPage.tsx
@@ -264,6 +264,7 @@ const BookingPage = (props: BookingPageProps) => {
type="email"
name="email"
id="email"
+ inputMode="email"
required
className="block w-full border-gray-300 rounded-md shadow-sm dark:bg-black dark:text-white dark:border-gray-900 focus:ring-black focus:border-black sm:text-sm"
placeholder="you@example.com"
diff --git a/components/ui/TableActions.tsx b/components/ui/TableActions.tsx
new file mode 100644
index 00000000..2e5eccef
--- /dev/null
+++ b/components/ui/TableActions.tsx
@@ -0,0 +1,93 @@
+import { Menu, Transition } from "@headlessui/react";
+import { DotsHorizontalIcon } from "@heroicons/react/solid";
+import React, { FC, Fragment } from "react";
+
+import classNames from "@lib/classNames";
+import { SVGComponent } from "@lib/types/SVGComponent";
+
+import Button from "./Button";
+
+type ActionType = {
+ id: string;
+ icon: SVGComponent;
+ label: string;
+ disabled?: boolean;
+} & ({ href?: never; onClick: () => any } | { href: string; onClick?: never });
+
+interface Props {
+ actions: ActionType[];
+}
+
+const TableActions: FC
= ({ actions }) => {
+ return (
+ <>
+
+ {actions.map((action) => (
+
+ ))}
+
+
+ >
+ );
+};
+
+export default TableActions;
diff --git a/components/ui/form/CheckedSelect.tsx b/components/ui/form/CheckedSelect.tsx
index 12cba0f3..a4a8b87c 100644
--- a/components/ui/form/CheckedSelect.tsx
+++ b/components/ui/form/CheckedSelect.tsx
@@ -1,21 +1,26 @@
-import { XIcon, CheckIcon } from "@heroicons/react/outline";
+import { CheckIcon, XIcon } from "@heroicons/react/outline";
import React, { ForwardedRef, useEffect, useState } from "react";
-import { OptionsType } from "react-select/lib/types";
import Avatar from "@components/ui/Avatar";
import Select from "@components/ui/form/Select";
+type CheckedSelectValue = {
+ avatar: string;
+ label: string;
+ value: string;
+}[];
+
export type CheckedSelectProps = {
- defaultValue?: [];
+ defaultValue?: CheckedSelectValue;
placeholder?: string;
name?: string;
- options: [];
- onChange: (options: OptionsType) => void;
- disabled: [];
+ options: CheckedSelectValue;
+ onChange: (options: CheckedSelectValue) => void;
+ disabled: boolean;
};
export const CheckedSelect = React.forwardRef((props: CheckedSelectProps, ref: ForwardedRef) => {
- const [selectedOptions, setSelectedOptions] = useState<[]>(props.defaultValue || []);
+ const [selectedOptions, setSelectedOptions] = useState(props.defaultValue || []);
useEffect(() => {
props.onChange(selectedOptions);
@@ -38,7 +43,7 @@ export const CheckedSelect = React.forwardRef((props: CheckedSelectProps, ref: F
disabled: !!selectedOptions.find((selectedOption) => selectedOption.value === option.value),
}));
- const removeOption = (value) =>
+ const removeOption = (value: string) =>
setSelectedOptions(selectedOptions.filter((option) => option.value !== value));
const changeHandler = (selections) =>
diff --git a/components/ui/form/DateRangePicker.tsx b/components/ui/form/DateRangePicker.tsx
index 12161841..9b022abf 100644
--- a/components/ui/form/DateRangePicker.tsx
+++ b/components/ui/form/DateRangePicker.tsx
@@ -6,8 +6,8 @@ import React from "react";
import "react-calendar/dist/Calendar.css";
type Props = {
- startDate: string;
- endDate: string;
+ startDate: Date;
+ endDate: Date;
onDatesChange?: ((arg: { startDate: Date; endDate: Date }) => void) | undefined;
};
diff --git a/components/ui/form/Select.tsx b/components/ui/form/Select.tsx
index 0d72d9ab..a7f768df 100644
--- a/components/ui/form/Select.tsx
+++ b/components/ui/form/Select.tsx
@@ -7,7 +7,7 @@ export const SelectComp = (props: PropsWithChildren) => (