Suggestion: let prettier sort imports order (#673)
* Suggestion: let prettier sort imports order # Conflicts: # yarn.lock * AUTO SORT ALL THE IMPORTS * Linting * Fixes test
This commit is contained in:
parent
3add84a279
commit
d194878bb2
192 changed files with 921 additions and 577 deletions
|
@ -7,4 +7,6 @@ module.exports = {
|
||||||
semi: true,
|
semi: true,
|
||||||
printWidth: 110,
|
printWidth: 110,
|
||||||
arrowParens: "always",
|
arrowParens: "always",
|
||||||
|
importOrder: ["^@ee/(.*)$", "^@lib/(.*)$", "^@components/(.*)$", "^[./]"],
|
||||||
|
importOrderSeparation: true,
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { useRouter } from "next/router";
|
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
import React, { Children } from "react";
|
import React, { Children } from "react";
|
||||||
|
|
||||||
const ActiveLink = ({ children, activeClassName, ...props }) => {
|
const ActiveLink = ({ children, activeClassName, ...props }) => {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import React from "react";
|
|
||||||
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
type DialogProps = React.ComponentProps<typeof DialogPrimitive["Root"]>;
|
type DialogProps = React.ComponentProps<typeof DialogPrimitive["Root"]>;
|
||||||
export function Dialog(props: DialogProps) {
|
export function Dialog(props: DialogProps) {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { GiftIcon } from "@heroicons/react/outline";
|
import { GiftIcon } from "@heroicons/react/outline";
|
||||||
|
|
||||||
export default function DonateBanner() {
|
export default function DonateBanner() {
|
||||||
if (location.hostname.endsWith(".cal.com")) {
|
if (location.hostname.endsWith(".cal.com")) {
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import { SVGComponent } from "@lib/types/SVGComponent";
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
|
import { SVGComponent } from "@lib/types/SVGComponent";
|
||||||
|
|
||||||
export default function EmptyScreen({
|
export default function EmptyScreen({
|
||||||
Icon,
|
Icon,
|
||||||
headline,
|
headline,
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import Cropper from "react-easy-crop";
|
|
||||||
import { useCallback, useRef, useState } from "react";
|
import { useCallback, useRef, useState } from "react";
|
||||||
|
import Cropper from "react-easy-crop";
|
||||||
|
|
||||||
import Slider from "./Slider";
|
import Slider from "./Slider";
|
||||||
|
|
||||||
export default function ImageUploader({ target, id, buttonMsg, handleAvatarChange, imageRef }) {
|
export default function ImageUploader({ target, id, buttonMsg, handleAvatarChange, imageRef }) {
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
/* legacy and soon deprecated, please refactor to use <Dialog> only */
|
/* legacy and soon deprecated, please refactor to use <Dialog> only */
|
||||||
import { Fragment, ReactNode } from "react";
|
|
||||||
import { Dialog, Transition } from "@headlessui/react";
|
import { Dialog, Transition } from "@headlessui/react";
|
||||||
import { CheckIcon, InformationCircleIcon } from "@heroicons/react/outline";
|
import { CheckIcon, InformationCircleIcon } from "@heroicons/react/outline";
|
||||||
|
import { Fragment, ReactNode } from "react";
|
||||||
|
|
||||||
import classNames from "@lib/classNames";
|
import classNames from "@lib/classNames";
|
||||||
|
|
||||||
export default function Modal(props: {
|
export default function Modal(props: {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import Link from "next/link";
|
|
||||||
import { CodeIcon, CreditCardIcon, KeyIcon, UserGroupIcon, UserIcon } from "@heroicons/react/solid";
|
import { CodeIcon, CreditCardIcon, KeyIcon, UserGroupIcon, UserIcon } from "@heroicons/react/solid";
|
||||||
|
import Link from "next/link";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
|
|
||||||
import classNames from "@lib/classNames";
|
import classNames from "@lib/classNames";
|
||||||
|
|
||||||
export default function SettingsShell(props) {
|
export default function SettingsShell(props) {
|
||||||
|
|
|
@ -1,10 +1,5 @@
|
||||||
import Link from "next/link";
|
|
||||||
import React, { Fragment, useEffect, useState } from "react";
|
|
||||||
import { useRouter } from "next/router";
|
|
||||||
import { signOut, useSession } from "next-auth/client";
|
|
||||||
// TODO: replace headlessui with radix-ui
|
// TODO: replace headlessui with radix-ui
|
||||||
import { Menu, Transition } from "@headlessui/react";
|
import { Menu, Transition } from "@headlessui/react";
|
||||||
import { collectPageParameters, telemetryEventTypes, useTelemetry } from "@lib/telemetry";
|
|
||||||
import { SelectorIcon } from "@heroicons/react/outline";
|
import { SelectorIcon } from "@heroicons/react/outline";
|
||||||
import {
|
import {
|
||||||
CalendarIcon,
|
CalendarIcon,
|
||||||
|
@ -15,12 +10,20 @@ import {
|
||||||
LogoutIcon,
|
LogoutIcon,
|
||||||
PuzzleIcon,
|
PuzzleIcon,
|
||||||
} from "@heroicons/react/solid";
|
} from "@heroicons/react/solid";
|
||||||
import Logo from "./Logo";
|
|
||||||
import classNames from "@lib/classNames";
|
|
||||||
import { Toaster } from "react-hot-toast";
|
|
||||||
import Avatar from "@components/ui/Avatar";
|
|
||||||
import { User } from "@prisma/client";
|
import { User } from "@prisma/client";
|
||||||
|
import { signOut, useSession } from "next-auth/client";
|
||||||
|
import Link from "next/link";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
|
import React, { Fragment, useEffect, useState } from "react";
|
||||||
|
import { Toaster } from "react-hot-toast";
|
||||||
|
|
||||||
|
import classNames from "@lib/classNames";
|
||||||
|
import { collectPageParameters, telemetryEventTypes, useTelemetry } from "@lib/telemetry";
|
||||||
|
|
||||||
import { HeadSeo } from "@components/seo/head-seo";
|
import { HeadSeo } from "@components/seo/head-seo";
|
||||||
|
import Avatar from "@components/ui/Avatar";
|
||||||
|
|
||||||
|
import Logo from "./Logo";
|
||||||
|
|
||||||
export default function Shell(props) {
|
export default function Shell(props) {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import React from "react";
|
|
||||||
import * as SliderPrimitive from "@radix-ui/react-slider";
|
import * as SliderPrimitive from "@radix-ui/react-slider";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
const Slider = ({ value, min, max, step, label, changeHandler }) => (
|
const Slider = ({ value, min, max, step, label, changeHandler }) => (
|
||||||
<SliderPrimitive.Root
|
<SliderPrimitive.Root
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import React from "react";
|
|
||||||
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
export function Tooltip({
|
export function Tooltip({
|
||||||
children,
|
children,
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
|
import { ExclamationIcon } from "@heroicons/react/solid";
|
||||||
|
import { SchedulingType } from "@prisma/client";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import { useSlots } from "@lib/hooks/useSlots";
|
|
||||||
import { ExclamationIcon } from "@heroicons/react/solid";
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
|
import { useSlots } from "@lib/hooks/useSlots";
|
||||||
|
|
||||||
import Loader from "@components/Loader";
|
import Loader from "@components/Loader";
|
||||||
import { SchedulingType } from "@prisma/client";
|
|
||||||
|
|
||||||
const AvailableTimes = ({
|
const AvailableTimes = ({
|
||||||
date,
|
date,
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
import { ChevronLeftIcon, ChevronRightIcon } from "@heroicons/react/solid";
|
import { ChevronLeftIcon, ChevronRightIcon } from "@heroicons/react/solid";
|
||||||
import { useEffect, useState } from "react";
|
|
||||||
import dayjs, { Dayjs } from "dayjs";
|
import dayjs, { Dayjs } from "dayjs";
|
||||||
import utc from "dayjs/plugin/utc";
|
|
||||||
import timezone from "dayjs/plugin/timezone";
|
|
||||||
import getSlots from "@lib/slots";
|
|
||||||
import dayjsBusinessDays from "dayjs-business-days";
|
import dayjsBusinessDays from "dayjs-business-days";
|
||||||
|
import timezone from "dayjs/plugin/timezone";
|
||||||
|
import utc from "dayjs/plugin/utc";
|
||||||
|
import { useEffect, useState } from "react";
|
||||||
|
|
||||||
import classNames from "@lib/classNames";
|
import classNames from "@lib/classNames";
|
||||||
|
import getSlots from "@lib/slots";
|
||||||
|
|
||||||
dayjs.extend(dayjsBusinessDays);
|
dayjs.extend(dayjsBusinessDays);
|
||||||
dayjs.extend(utc);
|
dayjs.extend(utc);
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
// TODO: replace headlessui with radix-ui
|
// TODO: replace headlessui with radix-ui
|
||||||
import { Switch } from "@headlessui/react";
|
import { Switch } from "@headlessui/react";
|
||||||
import TimezoneSelect from "react-timezone-select";
|
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { is24h, timeZone } from "../../lib/clock";
|
import TimezoneSelect from "react-timezone-select";
|
||||||
|
|
||||||
import classNames from "@lib/classNames";
|
import classNames from "@lib/classNames";
|
||||||
|
|
||||||
|
import { is24h, timeZone } from "../../lib/clock";
|
||||||
|
|
||||||
const TimeOptions = (props) => {
|
const TimeOptions = (props) => {
|
||||||
const [selectedTimeZone, setSelectedTimeZone] = useState("");
|
const [selectedTimeZone, setSelectedTimeZone] = useState("");
|
||||||
const [is24hClock, setIs24hClock] = useState(false);
|
const [is24hClock, setIs24hClock] = useState(false);
|
||||||
|
|
|
@ -1,25 +1,27 @@
|
||||||
// Get router variables
|
// Get router variables
|
||||||
import { useRouter } from "next/router";
|
import { ChevronDownIcon, ChevronUpIcon, ClockIcon, CreditCardIcon, GlobeIcon } from "@heroicons/react/solid";
|
||||||
import { useEffect, useState, useMemo } from "react";
|
|
||||||
import { EventType } from "@prisma/client";
|
import { EventType } from "@prisma/client";
|
||||||
|
import * as Collapsible from "@radix-ui/react-collapsible";
|
||||||
import dayjs, { Dayjs } from "dayjs";
|
import dayjs, { Dayjs } from "dayjs";
|
||||||
import customParseFormat from "dayjs/plugin/customParseFormat";
|
import customParseFormat from "dayjs/plugin/customParseFormat";
|
||||||
import utc from "dayjs/plugin/utc";
|
import utc from "dayjs/plugin/utc";
|
||||||
import { collectPageParameters, telemetryEventTypes, useTelemetry } from "@lib/telemetry";
|
import { useRouter } from "next/router";
|
||||||
import { ChevronDownIcon, ChevronUpIcon, ClockIcon, CreditCardIcon, GlobeIcon } from "@heroicons/react/solid";
|
import { useEffect, useState, useMemo } from "react";
|
||||||
import DatePicker from "@components/booking/DatePicker";
|
|
||||||
import { isBrandingHidden } from "@lib/isBrandingHidden";
|
|
||||||
import PoweredByCalendso from "@components/ui/PoweredByCalendso";
|
|
||||||
import { timeZone } from "@lib/clock";
|
|
||||||
import AvailableTimes from "@components/booking/AvailableTimes";
|
|
||||||
import TimeOptions from "@components/booking/TimeOptions";
|
|
||||||
import * as Collapsible from "@radix-ui/react-collapsible";
|
|
||||||
import { HeadSeo } from "@components/seo/head-seo";
|
|
||||||
import { asStringOrNull } from "@lib/asStringOrNull";
|
|
||||||
import useTheme from "@lib/hooks/useTheme";
|
|
||||||
import AvatarGroup from "@components/ui/AvatarGroup";
|
|
||||||
import { FormattedNumber, IntlProvider } from "react-intl";
|
import { FormattedNumber, IntlProvider } from "react-intl";
|
||||||
|
|
||||||
|
import { asStringOrNull } from "@lib/asStringOrNull";
|
||||||
|
import { timeZone } from "@lib/clock";
|
||||||
|
import useTheme from "@lib/hooks/useTheme";
|
||||||
|
import { isBrandingHidden } from "@lib/isBrandingHidden";
|
||||||
|
import { collectPageParameters, telemetryEventTypes, useTelemetry } from "@lib/telemetry";
|
||||||
|
|
||||||
|
import AvailableTimes from "@components/booking/AvailableTimes";
|
||||||
|
import DatePicker from "@components/booking/DatePicker";
|
||||||
|
import TimeOptions from "@components/booking/TimeOptions";
|
||||||
|
import { HeadSeo } from "@components/seo/head-seo";
|
||||||
|
import AvatarGroup from "@components/ui/AvatarGroup";
|
||||||
|
import PoweredByCalendso from "@components/ui/PoweredByCalendso";
|
||||||
|
|
||||||
dayjs.extend(utc);
|
dayjs.extend(utc);
|
||||||
dayjs.extend(customParseFormat);
|
dayjs.extend(customParseFormat);
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
import Head from "next/head";
|
|
||||||
import { useRouter } from "next/router";
|
|
||||||
import {
|
import {
|
||||||
CalendarIcon,
|
CalendarIcon,
|
||||||
ClockIcon,
|
ClockIcon,
|
||||||
|
@ -8,26 +6,32 @@ import {
|
||||||
LocationMarkerIcon,
|
LocationMarkerIcon,
|
||||||
} from "@heroicons/react/solid";
|
} from "@heroicons/react/solid";
|
||||||
import { EventTypeCustomInputType } from "@prisma/client";
|
import { EventTypeCustomInputType } from "@prisma/client";
|
||||||
import { collectPageParameters, telemetryEventTypes, useTelemetry } from "@lib/telemetry";
|
|
||||||
import { useCallback, useEffect, useState } from "react";
|
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
import "react-phone-number-input/style.css";
|
import Head from "next/head";
|
||||||
import PhoneInput from "react-phone-number-input";
|
import { useRouter } from "next/router";
|
||||||
import { LocationType } from "@lib/location";
|
import { stringify } from "querystring";
|
||||||
import { Button } from "@components/ui/Button";
|
import { useCallback, useEffect, useState } from "react";
|
||||||
|
import { FormattedNumber, IntlProvider } from "react-intl";
|
||||||
import { ReactMultiEmail } from "react-multi-email";
|
import { ReactMultiEmail } from "react-multi-email";
|
||||||
|
import PhoneInput from "react-phone-number-input";
|
||||||
|
import "react-phone-number-input/style.css";
|
||||||
|
|
||||||
|
import { createPaymentLink } from "@ee/lib/stripe/client";
|
||||||
|
|
||||||
import { asStringOrNull } from "@lib/asStringOrNull";
|
import { asStringOrNull } from "@lib/asStringOrNull";
|
||||||
import { timeZone } from "@lib/clock";
|
import { timeZone } from "@lib/clock";
|
||||||
import useTheme from "@lib/hooks/useTheme";
|
import useTheme from "@lib/hooks/useTheme";
|
||||||
import AvatarGroup from "@components/ui/AvatarGroup";
|
import { LocationType } from "@lib/location";
|
||||||
|
import createBooking from "@lib/mutations/bookings/create-booking";
|
||||||
import { parseZone } from "@lib/parseZone";
|
import { parseZone } from "@lib/parseZone";
|
||||||
import { createPaymentLink } from "@ee/lib/stripe/client";
|
import { collectPageParameters, telemetryEventTypes, useTelemetry } from "@lib/telemetry";
|
||||||
import { FormattedNumber, IntlProvider } from "react-intl";
|
import { BookingCreateBody } from "@lib/types/booking";
|
||||||
|
|
||||||
|
import AvatarGroup from "@components/ui/AvatarGroup";
|
||||||
|
import { Button } from "@components/ui/Button";
|
||||||
|
|
||||||
import { BookPageProps } from "../../../pages/[user]/book";
|
import { BookPageProps } from "../../../pages/[user]/book";
|
||||||
import { TeamBookingPageProps } from "../../../pages/team/[slug]/book";
|
import { TeamBookingPageProps } from "../../../pages/team/[slug]/book";
|
||||||
import { stringify } from "querystring";
|
|
||||||
import createBooking from "@lib/mutations/bookings/create-booking";
|
|
||||||
import { BookingCreateBody } from "@lib/types/booking";
|
|
||||||
|
|
||||||
type BookingPageProps = BookPageProps | TeamBookingPageProps;
|
type BookingPageProps = BookPageProps | TeamBookingPageProps;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
import { DialogClose, DialogContent } from "@components/Dialog";
|
|
||||||
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
||||||
import { ExclamationIcon } from "@heroicons/react/outline";
|
import { ExclamationIcon } from "@heroicons/react/outline";
|
||||||
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
||||||
import React, { PropsWithChildren } from "react";
|
import React, { PropsWithChildren } from "react";
|
||||||
|
|
||||||
|
import { DialogClose, DialogContent } from "@components/Dialog";
|
||||||
import { Button } from "@components/ui/Button";
|
import { Button } from "@components/ui/Button";
|
||||||
|
|
||||||
export type ConfirmationDialogContentProps = {
|
export type ConfirmationDialogContentProps = {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
import { HttpError } from "@lib/core/http/error";
|
import { HttpError } from "@lib/core/http/error";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import { SchedulingType } from "@prisma/client";
|
|
||||||
import {
|
import {
|
||||||
ClockIcon,
|
ClockIcon,
|
||||||
CreditCardIcon,
|
CreditCardIcon,
|
||||||
|
@ -6,11 +5,13 @@ import {
|
||||||
UserIcon,
|
UserIcon,
|
||||||
UsersIcon,
|
UsersIcon,
|
||||||
} from "@heroicons/react/solid";
|
} from "@heroicons/react/solid";
|
||||||
import React from "react";
|
import { SchedulingType } from "@prisma/client";
|
||||||
import { Prisma } from "@prisma/client";
|
import { Prisma } from "@prisma/client";
|
||||||
import classNames from "@lib/classNames";
|
import React from "react";
|
||||||
import { FormattedNumber, IntlProvider } from "react-intl";
|
import { FormattedNumber, IntlProvider } from "react-intl";
|
||||||
|
|
||||||
|
import classNames from "@lib/classNames";
|
||||||
|
|
||||||
const eventTypeData = Prisma.validator<Prisma.EventTypeArgs>()({
|
const eventTypeData = Prisma.validator<Prisma.EventTypeArgs>()({
|
||||||
select: {
|
select: {
|
||||||
id: true,
|
id: true,
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
import React, { SyntheticEvent, useState } from "react";
|
import React, { SyntheticEvent, useState } from "react";
|
||||||
import Modal from "@components/Modal";
|
|
||||||
import { ErrorCode } from "@lib/auth";
|
import { ErrorCode } from "@lib/auth";
|
||||||
|
|
||||||
|
import Modal from "@components/Modal";
|
||||||
|
|
||||||
const errorMessages: { [key: string]: string } = {
|
const errorMessages: { [key: string]: string } = {
|
||||||
[ErrorCode.IncorrectPassword]: "Current password is incorrect",
|
[ErrorCode.IncorrectPassword]: "Current password is incorrect",
|
||||||
[ErrorCode.NewPasswordMatchesOld]:
|
[ErrorCode.NewPasswordMatchesOld]:
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
import { SyntheticEvent, useState } from "react";
|
import { SyntheticEvent, useState } from "react";
|
||||||
import Button from "@components/ui/Button";
|
|
||||||
import { Dialog, DialogContent } from "@components/Dialog";
|
|
||||||
import { ErrorCode } from "@lib/auth";
|
import { ErrorCode } from "@lib/auth";
|
||||||
|
|
||||||
|
import { Dialog, DialogContent } from "@components/Dialog";
|
||||||
|
import Button from "@components/ui/Button";
|
||||||
|
|
||||||
import TwoFactorAuthAPI from "./TwoFactorAuthAPI";
|
import TwoFactorAuthAPI from "./TwoFactorAuthAPI";
|
||||||
import TwoFactorModalHeader from "./TwoFactorModalHeader";
|
import TwoFactorModalHeader from "./TwoFactorModalHeader";
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
import React, { SyntheticEvent, useState } from "react";
|
import React, { SyntheticEvent, useState } from "react";
|
||||||
import Button from "@components/ui/Button";
|
|
||||||
import { Dialog, DialogContent } from "@components/Dialog";
|
|
||||||
import { ErrorCode } from "@lib/auth";
|
import { ErrorCode } from "@lib/auth";
|
||||||
|
|
||||||
|
import { Dialog, DialogContent } from "@components/Dialog";
|
||||||
|
import Button from "@components/ui/Button";
|
||||||
|
|
||||||
import TwoFactorAuthAPI from "./TwoFactorAuthAPI";
|
import TwoFactorAuthAPI from "./TwoFactorAuthAPI";
|
||||||
import TwoFactorModalHeader from "./TwoFactorModalHeader";
|
import TwoFactorModalHeader from "./TwoFactorModalHeader";
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import Button from "@components/ui/Button";
|
|
||||||
import Badge from "@components/ui/Badge";
|
import Badge from "@components/ui/Badge";
|
||||||
import EnableTwoFactorModal from "./EnableTwoFactorModal";
|
import Button from "@components/ui/Button";
|
||||||
|
|
||||||
import DisableTwoFactorModal from "./DisableTwoFactorModal";
|
import DisableTwoFactorModal from "./DisableTwoFactorModal";
|
||||||
|
import EnableTwoFactorModal from "./EnableTwoFactorModal";
|
||||||
|
|
||||||
const TwoFactorAuthSection = ({ twoFactorEnabled }: { twoFactorEnabled: boolean }) => {
|
const TwoFactorAuthSection = ({ twoFactorEnabled }: { twoFactorEnabled: boolean }) => {
|
||||||
const [enabled, setEnabled] = useState(twoFactorEnabled);
|
const [enabled, setEnabled] = useState(twoFactorEnabled);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import React from "react";
|
|
||||||
import { ShieldCheckIcon } from "@heroicons/react/solid";
|
import { ShieldCheckIcon } from "@heroicons/react/solid";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
const TwoFactorModalHeader = ({ title, description }: { title: string; description: string }) => {
|
const TwoFactorModalHeader = ({ title, description }: { title: string; description: string }) => {
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
|
import merge from "lodash.merge";
|
||||||
import { NextSeo, NextSeoProps } from "next-seo";
|
import { NextSeo, NextSeoProps } from "next-seo";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { getBrowserInfo } from "@lib/core/browser/browser.utils";
|
|
||||||
import { getSeoImage, seoConfig } from "@lib/config/next-seo.config";
|
import { getSeoImage, seoConfig } from "@lib/config/next-seo.config";
|
||||||
import merge from "lodash.merge";
|
import { getBrowserInfo } from "@lib/core/browser/browser.utils";
|
||||||
|
|
||||||
export type HeadSeoProps = {
|
export type HeadSeoProps = {
|
||||||
title: string;
|
title: string;
|
||||||
|
|
|
@ -1,18 +1,21 @@
|
||||||
import React, { useEffect, useRef, useState } from "react";
|
|
||||||
import { ArrowLeftIcon, PlusIcon, TrashIcon } from "@heroicons/react/outline";
|
import { ArrowLeftIcon, PlusIcon, TrashIcon } from "@heroicons/react/outline";
|
||||||
import ErrorAlert from "@components/ui/alerts/Error";
|
import React, { useEffect, useRef, useState } from "react";
|
||||||
import { UsernameInput } from "@components/ui/UsernameInput";
|
|
||||||
import MemberList from "./MemberList";
|
|
||||||
import Avatar from "@components/ui/Avatar";
|
|
||||||
import ImageUploader from "@components/ImageUploader";
|
|
||||||
import { Dialog, DialogTrigger } from "@components/Dialog";
|
|
||||||
import ConfirmationDialogContent from "@components/dialog/ConfirmationDialogContent";
|
|
||||||
import Modal from "@components/Modal";
|
|
||||||
import MemberInvitationModal from "@components/team/MemberInvitationModal";
|
|
||||||
import Button from "@components/ui/Button";
|
|
||||||
import { Member } from "@lib/member";
|
import { Member } from "@lib/member";
|
||||||
import { Team } from "@lib/team";
|
import { Team } from "@lib/team";
|
||||||
|
|
||||||
|
import { Dialog, DialogTrigger } from "@components/Dialog";
|
||||||
|
import ImageUploader from "@components/ImageUploader";
|
||||||
|
import Modal from "@components/Modal";
|
||||||
|
import ConfirmationDialogContent from "@components/dialog/ConfirmationDialogContent";
|
||||||
|
import MemberInvitationModal from "@components/team/MemberInvitationModal";
|
||||||
|
import Avatar from "@components/ui/Avatar";
|
||||||
|
import Button from "@components/ui/Button";
|
||||||
|
import { UsernameInput } from "@components/ui/UsernameInput";
|
||||||
|
import ErrorAlert from "@components/ui/alerts/Error";
|
||||||
|
|
||||||
|
import MemberList from "./MemberList";
|
||||||
|
|
||||||
export default function EditTeam(props: { team: Team | undefined | null; onCloseEdit: () => void }) {
|
export default function EditTeam(props: { team: Team | undefined | null; onCloseEdit: () => void }) {
|
||||||
const [members, setMembers] = useState([]);
|
const [members, setMembers] = useState([]);
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
import { UsersIcon } from "@heroicons/react/outline";
|
import { UsersIcon } from "@heroicons/react/outline";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import Button from "@components/ui/Button";
|
|
||||||
import { Team } from "@lib/team";
|
import { Team } from "@lib/team";
|
||||||
|
|
||||||
|
import Button from "@components/ui/Button";
|
||||||
|
|
||||||
export default function MemberInvitationModal(props: { team: Team | undefined | null; onExit: () => void }) {
|
export default function MemberInvitationModal(props: { team: Team | undefined | null; onExit: () => void }) {
|
||||||
const [errorMessage, setErrorMessage] = useState("");
|
const [errorMessage, setErrorMessage] = useState("");
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import MemberListItem from "./MemberListItem";
|
|
||||||
import { Member } from "@lib/member";
|
import { Member } from "@lib/member";
|
||||||
|
|
||||||
|
import MemberListItem from "./MemberListItem";
|
||||||
|
|
||||||
export default function MemberList(props: {
|
export default function MemberList(props: {
|
||||||
members: Member[];
|
members: Member[];
|
||||||
onRemoveMember: (text: Member) => void;
|
onRemoveMember: (text: Member) => void;
|
||||||
|
|
|
@ -1,12 +1,15 @@
|
||||||
import { DotsHorizontalIcon, UserRemoveIcon } from "@heroicons/react/outline";
|
import { DotsHorizontalIcon, UserRemoveIcon } from "@heroicons/react/outline";
|
||||||
import Dropdown, { DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "../ui/Dropdown";
|
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
|
|
||||||
|
import { Member } from "@lib/member";
|
||||||
|
|
||||||
import { Dialog, DialogTrigger } from "@components/Dialog";
|
import { Dialog, DialogTrigger } from "@components/Dialog";
|
||||||
import ConfirmationDialogContent from "@components/dialog/ConfirmationDialogContent";
|
import ConfirmationDialogContent from "@components/dialog/ConfirmationDialogContent";
|
||||||
import Avatar from "@components/ui/Avatar";
|
import Avatar from "@components/ui/Avatar";
|
||||||
import { Member } from "@lib/member";
|
|
||||||
import Button from "@components/ui/Button";
|
import Button from "@components/ui/Button";
|
||||||
|
|
||||||
|
import Dropdown, { DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "../ui/Dropdown";
|
||||||
|
|
||||||
export default function MemberListItem(props: {
|
export default function MemberListItem(props: {
|
||||||
member: Member;
|
member: Member;
|
||||||
onActionSelect: (text: string) => void;
|
onActionSelect: (text: string) => void;
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import TeamListItem from "./TeamListItem";
|
|
||||||
import { Team } from "@lib/team";
|
import { Team } from "@lib/team";
|
||||||
|
|
||||||
|
import TeamListItem from "./TeamListItem";
|
||||||
|
|
||||||
export default function TeamList(props: {
|
export default function TeamList(props: {
|
||||||
teams: Team[];
|
teams: Team[];
|
||||||
onChange: () => void;
|
onChange: () => void;
|
||||||
|
|
|
@ -5,15 +5,18 @@ import {
|
||||||
PencilAltIcon,
|
PencilAltIcon,
|
||||||
TrashIcon,
|
TrashIcon,
|
||||||
} from "@heroicons/react/outline";
|
} from "@heroicons/react/outline";
|
||||||
import Dropdown, { DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "../ui/Dropdown";
|
|
||||||
import { useState } from "react";
|
|
||||||
import { Tooltip } from "@components/Tooltip";
|
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
|
import { useState } from "react";
|
||||||
|
|
||||||
|
import showToast from "@lib/notification";
|
||||||
|
|
||||||
import { Dialog, DialogTrigger } from "@components/Dialog";
|
import { Dialog, DialogTrigger } from "@components/Dialog";
|
||||||
|
import { Tooltip } from "@components/Tooltip";
|
||||||
import ConfirmationDialogContent from "@components/dialog/ConfirmationDialogContent";
|
import ConfirmationDialogContent from "@components/dialog/ConfirmationDialogContent";
|
||||||
import Avatar from "@components/ui/Avatar";
|
import Avatar from "@components/ui/Avatar";
|
||||||
import Button from "@components/ui/Button";
|
import Button from "@components/ui/Button";
|
||||||
import showToast from "@lib/notification";
|
|
||||||
|
import Dropdown, { DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "../ui/Dropdown";
|
||||||
|
|
||||||
interface Team {
|
interface Team {
|
||||||
id: number;
|
id: number;
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
import React from "react";
|
|
||||||
import Text from "@components/ui/Text";
|
|
||||||
import Link from "next/link";
|
|
||||||
import Avatar from "@components/ui/Avatar";
|
|
||||||
import { ArrowRightIcon } from "@heroicons/react/outline";
|
import { ArrowRightIcon } from "@heroicons/react/outline";
|
||||||
import classnames from "classnames";
|
|
||||||
import { ArrowLeftIcon } from "@heroicons/react/solid";
|
import { ArrowLeftIcon } from "@heroicons/react/solid";
|
||||||
|
import classnames from "classnames";
|
||||||
|
import Link from "next/link";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
|
import Avatar from "@components/ui/Avatar";
|
||||||
import Button from "@components/ui/Button";
|
import Button from "@components/ui/Button";
|
||||||
|
import Text from "@components/ui/Text";
|
||||||
|
|
||||||
const Team = ({ team }) => {
|
const Team = ({ team }) => {
|
||||||
const Member = ({ member }) => {
|
const Member = ({ member }) => {
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
||||||
import * as Tooltip from "@radix-ui/react-tooltip";
|
import * as Tooltip from "@radix-ui/react-tooltip";
|
||||||
import { defaultAvatarSrc } from "@lib/profile";
|
|
||||||
import classNames from "@lib/classNames";
|
import classNames from "@lib/classNames";
|
||||||
|
import { defaultAvatarSrc } from "@lib/profile";
|
||||||
|
|
||||||
export type AvatarProps = {
|
export type AvatarProps = {
|
||||||
className?: string;
|
className?: string;
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import Avatar from "@components/ui/Avatar";
|
|
||||||
import classNames from "@lib/classNames";
|
import classNames from "@lib/classNames";
|
||||||
|
|
||||||
|
import Avatar from "@components/ui/Avatar";
|
||||||
|
|
||||||
// import * as Tooltip from "@radix-ui/react-tooltip";
|
// import * as Tooltip from "@radix-ui/react-tooltip";
|
||||||
|
|
||||||
export type AvatarGroupProps = {
|
export type AvatarGroupProps = {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import classNames from "@lib/classNames";
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
|
import classNames from "@lib/classNames";
|
||||||
|
|
||||||
export type BadgeProps = {
|
export type BadgeProps = {
|
||||||
variant: "default" | "success" | "gray";
|
variant: "default" | "success" | "gray";
|
||||||
} & JSX.IntrinsicElements["span"];
|
} & JSX.IntrinsicElements["span"];
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
import classNames from "@lib/classNames";
|
|
||||||
import { SVGComponent } from "@lib/types/SVGComponent";
|
|
||||||
import Link, { LinkProps } from "next/link";
|
import Link, { LinkProps } from "next/link";
|
||||||
import React, { forwardRef } from "react";
|
import React, { forwardRef } from "react";
|
||||||
|
|
||||||
|
import classNames from "@lib/classNames";
|
||||||
|
import { SVGComponent } from "@lib/types/SVGComponent";
|
||||||
|
|
||||||
export type ButtonProps = {
|
export type ButtonProps = {
|
||||||
color?: "primary" | "secondary" | "minimal" | "warn";
|
color?: "primary" | "secondary" | "minimal" | "warn";
|
||||||
size?: "base" | "sm" | "lg" | "fab";
|
size?: "base" | "sm" | "lg" | "fab";
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
import React from "react";
|
|
||||||
import Text from "@components/ui/Text";
|
|
||||||
import { PlusIcon, TrashIcon } from "@heroicons/react/outline";
|
import { PlusIcon, TrashIcon } from "@heroicons/react/outline";
|
||||||
import dayjs, { Dayjs } from "dayjs";
|
|
||||||
import classnames from "classnames";
|
import classnames from "classnames";
|
||||||
|
import dayjs, { Dayjs } from "dayjs";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
|
import Text from "@components/ui/Text";
|
||||||
|
|
||||||
export const SCHEDULE_FORM_ID = "SCHEDULE_FORM_ID";
|
export const SCHEDULE_FORM_ID = "SCHEDULE_FORM_ID";
|
||||||
export const toCalendsoAvailabilityFormat = (schedule: Schedule) => {
|
export const toCalendsoAvailabilityFormat = (schedule: Schedule) => {
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
|
import { TrashIcon } from "@heroicons/react/outline";
|
||||||
|
import { Availability } from "@prisma/client";
|
||||||
|
import dayjs from "dayjs";
|
||||||
|
import timezone from "dayjs/plugin/timezone";
|
||||||
|
import utc from "dayjs/plugin/utc";
|
||||||
import React, { useEffect, useState } from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
import TimezoneSelect from "react-timezone-select";
|
import TimezoneSelect from "react-timezone-select";
|
||||||
import { TrashIcon } from "@heroicons/react/outline";
|
|
||||||
import { WeekdaySelect } from "./WeekdaySelect";
|
import { WeekdaySelect } from "./WeekdaySelect";
|
||||||
import SetTimesModal from "./modal/SetTimesModal";
|
import SetTimesModal from "./modal/SetTimesModal";
|
||||||
import dayjs from "dayjs";
|
|
||||||
import utc from "dayjs/plugin/utc";
|
|
||||||
import timezone from "dayjs/plugin/timezone";
|
|
||||||
import { Availability } from "@prisma/client";
|
|
||||||
|
|
||||||
dayjs.extend(utc);
|
dayjs.extend(utc);
|
||||||
dayjs.extend(timezone);
|
dayjs.extend(timezone);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { useState } from "react";
|
|
||||||
import * as PrimitiveSwitch from "@radix-ui/react-switch";
|
|
||||||
import * as Label from "@radix-ui/react-label";
|
import * as Label from "@radix-ui/react-label";
|
||||||
|
import * as PrimitiveSwitch from "@radix-ui/react-switch";
|
||||||
|
import { useState } from "react";
|
||||||
|
|
||||||
function classNames(...classes) {
|
function classNames(...classes) {
|
||||||
return classes.filter(Boolean).join(" ");
|
return classes.filter(Boolean).join(" ");
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import React from "react";
|
|
||||||
import classnames from "classnames";
|
import classnames from "classnames";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
import { TextProps } from "../Text";
|
import { TextProps } from "../Text";
|
||||||
|
|
||||||
const Body: React.FunctionComponent<TextProps> = (props: TextProps) => {
|
const Body: React.FunctionComponent<TextProps> = (props: TextProps) => {
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
import Body from "./Body";
|
import Body from "./Body";
|
||||||
|
|
||||||
export default Body;
|
export default Body;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import React from "react";
|
|
||||||
import classnames from "classnames";
|
import classnames from "classnames";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
import { TextProps } from "../Text";
|
import { TextProps } from "../Text";
|
||||||
|
|
||||||
const Caption: React.FunctionComponent<TextProps> = (props: TextProps) => {
|
const Caption: React.FunctionComponent<TextProps> = (props: TextProps) => {
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
import Caption from "./Caption";
|
import Caption from "./Caption";
|
||||||
|
|
||||||
export default Caption;
|
export default Caption;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import React from "react";
|
|
||||||
import classnames from "classnames";
|
import classnames from "classnames";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
import { TextProps } from "../Text";
|
import { TextProps } from "../Text";
|
||||||
|
|
||||||
const Caption2: React.FunctionComponent<TextProps> = (props: TextProps) => {
|
const Caption2: React.FunctionComponent<TextProps> = (props: TextProps) => {
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
import Caption2 from "./Caption2";
|
import Caption2 from "./Caption2";
|
||||||
|
|
||||||
export default Caption2;
|
export default Caption2;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import React from "react";
|
|
||||||
import classnames from "classnames";
|
import classnames from "classnames";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
import { TextProps } from "../Text";
|
import { TextProps } from "../Text";
|
||||||
|
|
||||||
const Footnote: React.FunctionComponent<TextProps> = (props: TextProps) => {
|
const Footnote: React.FunctionComponent<TextProps> = (props: TextProps) => {
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
import Footnote from "./Footnote";
|
import Footnote from "./Footnote";
|
||||||
|
|
||||||
export default Footnote;
|
export default Footnote;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import React from "react";
|
|
||||||
import classnames from "classnames";
|
import classnames from "classnames";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
import { TextProps } from "../Text";
|
import { TextProps } from "../Text";
|
||||||
|
|
||||||
const Headline: React.FunctionComponent<TextProps> = (props: TextProps) => {
|
const Headline: React.FunctionComponent<TextProps> = (props: TextProps) => {
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
import Headline from "./Headline";
|
import Headline from "./Headline";
|
||||||
|
|
||||||
export default Headline;
|
export default Headline;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import React from "react";
|
|
||||||
import classnames from "classnames";
|
import classnames from "classnames";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
import { TextProps } from "../Text";
|
import { TextProps } from "../Text";
|
||||||
|
|
||||||
const Largetitle: React.FunctionComponent<TextProps> = (props: TextProps) => {
|
const Largetitle: React.FunctionComponent<TextProps> = (props: TextProps) => {
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
import Largetitle from "./Largetitle";
|
import Largetitle from "./Largetitle";
|
||||||
|
|
||||||
export default Largetitle;
|
export default Largetitle;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import React from "react";
|
|
||||||
import classnames from "classnames";
|
import classnames from "classnames";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
import { TextProps } from "../Text";
|
import { TextProps } from "../Text";
|
||||||
|
|
||||||
const Overline: React.FunctionComponent<TextProps> = (props: TextProps) => {
|
const Overline: React.FunctionComponent<TextProps> = (props: TextProps) => {
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
import Overline from "./Overline";
|
import Overline from "./Overline";
|
||||||
|
|
||||||
export default Overline;
|
export default Overline;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import React from "react";
|
|
||||||
import classnames from "classnames";
|
import classnames from "classnames";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
import { TextProps } from "../Text";
|
import { TextProps } from "../Text";
|
||||||
|
|
||||||
const Subheadline: React.FunctionComponent<TextProps> = (props: TextProps) => {
|
const Subheadline: React.FunctionComponent<TextProps> = (props: TextProps) => {
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
import Subheadline from "./Subheadline";
|
import Subheadline from "./Subheadline";
|
||||||
|
|
||||||
export default Subheadline;
|
export default Subheadline;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import React from "react";
|
|
||||||
import classnames from "classnames";
|
import classnames from "classnames";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
import { TextProps } from "../Text";
|
import { TextProps } from "../Text";
|
||||||
|
|
||||||
const Subtitle: React.FunctionComponent<TextProps> = (props: TextProps) => {
|
const Subtitle: React.FunctionComponent<TextProps> = (props: TextProps) => {
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
import Subtitle from "./Subtitle";
|
import Subtitle from "./Subtitle";
|
||||||
|
|
||||||
export default Subtitle;
|
export default Subtitle;
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
import Body from "./Body";
|
import Body from "./Body";
|
||||||
import Caption from "./Caption";
|
import Caption from "./Caption";
|
||||||
import Caption2 from "./Caption2";
|
import Caption2 from "./Caption2";
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import React from "react";
|
|
||||||
import classnames from "classnames";
|
import classnames from "classnames";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
import { TextProps } from "../Text";
|
import { TextProps } from "../Text";
|
||||||
|
|
||||||
const Title: React.FunctionComponent<TextProps> = (props: TextProps) => {
|
const Title: React.FunctionComponent<TextProps> = (props: TextProps) => {
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
import Title from "./Title";
|
import Title from "./Title";
|
||||||
|
|
||||||
export default Title;
|
export default Title;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import React from "react";
|
|
||||||
import classnames from "classnames";
|
import classnames from "classnames";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
import { TextProps } from "../Text";
|
import { TextProps } from "../Text";
|
||||||
|
|
||||||
const Title2: React.FunctionComponent<TextProps> = (props: TextProps) => {
|
const Title2: React.FunctionComponent<TextProps> = (props: TextProps) => {
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
import Title2 from "./Title2";
|
import Title2 from "./Title2";
|
||||||
|
|
||||||
export default Title2;
|
export default Title2;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import React from "react";
|
|
||||||
import classnames from "classnames";
|
import classnames from "classnames";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
import { TextProps } from "../Text";
|
import { TextProps } from "../Text";
|
||||||
|
|
||||||
const Title3: React.FunctionComponent<TextProps> = (props: TextProps) => {
|
const Title3: React.FunctionComponent<TextProps> = (props: TextProps) => {
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
import Title3 from "./Title3";
|
import Title3 from "./Title3";
|
||||||
|
|
||||||
export default Title3;
|
export default Title3;
|
||||||
|
|
|
@ -1,39 +1,40 @@
|
||||||
|
import Body from "./Body";
|
||||||
|
import Caption from "./Caption";
|
||||||
|
import Caption2 from "./Caption2";
|
||||||
|
import Footnote from "./Footnote";
|
||||||
|
import Headline from "./Headline";
|
||||||
|
import Largetitle from "./Largetitle";
|
||||||
|
import Overline from "./Overline";
|
||||||
|
import Subheadline from "./Subheadline";
|
||||||
|
import Subtitle from "./Subtitle";
|
||||||
import Text from "./Text";
|
import Text from "./Text";
|
||||||
|
import Title from "./Title";
|
||||||
|
import Title2 from "./Title2";
|
||||||
|
import Title3 from "./Title3";
|
||||||
|
|
||||||
export { Text };
|
export { Text };
|
||||||
export default Text;
|
export default Text;
|
||||||
|
|
||||||
import Title from "./Title";
|
|
||||||
export { Title };
|
export { Title };
|
||||||
|
|
||||||
import Title2 from "./Title2";
|
|
||||||
export { Title2 };
|
export { Title2 };
|
||||||
|
|
||||||
import Title3 from "./Title3";
|
|
||||||
export { Title3 };
|
export { Title3 };
|
||||||
|
|
||||||
import Largetitle from "./Largetitle";
|
|
||||||
export { Largetitle };
|
export { Largetitle };
|
||||||
|
|
||||||
import Subtitle from "./Subtitle";
|
|
||||||
export { Subtitle };
|
export { Subtitle };
|
||||||
|
|
||||||
import Headline from "./Headline";
|
|
||||||
export { Headline };
|
export { Headline };
|
||||||
|
|
||||||
import Subheadline from "./Subheadline";
|
|
||||||
export { Subheadline };
|
export { Subheadline };
|
||||||
|
|
||||||
import Caption from "./Caption";
|
|
||||||
export { Caption };
|
export { Caption };
|
||||||
|
|
||||||
import Caption2 from "./Caption2";
|
|
||||||
export { Caption2 };
|
export { Caption2 };
|
||||||
|
|
||||||
import Footnote from "./Footnote";
|
|
||||||
export { Footnote };
|
export { Footnote };
|
||||||
|
|
||||||
import Overline from "./Overline";
|
|
||||||
export { Overline };
|
export { Overline };
|
||||||
|
|
||||||
import Body from "./Body";
|
|
||||||
export { Body };
|
export { Body };
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
import Select from "@components/ui/form/Select";
|
|
||||||
import { XIcon, CheckIcon } from "@heroicons/react/outline";
|
import { XIcon, CheckIcon } from "@heroicons/react/outline";
|
||||||
import React, { ForwardedRef, useEffect, useState } from "react";
|
import React, { ForwardedRef, useEffect, useState } from "react";
|
||||||
import Avatar from "@components/ui/Avatar";
|
|
||||||
import { OptionsType } from "react-select/lib/types";
|
import { OptionsType } from "react-select/lib/types";
|
||||||
|
|
||||||
|
import Avatar from "@components/ui/Avatar";
|
||||||
|
import Select from "@components/ui/form/Select";
|
||||||
|
|
||||||
export type CheckedSelectProps = {
|
export type CheckedSelectProps = {
|
||||||
defaultValue?: [];
|
defaultValue?: [];
|
||||||
placeholder?: string;
|
placeholder?: string;
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import "react-phone-number-input/style.css";
|
|
||||||
import { default as BasePhoneInput } from "react-phone-number-input";
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
import { default as BasePhoneInput } from "react-phone-number-input";
|
||||||
|
import "react-phone-number-input/style.css";
|
||||||
|
|
||||||
import classNames from "@lib/classNames";
|
import classNames from "@lib/classNames";
|
||||||
|
|
||||||
export const PhoneInput = (props) => (
|
export const PhoneInput = (props) => (
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import React, { PropsWithChildren } from "react";
|
import React, { PropsWithChildren } from "react";
|
||||||
import Select, { components, NamedProps } from "react-select";
|
import Select, { components, NamedProps } from "react-select";
|
||||||
|
|
||||||
import classNames from "@lib/classNames";
|
import classNames from "@lib/classNames";
|
||||||
|
|
||||||
export const SelectComp = (props: PropsWithChildren<NamedProps>) => (
|
export const SelectComp = (props: PropsWithChildren<NamedProps>) => (
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import React, { PropsWithChildren, useState } from "react";
|
import React, { PropsWithChildren, useState } from "react";
|
||||||
|
|
||||||
import classNames from "@lib/classNames";
|
import classNames from "@lib/classNames";
|
||||||
|
|
||||||
type RadioAreaProps = React.InputHTMLAttributes<HTMLInputElement> & {
|
type RadioAreaProps = React.InputHTMLAttributes<HTMLInputElement> & {
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "@radix-ui/react-collapsible";
|
|
||||||
import { ChevronDownIcon } from "@heroicons/react/solid";
|
import { ChevronDownIcon } from "@heroicons/react/solid";
|
||||||
|
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "@radix-ui/react-collapsible";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { RadioArea, RadioAreaGroup } from "@components/ui/form/radio-area/RadioAreaGroup";
|
|
||||||
import classNames from "@lib/classNames";
|
import classNames from "@lib/classNames";
|
||||||
|
|
||||||
|
import { RadioArea, RadioAreaGroup } from "@components/ui/form/radio-area/RadioAreaGroup";
|
||||||
|
|
||||||
type OptionProps = React.OptionHTMLAttributes<HTMLOptionElement> & {
|
type OptionProps = React.OptionHTMLAttributes<HTMLOptionElement> & {
|
||||||
description?: string;
|
description?: string;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,4 +1,2 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-namespace */
|
||||||
/* eslint-disable @typescript-eslint/no-namespace */
|
|
||||||
|
|
||||||
import "./commands";
|
import "./commands";
|
||||||
|
|
|
@ -1,11 +1,14 @@
|
||||||
import React, { useState } from "react";
|
|
||||||
import { stringify } from "querystring";
|
|
||||||
import { CardElement, useStripe, useElements } from "@stripe/react-stripe-js";
|
import { CardElement, useStripe, useElements } from "@stripe/react-stripe-js";
|
||||||
import Button from "@components/ui/Button";
|
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import useDarkMode from "@lib/core/browser/useDarkMode";
|
import { stringify } from "querystring";
|
||||||
|
import React, { useState } from "react";
|
||||||
|
|
||||||
import { PaymentData } from "@ee/lib/stripe/server";
|
import { PaymentData } from "@ee/lib/stripe/server";
|
||||||
|
|
||||||
|
import useDarkMode from "@lib/core/browser/useDarkMode";
|
||||||
|
|
||||||
|
import Button from "@components/ui/Button";
|
||||||
|
|
||||||
const CARD_OPTIONS = {
|
const CARD_OPTIONS = {
|
||||||
iconStyle: "solid" as const,
|
iconStyle: "solid" as const,
|
||||||
classes: {
|
classes: {
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
import PaymentComponent from "@ee/components/stripe/Payment";
|
|
||||||
import getStripe from "@ee/lib/stripe/client";
|
|
||||||
import { PaymentPageProps } from "@ee/pages/payment/[uid]";
|
|
||||||
import { CreditCardIcon } from "@heroicons/react/solid";
|
import { CreditCardIcon } from "@heroicons/react/solid";
|
||||||
import useTheme from "@lib/hooks/useTheme";
|
|
||||||
import { Elements } from "@stripe/react-stripe-js";
|
import { Elements } from "@stripe/react-stripe-js";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
import timezone from "dayjs/plugin/timezone";
|
import timezone from "dayjs/plugin/timezone";
|
||||||
|
@ -12,6 +8,12 @@ import Head from "next/head";
|
||||||
import React, { FC, useEffect, useState } from "react";
|
import React, { FC, useEffect, useState } from "react";
|
||||||
import { FormattedNumber, IntlProvider } from "react-intl";
|
import { FormattedNumber, IntlProvider } from "react-intl";
|
||||||
|
|
||||||
|
import PaymentComponent from "@ee/components/stripe/Payment";
|
||||||
|
import getStripe from "@ee/lib/stripe/client";
|
||||||
|
import { PaymentPageProps } from "@ee/pages/payment/[uid]";
|
||||||
|
|
||||||
|
import useTheme from "@lib/hooks/useTheme";
|
||||||
|
|
||||||
dayjs.extend(utc);
|
dayjs.extend(utc);
|
||||||
dayjs.extend(toArray);
|
dayjs.extend(toArray);
|
||||||
dayjs.extend(timezone);
|
dayjs.extend(timezone);
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
import { CalendarEvent, Person } from "@lib/calendarClient";
|
|
||||||
import EventOrganizerRefundFailedMail from "@lib/emails/EventOrganizerRefundFailedMail";
|
|
||||||
import EventPaymentMail from "@lib/emails/EventPaymentMail";
|
|
||||||
import prisma from "@lib/prisma";
|
|
||||||
import { PaymentType } from "@prisma/client";
|
import { PaymentType } from "@prisma/client";
|
||||||
import Stripe from "stripe";
|
import Stripe from "stripe";
|
||||||
import { JsonValue } from "type-fest";
|
import { JsonValue } from "type-fest";
|
||||||
import { v4 as uuidv4 } from "uuid";
|
import { v4 as uuidv4 } from "uuid";
|
||||||
|
|
||||||
|
import { CalendarEvent, Person } from "@lib/calendarClient";
|
||||||
|
import EventOrganizerRefundFailedMail from "@lib/emails/EventOrganizerRefundFailedMail";
|
||||||
|
import EventPaymentMail from "@lib/emails/EventPaymentMail";
|
||||||
|
import prisma from "@lib/prisma";
|
||||||
|
|
||||||
import { createPaymentLink } from "./client";
|
import { createPaymentLink } from "./client";
|
||||||
|
|
||||||
export type PaymentData = Stripe.Response<Stripe.PaymentIntent> & {
|
export type PaymentData = Stripe.Response<Stripe.PaymentIntent> & {
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
import { getSession } from "@lib/auth";
|
|
||||||
import prisma from "@lib/prisma";
|
|
||||||
import type { NextApiRequest, NextApiResponse } from "next";
|
import type { NextApiRequest, NextApiResponse } from "next";
|
||||||
import { stringify } from "querystring";
|
import { stringify } from "querystring";
|
||||||
|
|
||||||
|
import { getSession } from "@lib/auth";
|
||||||
|
import prisma from "@lib/prisma";
|
||||||
|
|
||||||
const client_id = process.env.STRIPE_CLIENT_ID;
|
const client_id = process.env.STRIPE_CLIENT_ID;
|
||||||
|
|
||||||
export default async function handler(req: NextApiRequest, res: NextApiResponse) {
|
export default async function handler(req: NextApiRequest, res: NextApiResponse) {
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
import { Prisma } from "@prisma/client";
|
import { Prisma } from "@prisma/client";
|
||||||
|
import type { NextApiRequest, NextApiResponse } from "next";
|
||||||
|
|
||||||
|
import stripe, { StripeData } from "@ee/lib/stripe/server";
|
||||||
|
|
||||||
import { getSession } from "@lib/auth";
|
import { getSession } from "@lib/auth";
|
||||||
import prisma from "@lib/prisma";
|
import prisma from "@lib/prisma";
|
||||||
import stripe, { StripeData } from "@ee/lib/stripe/server";
|
|
||||||
import type { NextApiRequest, NextApiResponse } from "next";
|
|
||||||
|
|
||||||
export default async function handler(req: NextApiRequest, res: NextApiResponse) {
|
export default async function handler(req: NextApiRequest, res: NextApiResponse) {
|
||||||
const { code } = req.query;
|
const { code } = req.query;
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
|
import { buffer } from "micro";
|
||||||
|
import type { NextApiRequest, NextApiResponse } from "next";
|
||||||
|
import { getErrorFromUnknown } from "pages/_error";
|
||||||
|
import Stripe from "stripe";
|
||||||
|
|
||||||
|
import stripe from "@ee/lib/stripe/server";
|
||||||
|
|
||||||
import { CalendarEvent } from "@lib/calendarClient";
|
import { CalendarEvent } from "@lib/calendarClient";
|
||||||
import EventManager from "@lib/events/EventManager";
|
import EventManager from "@lib/events/EventManager";
|
||||||
import prisma from "@lib/prisma";
|
import prisma from "@lib/prisma";
|
||||||
import stripe from "@ee/lib/stripe/server";
|
|
||||||
import { buffer } from "micro";
|
|
||||||
import type { NextApiRequest, NextApiResponse } from "next";
|
|
||||||
import Stripe from "stripe";
|
|
||||||
import { getErrorFromUnknown } from "pages/_error";
|
|
||||||
|
|
||||||
const webhookSecret = process.env.STRIPE_WEBHOOK_SECRET;
|
const webhookSecret = process.env.STRIPE_WEBHOOK_SECRET;
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
|
import { GetServerSidePropsContext } from "next";
|
||||||
|
|
||||||
import { PaymentData } from "@ee/lib/stripe/server";
|
import { PaymentData } from "@ee/lib/stripe/server";
|
||||||
|
|
||||||
import { asStringOrThrow } from "@lib/asStringOrNull";
|
import { asStringOrThrow } from "@lib/asStringOrNull";
|
||||||
import prisma from "@lib/prisma";
|
import prisma from "@lib/prisma";
|
||||||
import { inferSSRProps } from "@lib/types/inferSSRProps";
|
import { inferSSRProps } from "@lib/types/inferSSRProps";
|
||||||
import { GetServerSidePropsContext } from "next";
|
|
||||||
|
|
||||||
export type PaymentPageProps = inferSSRProps<typeof getServerSideProps>;
|
export type PaymentPageProps = inferSSRProps<typeof getServerSideProps>;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import { CalendarEvent } from "./calendarClient";
|
|
||||||
import { v5 as uuidv5 } from "uuid";
|
|
||||||
import short from "short-uuid";
|
import short from "short-uuid";
|
||||||
|
import { v5 as uuidv5 } from "uuid";
|
||||||
|
|
||||||
|
import { CalendarEvent } from "./calendarClient";
|
||||||
import { stripHtml } from "./emails/helpers";
|
import { stripHtml } from "./emails/helpers";
|
||||||
|
|
||||||
const translator = short();
|
const translator = short();
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
import React from "react";
|
|
||||||
import { createTelemetryClient, TelemetryProvider } from "@lib/telemetry";
|
|
||||||
import { Provider } from "next-auth/client";
|
import { Provider } from "next-auth/client";
|
||||||
|
import React from "react";
|
||||||
import { QueryClient, QueryClientProvider } from "react-query";
|
import { QueryClient, QueryClientProvider } from "react-query";
|
||||||
import { Hydrate } from "react-query/hydration";
|
import { Hydrate } from "react-query/hydration";
|
||||||
|
|
||||||
|
import { createTelemetryClient, TelemetryProvider } from "@lib/telemetry";
|
||||||
|
|
||||||
export const queryClient = new QueryClient();
|
export const queryClient = new QueryClient();
|
||||||
|
|
||||||
const AppProviders: React.FC = (props, pageProps) => {
|
const AppProviders: React.FC = (props, pageProps) => {
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
import EventOrganizerMail from "./emails/EventOrganizerMail";
|
|
||||||
import EventOrganizerRescheduledMail from "./emails/EventOrganizerRescheduledMail";
|
|
||||||
import prisma from "./prisma";
|
|
||||||
import { Prisma, Credential } from "@prisma/client";
|
import { Prisma, Credential } from "@prisma/client";
|
||||||
import CalEventParser from "./CalEventParser";
|
|
||||||
import { EventResult } from "@lib/events/EventManager";
|
import { EventResult } from "@lib/events/EventManager";
|
||||||
import logger from "@lib/logger";
|
import logger from "@lib/logger";
|
||||||
import { CalDavCalendar } from "./integrations/CalDav/CalDavCalendarAdapter";
|
|
||||||
|
import CalEventParser from "./CalEventParser";
|
||||||
|
import EventOrganizerMail from "./emails/EventOrganizerMail";
|
||||||
|
import EventOrganizerRescheduledMail from "./emails/EventOrganizerRescheduledMail";
|
||||||
import { AppleCalendar } from "./integrations/Apple/AppleCalendarAdapter";
|
import { AppleCalendar } from "./integrations/Apple/AppleCalendarAdapter";
|
||||||
|
import { CalDavCalendar } from "./integrations/CalDav/CalDavCalendarAdapter";
|
||||||
|
import prisma from "./prisma";
|
||||||
|
|
||||||
const log = logger.getChildLogger({ prefix: ["[lib] calendarClient"] });
|
const log = logger.getChildLogger({ prefix: ["[lib] calendarClient"] });
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// handles logic related to user clock display using 24h display / timeZone options.
|
// handles logic related to user clock display using 24h display / timeZone options.
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
import utc from "dayjs/plugin/utc";
|
|
||||||
import timezone from "dayjs/plugin/timezone";
|
import timezone from "dayjs/plugin/timezone";
|
||||||
|
import utc from "dayjs/plugin/utc";
|
||||||
|
|
||||||
dayjs.extend(utc);
|
dayjs.extend(utc);
|
||||||
dayjs.extend(timezone);
|
dayjs.extend(timezone);
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { DefaultSeoProps } from "next-seo";
|
import { DefaultSeoProps } from "next-seo";
|
||||||
|
|
||||||
import { HeadSeoProps } from "@components/seo/head-seo";
|
import { HeadSeoProps } from "@components/seo/head-seo";
|
||||||
|
|
||||||
const seoImages = {
|
const seoImages = {
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import dayjs, { Dayjs } from "dayjs";
|
import dayjs, { Dayjs } from "dayjs";
|
||||||
import EventMail from "./EventMail";
|
|
||||||
|
|
||||||
import utc from "dayjs/plugin/utc";
|
|
||||||
import timezone from "dayjs/plugin/timezone";
|
|
||||||
import localizedFormat from "dayjs/plugin/localizedFormat";
|
import localizedFormat from "dayjs/plugin/localizedFormat";
|
||||||
|
import timezone from "dayjs/plugin/timezone";
|
||||||
|
import utc from "dayjs/plugin/utc";
|
||||||
|
|
||||||
|
import EventMail from "./EventMail";
|
||||||
|
|
||||||
dayjs.extend(utc);
|
dayjs.extend(utc);
|
||||||
dayjs.extend(timezone);
|
dayjs.extend(timezone);
|
||||||
|
@ -160,6 +160,6 @@ export default class EventAttendeeMail extends EventMail {
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
protected getInviteeStart(): Dayjs {
|
protected getInviteeStart(): Dayjs {
|
||||||
return <Dayjs>dayjs(this.calEvent.startTime).tz(this.calEvent.attendees[0].timeZone);
|
return dayjs(this.calEvent.startTime).tz(this.calEvent.attendees[0].timeZone);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
|
import nodemailer from "nodemailer";
|
||||||
|
|
||||||
import CalEventParser from "../CalEventParser";
|
import CalEventParser from "../CalEventParser";
|
||||||
import { stripHtml } from "./helpers";
|
|
||||||
import { CalendarEvent, ConferenceData } from "../calendarClient";
|
import { CalendarEvent, ConferenceData } from "../calendarClient";
|
||||||
import { serverConfig } from "../serverConfig";
|
import { serverConfig } from "../serverConfig";
|
||||||
import nodemailer from "nodemailer";
|
import { stripHtml } from "./helpers";
|
||||||
|
|
||||||
export interface EntryPoint {
|
export interface EntryPoint {
|
||||||
entryPointType?: string;
|
entryPointType?: string;
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import { createEvent } from "ics";
|
|
||||||
import dayjs, { Dayjs } from "dayjs";
|
import dayjs, { Dayjs } from "dayjs";
|
||||||
import EventMail from "./EventMail";
|
import localizedFormat from "dayjs/plugin/localizedFormat";
|
||||||
|
|
||||||
import utc from "dayjs/plugin/utc";
|
|
||||||
import timezone from "dayjs/plugin/timezone";
|
import timezone from "dayjs/plugin/timezone";
|
||||||
import toArray from "dayjs/plugin/toArray";
|
import toArray from "dayjs/plugin/toArray";
|
||||||
import localizedFormat from "dayjs/plugin/localizedFormat";
|
import utc from "dayjs/plugin/utc";
|
||||||
|
import { createEvent } from "ics";
|
||||||
|
|
||||||
|
import EventMail from "./EventMail";
|
||||||
import { stripHtml } from "./helpers";
|
import { stripHtml } from "./helpers";
|
||||||
|
|
||||||
dayjs.extend(utc);
|
dayjs.extend(utc);
|
||||||
|
@ -217,6 +217,6 @@ export default class EventOrganizerMail extends EventMail {
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
protected getOrganizerStart(): Dayjs {
|
protected getOrganizerStart(): Dayjs {
|
||||||
return <Dayjs>dayjs(this.calEvent.startTime).tz(this.calEvent.organizer.timeZone);
|
return dayjs(this.calEvent.startTime).tz(this.calEvent.organizer.timeZone);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import dayjs, { Dayjs } from "dayjs";
|
import dayjs, { Dayjs } from "dayjs";
|
||||||
|
import localizedFormat from "dayjs/plugin/localizedFormat";
|
||||||
import utc from "dayjs/plugin/utc";
|
|
||||||
import timezone from "dayjs/plugin/timezone";
|
import timezone from "dayjs/plugin/timezone";
|
||||||
import toArray from "dayjs/plugin/toArray";
|
import toArray from "dayjs/plugin/toArray";
|
||||||
import localizedFormat from "dayjs/plugin/localizedFormat";
|
import utc from "dayjs/plugin/utc";
|
||||||
import EventOrganizerMail from "@lib/emails/EventOrganizerMail";
|
|
||||||
import { CalendarEvent } from "@lib/calendarClient";
|
import { CalendarEvent } from "@lib/calendarClient";
|
||||||
|
import EventOrganizerMail from "@lib/emails/EventOrganizerMail";
|
||||||
|
|
||||||
dayjs.extend(utc);
|
dayjs.extend(utc);
|
||||||
dayjs.extend(timezone);
|
dayjs.extend(timezone);
|
||||||
|
@ -27,7 +27,7 @@ export default class EventOrganizerRefundFailedMail extends EventOrganizerMail {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected getBodyText(): string {
|
protected getBodyText(): string {
|
||||||
const organizerStart: Dayjs = <Dayjs>dayjs(this.calEvent.startTime).tz(this.calEvent.organizer.timeZone);
|
const organizerStart: Dayjs = dayjs(this.calEvent.startTime).tz(this.calEvent.organizer.timeZone);
|
||||||
return `The refund for the event ${this.calEvent.type} with ${
|
return `The refund for the event ${this.calEvent.type} with ${
|
||||||
this.calEvent.attendees[0].name
|
this.calEvent.attendees[0].name
|
||||||
} on ${organizerStart.format("LT dddd, LL")} failed. Please check with your payment provider and ${
|
} on ${organizerStart.format("LT dddd, LL")} failed. Please check with your payment provider and ${
|
||||||
|
@ -57,7 +57,7 @@ export default class EventOrganizerRefundFailedMail extends EventOrganizerMail {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected getSubject(): string {
|
protected getSubject(): string {
|
||||||
const organizerStart: Dayjs = <Dayjs>dayjs(this.calEvent.startTime).tz(this.calEvent.organizer.timeZone);
|
const organizerStart: Dayjs = dayjs(this.calEvent.startTime).tz(this.calEvent.organizer.timeZone);
|
||||||
return `Refund failed: ${this.calEvent.attendees[0].name} - ${organizerStart.format("LT dddd, LL")} - ${
|
return `Refund failed: ${this.calEvent.attendees[0].name} - ${organizerStart.format("LT dddd, LL")} - ${
|
||||||
this.calEvent.type
|
this.calEvent.type
|
||||||
}`;
|
}`;
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import dayjs, { Dayjs } from "dayjs";
|
import dayjs, { Dayjs } from "dayjs";
|
||||||
|
import localizedFormat from "dayjs/plugin/localizedFormat";
|
||||||
import utc from "dayjs/plugin/utc";
|
|
||||||
import timezone from "dayjs/plugin/timezone";
|
import timezone from "dayjs/plugin/timezone";
|
||||||
import toArray from "dayjs/plugin/toArray";
|
import toArray from "dayjs/plugin/toArray";
|
||||||
import localizedFormat from "dayjs/plugin/localizedFormat";
|
import utc from "dayjs/plugin/utc";
|
||||||
|
|
||||||
import EventOrganizerMail from "@lib/emails/EventOrganizerMail";
|
import EventOrganizerMail from "@lib/emails/EventOrganizerMail";
|
||||||
|
|
||||||
dayjs.extend(utc);
|
dayjs.extend(utc);
|
||||||
|
@ -42,7 +42,7 @@ export default class EventOrganizerRequestMail extends EventOrganizerMail {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected getSubject(): string {
|
protected getSubject(): string {
|
||||||
const organizerStart: Dayjs = <Dayjs>dayjs(this.calEvent.startTime).tz(this.calEvent.organizer.timeZone);
|
const organizerStart: Dayjs = dayjs(this.calEvent.startTime).tz(this.calEvent.organizer.timeZone);
|
||||||
return `New event request: ${this.calEvent.attendees[0].name} - ${organizerStart.format(
|
return `New event request: ${this.calEvent.attendees[0].name} - ${organizerStart.format(
|
||||||
"LT dddd, LL"
|
"LT dddd, LL"
|
||||||
)} - ${this.calEvent.type}`;
|
)} - ${this.calEvent.type}`;
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import dayjs, { Dayjs } from "dayjs";
|
import dayjs, { Dayjs } from "dayjs";
|
||||||
|
import localizedFormat from "dayjs/plugin/localizedFormat";
|
||||||
import utc from "dayjs/plugin/utc";
|
|
||||||
import timezone from "dayjs/plugin/timezone";
|
import timezone from "dayjs/plugin/timezone";
|
||||||
import toArray from "dayjs/plugin/toArray";
|
import toArray from "dayjs/plugin/toArray";
|
||||||
import localizedFormat from "dayjs/plugin/localizedFormat";
|
import utc from "dayjs/plugin/utc";
|
||||||
|
|
||||||
import EventOrganizerRequestMail from "@lib/emails/EventOrganizerRequestMail";
|
import EventOrganizerRequestMail from "@lib/emails/EventOrganizerRequestMail";
|
||||||
|
|
||||||
dayjs.extend(utc);
|
dayjs.extend(utc);
|
||||||
|
@ -17,7 +17,7 @@ export default class EventOrganizerRequestReminderMail extends EventOrganizerReq
|
||||||
}
|
}
|
||||||
|
|
||||||
protected getSubject(): string {
|
protected getSubject(): string {
|
||||||
const organizerStart: Dayjs = <Dayjs>dayjs(this.calEvent.startTime).tz(this.calEvent.organizer.timeZone);
|
const organizerStart: Dayjs = dayjs(this.calEvent.startTime).tz(this.calEvent.organizer.timeZone);
|
||||||
return `Event request is still waiting: ${this.calEvent.attendees[0].name} - ${organizerStart.format(
|
return `Event request is still waiting: ${this.calEvent.attendees[0].name} - ${organizerStart.format(
|
||||||
"LT dddd, LL"
|
"LT dddd, LL"
|
||||||
)} - ${this.calEvent.type}`;
|
)} - ${this.calEvent.type}`;
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import dayjs, { Dayjs } from "dayjs";
|
import dayjs, { Dayjs } from "dayjs";
|
||||||
|
|
||||||
import EventOrganizerMail from "./EventOrganizerMail";
|
import EventOrganizerMail from "./EventOrganizerMail";
|
||||||
|
|
||||||
export default class EventOrganizerRescheduledMail extends EventOrganizerMail {
|
export default class EventOrganizerRescheduledMail extends EventOrganizerMail {
|
||||||
|
@ -48,7 +49,7 @@ export default class EventOrganizerRescheduledMail extends EventOrganizerMail {
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
protected getNodeMailerPayload(): Record<string, unknown> {
|
protected getNodeMailerPayload(): Record<string, unknown> {
|
||||||
const organizerStart: Dayjs = <Dayjs>dayjs(this.calEvent.startTime).tz(this.calEvent.organizer.timeZone);
|
const organizerStart: Dayjs = dayjs(this.calEvent.startTime).tz(this.calEvent.organizer.timeZone);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
icalEvent: {
|
icalEvent: {
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
import dayjs, { Dayjs } from "dayjs";
|
import dayjs, { Dayjs } from "dayjs";
|
||||||
import EventMail, { AdditionInformation } from "./EventMail";
|
|
||||||
|
|
||||||
import utc from "dayjs/plugin/utc";
|
|
||||||
import timezone from "dayjs/plugin/timezone";
|
|
||||||
import localizedFormat from "dayjs/plugin/localizedFormat";
|
import localizedFormat from "dayjs/plugin/localizedFormat";
|
||||||
|
import timezone from "dayjs/plugin/timezone";
|
||||||
|
import utc from "dayjs/plugin/utc";
|
||||||
|
|
||||||
import { CalendarEvent } from "@lib/calendarClient";
|
import { CalendarEvent } from "@lib/calendarClient";
|
||||||
|
|
||||||
|
import EventMail, { AdditionInformation } from "./EventMail";
|
||||||
|
|
||||||
dayjs.extend(utc);
|
dayjs.extend(utc);
|
||||||
dayjs.extend(timezone);
|
dayjs.extend(timezone);
|
||||||
dayjs.extend(localizedFormat);
|
dayjs.extend(localizedFormat);
|
||||||
|
@ -160,6 +161,6 @@ export default class EventPaymentMail extends EventMail {
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
protected getInviteeStart(): Dayjs {
|
protected getInviteeStart(): Dayjs {
|
||||||
return <Dayjs>dayjs(this.calEvent.startTime).tz(this.calEvent.attendees[0].timeZone);
|
return dayjs(this.calEvent.startTime).tz(this.calEvent.attendees[0].timeZone);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import dayjs, { Dayjs } from "dayjs";
|
import dayjs, { Dayjs } from "dayjs";
|
||||||
import EventMail from "./EventMail";
|
|
||||||
|
|
||||||
import utc from "dayjs/plugin/utc";
|
|
||||||
import timezone from "dayjs/plugin/timezone";
|
|
||||||
import localizedFormat from "dayjs/plugin/localizedFormat";
|
import localizedFormat from "dayjs/plugin/localizedFormat";
|
||||||
|
import timezone from "dayjs/plugin/timezone";
|
||||||
|
import utc from "dayjs/plugin/utc";
|
||||||
|
|
||||||
|
import EventMail from "./EventMail";
|
||||||
|
|
||||||
dayjs.extend(utc);
|
dayjs.extend(utc);
|
||||||
dayjs.extend(timezone);
|
dayjs.extend(timezone);
|
||||||
|
@ -86,6 +86,6 @@ export default class EventRejectionMail extends EventMail {
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
protected getInviteeStart(): Dayjs {
|
protected getInviteeStart(): Dayjs {
|
||||||
return <Dayjs>dayjs(this.calEvent.startTime).tz(this.calEvent.attendees[0].timeZone);
|
return dayjs(this.calEvent.startTime).tz(this.calEvent.attendees[0].timeZone);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
|
import { AdditionInformation } from "@lib/emails/EventMail";
|
||||||
|
|
||||||
import { CalendarEvent } from "../calendarClient";
|
import { CalendarEvent } from "../calendarClient";
|
||||||
|
import { VideoCallData } from "../videoClient";
|
||||||
import EventAttendeeMail from "./EventAttendeeMail";
|
import EventAttendeeMail from "./EventAttendeeMail";
|
||||||
import { getFormattedMeetingId, getIntegrationName } from "./helpers";
|
import { getFormattedMeetingId, getIntegrationName } from "./helpers";
|
||||||
import { VideoCallData } from "../videoClient";
|
|
||||||
import { AdditionInformation } from "@lib/emails/EventMail";
|
|
||||||
|
|
||||||
export default class VideoEventAttendeeMail extends EventAttendeeMail {
|
export default class VideoEventAttendeeMail extends EventAttendeeMail {
|
||||||
videoCallData: VideoCallData;
|
videoCallData: VideoCallData;
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
import { CalendarEvent } from "../calendarClient";
|
|
||||||
import EventOrganizerMail from "./EventOrganizerMail";
|
|
||||||
import { VideoCallData } from "../videoClient";
|
|
||||||
import { getFormattedMeetingId, getIntegrationName } from "./helpers";
|
|
||||||
import { AdditionInformation } from "@lib/emails/EventMail";
|
import { AdditionInformation } from "@lib/emails/EventMail";
|
||||||
|
|
||||||
|
import { CalendarEvent } from "../calendarClient";
|
||||||
|
import { VideoCallData } from "../videoClient";
|
||||||
|
import EventOrganizerMail from "./EventOrganizerMail";
|
||||||
|
import { getFormattedMeetingId, getIntegrationName } from "./helpers";
|
||||||
|
|
||||||
export default class VideoEventOrganizerMail extends EventOrganizerMail {
|
export default class VideoEventOrganizerMail extends EventOrganizerMail {
|
||||||
videoCallData: VideoCallData;
|
videoCallData: VideoCallData;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import { serverConfig } from "../serverConfig";
|
|
||||||
import nodemailer from "nodemailer";
|
import nodemailer from "nodemailer";
|
||||||
|
|
||||||
|
import { serverConfig } from "../serverConfig";
|
||||||
|
|
||||||
export default function createInvitationEmail(data: any, options: any = {}) {
|
export default function createInvitationEmail(data: any, options: any = {}) {
|
||||||
return sendEmail(data, {
|
return sendEmail(data, {
|
||||||
provider: {
|
provider: {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import { serverConfig } from "../serverConfig";
|
|
||||||
import nodemailer, { SentMessageInfo } from "nodemailer";
|
import nodemailer, { SentMessageInfo } from "nodemailer";
|
||||||
|
|
||||||
|
import { serverConfig } from "../serverConfig";
|
||||||
|
|
||||||
const sendEmail = ({ to, subject, text, html = null }): Promise<string | SentMessageInfo> =>
|
const sendEmail = ({ to, subject, text, html = null }): Promise<string | SentMessageInfo> =>
|
||||||
new Promise((resolve, reject) => {
|
new Promise((resolve, reject) => {
|
||||||
const { transport, from } = serverConfig;
|
const { transport, from } = serverConfig;
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
import { CalendarEvent, createEvent, updateEvent } from "@lib/calendarClient";
|
|
||||||
import { Credential } from "@prisma/client";
|
import { Credential } from "@prisma/client";
|
||||||
import async from "async";
|
import async from "async";
|
||||||
import { createMeeting, updateMeeting } from "@lib/videoClient";
|
|
||||||
import prisma from "@lib/prisma";
|
|
||||||
import { LocationType } from "@lib/location";
|
|
||||||
import { v5 as uuidv5 } from "uuid";
|
|
||||||
import merge from "lodash.merge";
|
import merge from "lodash.merge";
|
||||||
|
import { v5 as uuidv5 } from "uuid";
|
||||||
|
|
||||||
|
import { CalendarEvent, createEvent, updateEvent } from "@lib/calendarClient";
|
||||||
import EventAttendeeMail from "@lib/emails/EventAttendeeMail";
|
import EventAttendeeMail from "@lib/emails/EventAttendeeMail";
|
||||||
import EventAttendeeRescheduledMail from "@lib/emails/EventAttendeeRescheduledMail";
|
import EventAttendeeRescheduledMail from "@lib/emails/EventAttendeeRescheduledMail";
|
||||||
|
import { LocationType } from "@lib/location";
|
||||||
|
import prisma from "@lib/prisma";
|
||||||
|
import { createMeeting, updateMeeting } from "@lib/videoClient";
|
||||||
|
|
||||||
export interface EventResult {
|
export interface EventResult {
|
||||||
type: string;
|
type: string;
|
||||||
|
|
|
@ -1,10 +1,13 @@
|
||||||
import { useState, useEffect } from "react";
|
|
||||||
import getSlots from "@lib/slots";
|
|
||||||
import { User, SchedulingType } from "@prisma/client";
|
import { User, SchedulingType } from "@prisma/client";
|
||||||
import dayjs, { Dayjs } from "dayjs";
|
import dayjs, { Dayjs } from "dayjs";
|
||||||
import isBetween from "dayjs/plugin/isBetween";
|
import isBetween from "dayjs/plugin/isBetween";
|
||||||
import utc from "dayjs/plugin/utc";
|
import utc from "dayjs/plugin/utc";
|
||||||
|
import { useState, useEffect } from "react";
|
||||||
|
|
||||||
|
import getSlots from "@lib/slots";
|
||||||
|
|
||||||
import { FreeBusyTime } from "@components/ui/Schedule/Schedule";
|
import { FreeBusyTime } from "@components/ui/Schedule/Schedule";
|
||||||
|
|
||||||
dayjs.extend(isBetween);
|
dayjs.extend(isBetween);
|
||||||
dayjs.extend(utc);
|
dayjs.extend(utc);
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
import { IntegrationCalendar, CalendarApiAdapter, CalendarEvent } from "../../calendarClient";
|
import { Credential } from "@prisma/client";
|
||||||
import { symmetricDecrypt } from "@lib/crypto";
|
import dayjs from "dayjs";
|
||||||
|
import ICAL from "ical.js";
|
||||||
|
import { createEvent, DurationObject, Attendee, Person } from "ics";
|
||||||
import {
|
import {
|
||||||
createAccount,
|
createAccount,
|
||||||
fetchCalendars,
|
fetchCalendars,
|
||||||
|
@ -9,14 +11,14 @@ import {
|
||||||
updateCalendarObject,
|
updateCalendarObject,
|
||||||
deleteCalendarObject,
|
deleteCalendarObject,
|
||||||
} from "tsdav";
|
} from "tsdav";
|
||||||
import { Credential } from "@prisma/client";
|
|
||||||
import ICAL from "ical.js";
|
|
||||||
import { createEvent, DurationObject, Attendee, Person } from "ics";
|
|
||||||
import dayjs from "dayjs";
|
|
||||||
import { v4 as uuidv4 } from "uuid";
|
import { v4 as uuidv4 } from "uuid";
|
||||||
import { stripHtml } from "../../emails/helpers";
|
|
||||||
|
import { symmetricDecrypt } from "@lib/crypto";
|
||||||
import logger from "@lib/logger";
|
import logger from "@lib/logger";
|
||||||
|
|
||||||
|
import { IntegrationCalendar, CalendarApiAdapter, CalendarEvent } from "../../calendarClient";
|
||||||
|
import { stripHtml } from "../../emails/helpers";
|
||||||
|
|
||||||
const log = logger.getChildLogger({ prefix: ["[[lib] apple calendar"] });
|
const log = logger.getChildLogger({ prefix: ["[[lib] apple calendar"] });
|
||||||
|
|
||||||
type EventBusyDate = Record<"start" | "end", Date>;
|
type EventBusyDate = Record<"start" | "end", Date>;
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
import { CalendarApiAdapter, CalendarEvent, IntegrationCalendar } from "../../calendarClient";
|
import { Credential } from "@prisma/client";
|
||||||
import { symmetricDecrypt } from "@lib/crypto";
|
import dayjs from "dayjs";
|
||||||
|
import ICAL from "ical.js";
|
||||||
|
import { Attendee, createEvent, DurationObject, Person } from "ics";
|
||||||
import {
|
import {
|
||||||
createAccount,
|
createAccount,
|
||||||
createCalendarObject,
|
createCalendarObject,
|
||||||
|
@ -9,14 +11,14 @@ import {
|
||||||
getBasicAuthHeaders,
|
getBasicAuthHeaders,
|
||||||
updateCalendarObject,
|
updateCalendarObject,
|
||||||
} from "tsdav";
|
} from "tsdav";
|
||||||
import { Credential } from "@prisma/client";
|
|
||||||
import ICAL from "ical.js";
|
|
||||||
import { Attendee, createEvent, DurationObject, Person } from "ics";
|
|
||||||
import dayjs from "dayjs";
|
|
||||||
import { v4 as uuidv4 } from "uuid";
|
import { v4 as uuidv4 } from "uuid";
|
||||||
import { stripHtml } from "../../emails/helpers";
|
|
||||||
|
import { symmetricDecrypt } from "@lib/crypto";
|
||||||
import logger from "@lib/logger";
|
import logger from "@lib/logger";
|
||||||
|
|
||||||
|
import { CalendarApiAdapter, CalendarEvent, IntegrationCalendar } from "../../calendarClient";
|
||||||
|
import { stripHtml } from "../../emails/helpers";
|
||||||
|
|
||||||
const log = logger.getChildLogger({ prefix: ["[lib] caldav"] });
|
const log = logger.getChildLogger({ prefix: ["[lib] caldav"] });
|
||||||
|
|
||||||
type EventBusyDate = Record<"start" | "end", Date>;
|
type EventBusyDate = Record<"start" | "end", Date>;
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue