diff --git a/ui/litellm-dashboard/src/components/CreateUserButton.tsx b/ui/litellm-dashboard/src/components/CreateUserButton.tsx index a57ea763b6c..c5bbef3ee17 100644 --- a/ui/litellm-dashboard/src/components/CreateUserButton.tsx +++ b/ui/litellm-dashboard/src/components/CreateUserButton.tsx @@ -6,12 +6,13 @@ import { FormField } from "@/components/shared/form/FormField"; import { Button } from "@/components/ui/button"; import { Checkbox } from "@/components/ui/checkbox"; import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "@/components/ui/collapsible"; +import { Dialog, DialogContent, DialogHeader, DialogTitle } from "@/components/ui/dialog"; import { Input } from "@/components/ui/input"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"; import { Textarea } from "@/components/ui/textarea"; import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip"; import { Alert, AlertDescription, AlertTitle } from "@/components/shared/Alert"; -import { Modal, Typography } from "antd"; +import { Typography } from "antd"; import { ChevronRight, CircleHelp, Info, UserPlus } from "lucide-react"; import React, { useEffect, useState } from "react"; import { useForm } from "react-hook-form"; @@ -328,110 +329,108 @@ export const CreateUserButton: React.FC = ({ - setIsModalVisible(false)} - onCancel={handleCancel} - > -
-

Create a User who can own keys

- -
- -
- - {userEmailField} - {roleField( - labelWithHint( - "Global Proxy Role", - "This role is independent of any team/org specific roles. Configure Team / Organization Admins in the Settings", - ), - )} - {teamField} - - - {({ id, value, onChange }) => ( - + !open && handleCancel()}> + + + Invite User + +
+

Create a User who can own keys

+ +
+ + + + {userEmailField} + {roleField( + labelWithHint( + "Global Proxy Role", + "This role is independent of any team/org specific roles. Configure Team / Organization Admins in the Settings", + ), )} -
+ {teamField} - {metadataField} - {sendInviteEmailField} + + {({ id, value, onChange }) => ( + + )} + - - - - Personal Key Creation - - - - {({ value, onChange }) => ( - ({ label: getModelDisplayName(model), value: model })), - ]} - value={value ?? []} - onValueChange={onChange} - placeholder="Select models" - /> - )} - - - -
+ {metadataField} + {sendInviteEmailField} -
- -
-
-
-
+ + + + Personal Key Creation + + + + {({ value, onChange }) => ( + ({ label: getModelDisplayName(model), value: model })), + ]} + value={value ?? []} + onValueChange={onChange} + placeholder="Select models" + /> + )} + + + + + +
+ +
+ + + + {apiuser && (