Skip to content

Commit e61d3eb

Browse files
authored
fix: show pre-selected user after role selector navigation (#1605)
* fix: show pre-selected user after role selector navigation * chore: changelog * chore: revert changelog change
1 parent 0067926 commit e61d3eb

File tree

2 files changed

+37
-29
lines changed

2 files changed

+37
-29
lines changed

src/components/overlays/AddAppUserRoles/UserListContent.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,19 @@ export default function UserListContent() {
7777
{
7878
field: 'name',
7979
headerName: t('global.field.name'),
80-
flex: 4,
80+
width: 300,
8181
valueGetter: (_value_, row: TenantUser) =>
8282
`${row.firstName} ${row.lastName}`,
8383
},
84-
{ field: 'email', headerName: t('global.field.email'), flex: 5 },
84+
{
85+
field: 'email',
86+
headerName: t('global.field.email'),
87+
width: 300,
88+
},
8589
{
8690
field: 'status',
8791
headerName: t('global.field.status'),
88-
flex: 2,
92+
width: 200,
8993
renderCell: ({ value: status }) => {
9094
return (
9195
<StatusTag color="label" label={t(`global.field.${status}`)} />

src/components/overlays/AddAppUserRoles/index.tsx

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -116,36 +116,40 @@ export default function AddAppUserRoles() {
116116
<div style={{ width: '40%', margin: '0 auto 40px' }}>
117117
<Stepper list={AddStepsList} showSteps={2} activeStep={activeStep} />
118118
</div>
119-
{activeStep === 1 && (
120-
<Box sx={{ margin: '50px 110px' }}>
121-
<Typography variant="label3">
122-
{t('content.addUserRight.selectUsersDescription')}
119+
<Box
120+
sx={{
121+
margin: '50px 110px',
122+
display: activeStep === 1 ? 'block' : 'none',
123+
}}
124+
>
125+
<Typography variant="label3">
126+
{t('content.addUserRight.selectUsersDescription')}
127+
</Typography>
128+
<Box sx={{ mt: '46px' }}>
129+
<UserListContent />
130+
</Box>
131+
</Box>
132+
<Box
133+
sx={{
134+
margin: '50px 110px',
135+
display: activeStep === 2 ? 'block' : 'none',
136+
}}
137+
>
138+
<Typography variant="label3">
139+
{t('content.addUserRight.addRolesDescription')}
140+
</Typography>
141+
<Box sx={{ mt: '46px' }}>
142+
<Typography variant="label1">
143+
{t('content.addUserRight.selectRoles')}
123144
</Typography>
124-
<Box sx={{ mt: '46px' }}>
125-
<UserListContent />
126-
</Box>
127145
</Box>
128-
)}
129-
{activeStep === 2 && (
130-
<Box sx={{ margin: '50px 110px' }}>
131-
<Typography variant="label3">
132-
{t('content.addUserRight.addRolesDescription')}
146+
<Box sx={{ mb: '30px' }}>
147+
<Typography variant="body2">
148+
<a href="">{`> ${t('content.addUserRight.roleDescriptions')}`}</a>
133149
</Typography>
134-
<Box sx={{ mt: '46px' }}>
135-
<Typography variant="label1">
136-
{t('content.addUserRight.selectRoles')}
137-
</Typography>
138-
</Box>
139-
<Box sx={{ mb: '30px' }}>
140-
<Typography variant="body2">
141-
<a href="">{`> ${t(
142-
'content.addUserRight.roleDescriptions'
143-
)}`}</a>
144-
</Typography>
145-
</Box>
146-
<AppRoles />
147150
</Box>
148-
)}
151+
<AppRoles />
152+
</Box>
149153
</DialogContent>
150154

151155
<DialogActions>

0 commit comments

Comments
 (0)