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
@@ -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