+1








1b5d50c45c
Co-authored-by: Alex van Andel <me@alexvanandel.com> Co-authored-by: Keith Williams <keithwillcode@gmail.com> Co-authored-by: CarinaWolli <wollencarina@gmail.com> Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com> Co-authored-by: Kiran K <mailtokirankk@gmail.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com> Co-authored-by: zomars <zomars@me.com> Co-authored-by: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com>
35 lines
1.1 KiB
TypeScript
35 lines
1.1 KiB
TypeScript
import { CreateANewTeamForm } from "@calcom/features/ee/teams/components";
|
|
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
|
import { trpc } from "@calcom/trpc/react";
|
|
import { Dialog, DialogContent } from "@calcom/ui";
|
|
|
|
interface CreateTeamDialogProps {
|
|
open: boolean;
|
|
onOpenChange: (open: boolean) => void;
|
|
}
|
|
|
|
const CreateTeamDialog = (props: CreateTeamDialogProps) => {
|
|
const { open, onOpenChange } = props;
|
|
const { t } = useLocale();
|
|
|
|
const utils = trpc.useContext();
|
|
return (
|
|
<Dialog open={open} onOpenChange={onOpenChange}>
|
|
<DialogContent type="creation" title={t("create_new_team")} description={t("team_will_be_under_org")}>
|
|
<CreateANewTeamForm
|
|
inDialog
|
|
submitLabel="Create"
|
|
onCancel={() => onOpenChange(false)}
|
|
onSuccess={async () => {
|
|
await utils.viewer.dsync.teamGroupMapping.get.invalidate();
|
|
await utils.viewer.teams.list.invalidate();
|
|
onOpenChange(false);
|
|
}}
|
|
/>
|
|
</DialogContent>
|
|
</Dialog>
|
|
);
|
|
};
|
|
|
|
export default CreateTeamDialog;
|