feat: disable workflows and webhooks for orgs + UI changes [CAL-1873] (#9504)
Co-authored-by: sean-brydon <[email protected]> Co-authored-by: Leo Giovanetti <[email protected]> Co-authored-by: Joe Au-Yeung <[email protected]> Co-authored-by: Udit Takkar <[email protected]> Co-authored-by: Hariom Balhara <[email protected]> Co-authored-by: Udit Takkar <[email protected]> Co-authored-by: CarinaWolli <[email protected]> Co-authored-by: zomars <[email protected]> Co-authored-by: Efraín Rochín <[email protected]>
This commit is contained in:
20 files changed
+362
-381
No files matched your search
@@ -12,7 +12,7 @@ import { Tooltip } from "../tooltip";
|
||||
|
||||
export type AvatarProps = {
|
||||
className?: string;
|
||||
size: "xs" | "xsm" | "sm" | "md" | "mdLg" | "lg" | "xl";
|
||||
size: "xxs" | "xs" | "xsm" | "sm" | "md" | "mdLg" | "lg" | "xl";
|
||||
imageSrc?: Maybe<string>;
|
||||
title?: string;
|
||||
alt: string;
|
||||
@@ -24,6 +24,7 @@ export type AvatarProps = {
|
||||
};
|
||||
|
||||
const sizesPropsBySize = {
|
||||
xxs: "w-3.5 h-3.5 min-w-3.5 min-h-3.5", // 14px
|
||||
xs: "w-4 h-4 min-w-4 min-h-4 max-h-4", // 16px
|
||||
xsm: "w-5 h-5 min-w-5 min-h-5", // 20px
|
||||
sm: "w-6 h-6 min-w-6 min-h-6", // 24px
|
||||
|
||||
@@ -3,7 +3,9 @@ import { trpc } from "@calcom/trpc/react";
|
||||
import type { CreateBtnProps } from "./CreateButton";
|
||||
import { CreateButton } from "./CreateButton";
|
||||
|
||||
export function CreateButtonWithTeamsList(props: Omit<CreateBtnProps, "options">) {
|
||||
export function CreateButtonWithTeamsList(
|
||||
props: Omit<CreateBtnProps, "options"> & { onlyShowWithTeams?: boolean; onlyShowWithNoTeams?: boolean }
|
||||
) {
|
||||
const query = trpc.viewer.teamsAndUserProfilesQuery.useQuery();
|
||||
if (!query.data) return null;
|
||||
|
||||
@@ -18,5 +20,9 @@ export function CreateButtonWithTeamsList(props: Omit<CreateBtnProps, "options">
|
||||
};
|
||||
});
|
||||
|
||||
if (props.onlyShowWithTeams && teamsAndUserProfiles.length < 2) return null;
|
||||
|
||||
if (props.onlyShowWithNoTeams && teamsAndUserProfiles.length > 1) return null;
|
||||
|
||||
return <CreateButton {...props} options={teamsAndUserProfiles} />;
|
||||
}
|
||||
Reference in new issue
Block a user