Tweak user management form

This commit is contained in:
2025-09-01 18:55:16 -04:00
parent 7938c50762
commit a0c442d1af
2 changed files with 3 additions and 18 deletions

View File

@@ -68,13 +68,11 @@ export function PermissionSelector({
return (
<div className="space-y-4">
<h3 className="text-lg font-medium">Permissions</h3>
<p className="text-sm text-muted-foreground mb-4">
Select the permissions you want to grant to this user
</p>
{permissionsByCategory.map(category => (
<Card key={category.category} className="mb-4">
<CardHeader className="pb-2 flex flex-row items-center justify-between">
<CardHeader className="pb-2 flex flex-row items-center justify-between pt-2">
<CardTitle className="text-md">{category.category}</CardTitle>
<Button
type="button"

View File

@@ -232,9 +232,6 @@ export function UserForm({ user, permissions, onSave, onCancel }: UserFormProps)
<div className="space-y-6">
<div>
<h2 className="text-2xl font-bold mb-2">{user ? "Edit User" : "Add New User"}</h2>
<p className="text-muted-foreground">
{user ? "Update the user's information and permissions" : "Create a new user account"}
</p>
</div>
{formError && (
@@ -320,12 +317,6 @@ export function UserForm({ user, permissions, onSave, onCancel }: UserFormProps)
</Select>
)}
</FormControl>
<FormDescription>
{form.watch("is_admin")
? "Admin users can view all chat rooms regardless of this setting"
: "Connect this user to a Rocket Chat account to control their chat access"
}
</FormDescription>
<FormMessage />
</FormItem>
)}
@@ -344,11 +335,7 @@ export function UserForm({ user, permissions, onSave, onCancel }: UserFormProps)
placeholder={user ? "Leave blank to keep current password" : ""}
/>
</FormControl>
{user && (
<FormDescription>
Leave blank to keep the current password
</FormDescription>
)}
<FormMessage />
</FormItem>
)}