This commit is contained in:
sean-brydon
2025-10-03 11:03:07 +00:00
committed by GitHub
parent c11814c342
commit 3e31945157
3 changed files with 9 additions and 4 deletions
@@ -65,7 +65,7 @@ export function RoleSheet({
onOpenChange,
teamId,
scope = Scope.Organization,
isPrivate = false
isPrivate = false,
}: RoleSheetProps) {
const { t } = useLocale();
const router = useRouter();
@@ -191,6 +191,7 @@ export function RoleSheet({
{...form.register("name")}
placeholder={t("role_name_placeholder")}
disabled={isSystemRole}
maxLength={50}
/>
</div>
<RoleColorPicker
@@ -208,10 +209,13 @@ export function RoleSheet({
<Label className="mb-0">{t("permissions")}</Label>
<div className="flex items-center gap-2">
<Checkbox
id="advanced_mode_checkbox"
checked={form.watch("isAdvancedMode")}
onCheckedChange={(checked: boolean) => form.setValue("isAdvancedMode", checked)}
/>
<span className="text-sm">{t("advanced")}</span>
<label htmlFor="advanced_mode_checkbox" className="text-sm">
{t("advanced")}
</label>
</div>
</div>
<TextField
@@ -3464,6 +3464,7 @@
"roles_and_permissions_description": "Manage roles and permissions for your organization",
"learn_more_permissions": "Learn more about how Permissions work",
"role_name": "Role name",
"role_name_required": "Role name is required",
"role_name_placeholder": "e.g. Sales Team, Support Staff",
"role_description": "Role description",
"role_description_placeholder": "Describe what this role is for and what permissions it needs",
@@ -3502,7 +3503,7 @@
"role_created_successfully": "Role created successfully",
"role_updated_successfully": "Role updated successfully",
"delete_role": "Delete role",
"confirm_delete_role": "Are you sure you want to delete this role? This action cannot be undone.",
"confirm_delete_role": "Are you sure you want to delete role: {{roleName}}. This action cannot be undone.",
"role_deleted_successfully": "Role deleted successfully",
"error_creating_role": "Error creating role",
"error_updating_role": "Error updating role",
@@ -19,7 +19,7 @@ const permissionStringSchema = z.custom<PermissionString>((val) => {
// Schema for creating/updating roles
const roleInputSchema = z.object({
teamId: z.number(),
name: z.string().min(1),
name: z.string().min(1).max(50),
description: z.string().optional(),
color: z.string().optional(),
permissions: z.array(permissionStringSchema),