From 142cf1834d33fc6642d7460b87ff4ab20e2b8d37 Mon Sep 17 00:00:00 2001 From: Kellar Date: Fri, 6 Dec 2024 14:55:44 +0000 Subject: [PATCH 1/4] Navigate to edit role details when clicking edit with role open --- src/components/Roles/RoleDetails.tsx | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/components/Roles/RoleDetails.tsx b/src/components/Roles/RoleDetails.tsx index d0e88589a..c4a72443c 100644 --- a/src/components/Roles/RoleDetails.tsx +++ b/src/components/Roles/RoleDetails.tsx @@ -135,19 +135,23 @@ export default function RolesDetails({ ), gap: 0, - children: t('editRoles'), - onClick: () => navigate(DAO_ROUTES.rolesEdit.relative(addressPrefix, safe.address)), + children: t('editRole'), + onClick: () => { + navigate( + DAO_ROUTES.rolesEditDetails.relative(addressPrefix, safe.address, roleHat.id), + ); + }, } : undefined } /> - - {roleHat.name} - + + {roleHat.name} + Date: Fri, 6 Dec 2024 15:00:46 +0000 Subject: [PATCH 2/4] Add back button to role/edit detail --- src/components/Roles/RoleDetails.tsx | 14 ++++++++++++-- src/components/Roles/forms/RoleFormTabs.tsx | 11 +++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/src/components/Roles/RoleDetails.tsx b/src/components/Roles/RoleDetails.tsx index c4a72443c..24e942dc7 100644 --- a/src/components/Roles/RoleDetails.tsx +++ b/src/components/Roles/RoleDetails.tsx @@ -1,5 +1,5 @@ -import { Badge, Box, Flex, Grid, GridItem, Icon, Text } from '@chakra-ui/react'; -import { CheckSquare, List, User } from '@phosphor-icons/react'; +import { Badge, Box, Button, Flex, Grid, GridItem, Icon, Text } from '@chakra-ui/react'; +import { ArrowLeft, CheckSquare, List, User } from '@phosphor-icons/react'; import { RefObject, useMemo, useRef } from 'react'; import { useTranslation } from 'react-i18next'; import { useNavigate } from 'react-router-dom'; @@ -145,6 +145,7 @@ export default function RolesDetails({ : undefined } /> + {roleHat.name} +