[Feat] Bulk Invite of Users + Google Workspace (#8969)
* Base UI work * Bulk invite users * WIP workspace oauth implementation * Seperate components - add existing gcal check * Move callback session to getServerSession * Implementation of state redirect back to teams on login * Add callback to populate text field * Change error message * Redirect from callback and open modal * Fix bulk translations * Fix translations for google button * Delete Query * Feature flag this * Update packages/trpc/server/routers/viewer/teams/inviteMember.handler.ts * Check if Gcal in installed globally * Add new router * Add missing [trpc] route * Feedback * Update packages/trpc/server/routers/viewer/googleWorkspace/googleWorkspace.handler.ts * Typefixes * More typefixes --------- Co-authored-by: Hariom Balhara <[email protected]> Co-authored-by: zomars <[email protected]>
This commit is contained in:
22 files changed
+738
-170
No files matched your search
@@ -1,6 +1,6 @@
|
||||
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
||||
import { useRouter } from "next/router";
|
||||
import type { ReactNode } from "react";
|
||||
import type { PropsWithChildren, ReactNode } from "react";
|
||||
import React, { useState } from "react";
|
||||
|
||||
import classNames from "@calcom/lib/classNames";
|
||||
@@ -61,7 +61,7 @@ type DialogContentProps = React.ComponentProps<(typeof DialogPrimitive)["Content
|
||||
size?: "xl" | "lg" | "md";
|
||||
type?: "creation" | "confirmation";
|
||||
title?: string;
|
||||
description?: string | JSX.Element | undefined;
|
||||
description?: string | JSX.Element | null;
|
||||
closeText?: string;
|
||||
actionDisabled?: boolean;
|
||||
Icon?: SVGComponent;
|
||||
@@ -134,8 +134,11 @@ export function DialogHeader(props: DialogHeaderProps) {
|
||||
);
|
||||
}
|
||||
|
||||
export function DialogFooter(props: { children: ReactNode }) {
|
||||
return <div className="mt-7 flex justify-end space-x-2 rtl:space-x-reverse ">{props.children}</div>;
|
||||
// TODO: add divider
|
||||
export function DialogFooter(props: PropsWithChildren<{ showDivider?: boolean }>) {
|
||||
return (
|
||||
<div className={classNames("mt-7 flex justify-end space-x-2 rtl:space-x-reverse")}>{props.children}</div>
|
||||
);
|
||||
}
|
||||
|
||||
DialogContent.displayName = "DialogContent";
|
||||
|
||||
@@ -6,7 +6,13 @@ import { classNames } from "@calcom/lib";
|
||||
import { Tooltip } from "@calcom/ui";
|
||||
|
||||
interface ToggleGroupProps extends Omit<RadixToggleGroup.ToggleGroupSingleProps, "type"> {
|
||||
options: { value: string; label: string | ReactNode; disabled?: boolean; tooltip?: string }[];
|
||||
options: {
|
||||
value: string;
|
||||
label: string | ReactNode;
|
||||
disabled?: boolean;
|
||||
tooltip?: string;
|
||||
iconLeft?: ReactNode;
|
||||
}[];
|
||||
isFullWidth?: boolean;
|
||||
}
|
||||
|
||||
@@ -80,7 +86,10 @@ export const ToggleGroup = ({ options, onValueChange, isFullWidth, ...props }: T
|
||||
}
|
||||
return node;
|
||||
}}>
|
||||
{option.label}
|
||||
<div className="item-center flex justify-center ">
|
||||
{option.iconLeft && <span className="mr-2 flex h-4 w-4 items-center">{option.iconLeft}</span>}
|
||||
{option.label}
|
||||
</div>
|
||||
</RadixToggleGroup.Item>
|
||||
</OptionalTooltipWrapper>
|
||||
))}
|
||||
|
||||
Reference in new issue
Block a user