Merge pull request #3593 from Infisical/ENG-2742

Fixed project roles not being editable in some cases
This commit is contained in:
x032205
2025-05-13 17:10:23 -04:00
committed by GitHub
3 changed files with 4 additions and 4 deletions

View File

@@ -19,7 +19,7 @@ export type TProjectRole = {
id: string;
createdAt: string;
updatedAt: string;
description?: string;
description?: string | null;
permissions: TProjectPermission[];
};
@@ -76,7 +76,7 @@ export type TDeleteOrgRoleDTO = {
export type TCreateProjectRoleDTO = {
projectId: string;
name: string;
description?: string;
description?: string | null;
slug: string;
permissions: TProjectPermission[];
};

View File

@@ -190,7 +190,7 @@ const ConditionSchema = z
export const projectRoleFormSchema = z.object({
name: z.string().trim(),
description: z.string().trim().optional(),
description: z.string().trim().nullish(),
slug: z
.string()
.trim()

View File

@@ -62,7 +62,7 @@ export const RoleModal = ({ popUp, handlePopUpToggle }: Props) => {
if (role) {
reset({
name: role.name,
description: role.description,
description: role.description || "",
slug: role.slug
});
} else {