From 1f221090f2ccf029bd12cc2ff029bf0a1dc404ef Mon Sep 17 00:00:00 2001 From: Piyush Kumar Date: Thu, 14 Mar 2024 10:16:27 +0530 Subject: [PATCH] updated structure --- .../settings+/user-management/handle-user.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/apps/console/routes/_main+/$account+/settings+/user-management/handle-user.tsx b/src/apps/console/routes/_main+/$account+/settings+/user-management/handle-user.tsx index 689c03856..b2ebc1e9e 100644 --- a/src/apps/console/routes/_main+/$account+/settings+/user-management/handle-user.tsx +++ b/src/apps/console/routes/_main+/$account+/settings+/user-management/handle-user.tsx @@ -21,9 +21,9 @@ type IDialog = IDialogBase; const validRoles = (role: string): Role => { switch (role) { - case 'owner': + case 'account_owner': return 'account_owner' as Role; - case 'member': + case 'account_member': return 'account_member' as Role; default: throw new Error(`invalid role ${role}`); @@ -40,11 +40,11 @@ const Root = (props: IDialog) => { initialValues: isUpdate ? { email: props?.data.email || '', - role: mapRoleToDisplayName(props?.data.role) || 'member', + role: props?.data.role || 'account_member', } : { email: '', - role: 'member', + role: 'account_member', }, validationSchema: Yup.object({ email: Yup.string().required().email(), @@ -80,7 +80,7 @@ const Root = (props: IDialog) => { }, }); - const roles: string[] = ['owner', 'member']; + const roles: string[] = ['account_owner', 'account_member']; return ( @@ -109,7 +109,7 @@ const Root = (props: IDialog) => { {roles.map((role) => { return ( - {role} + {mapRoleToDisplayName(role)} ); })}