-
Notifications
You must be signed in to change notification settings - Fork 11k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: ✨ Implement "user created" step for new user form
Implemented a new step for the users page user creation contextual bar in which the user will be able to choose from creating another user right away or finishing the user creation process and being redirected to the most recently created user. Also fixed some tests, created new translations and changed some logic to improve the roles filter.
- Loading branch information
Showing
15 changed files
with
129 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { Button, ButtonGroup, ContextualbarFooter } from '@rocket.chat/fuselage'; | ||
import { useRouter } from '@rocket.chat/ui-contexts'; | ||
import React from 'react'; | ||
import { useTranslation } from 'react-i18next'; | ||
|
||
import { ContextualbarEmptyContent } from '../../../components/Contextualbar'; | ||
|
||
const AdminUserCreated = ({ uid }: { uid: string }) => { | ||
const { t } = useTranslation(); | ||
const router = useRouter(); | ||
|
||
return ( | ||
<> | ||
<ContextualbarEmptyContent icon='user' title={t('You_have_created_user', { count: 1 })} /> | ||
<ContextualbarFooter> | ||
<ButtonGroup stretch> | ||
<Button type='reset' w='50%' onClick={() => router.navigate(`/admin/users/new`)}> | ||
{t('Add_more_users')} | ||
</Button> | ||
<Button primary w='50%' onClick={() => router.navigate(`/admin/users/info/${uid}`)}> | ||
{t('Done')} | ||
</Button> | ||
</ButtonGroup> | ||
</ContextualbarFooter> | ||
</> | ||
); | ||
}; | ||
|
||
export default AdminUserCreated; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.