Skip to content

Commit

Permalink
refactor(console): update tab order on role details page
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoyijun committed Apr 15, 2024
1 parent 077cd85 commit 671f003
Show file tree
Hide file tree
Showing 18 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion packages/console/src/consts/page-tabs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ export enum UserDetailsTabs {
}

export enum RoleDetailsTabs {
Settings = 'settings',
Permissions = 'permissions',
Users = 'users',
M2mApps = 'machine-to-machine-apps',
General = 'general',
}

export enum TenantSettingsTabs {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ export const roles: RouteObject = {
path: ':id',
element: <RoleDetails />,
children: [
{ index: true, element: <Navigate replace to={RoleDetailsTabs.Settings} /> },
{ path: RoleDetailsTabs.Settings, element: <RoleSettings /> },
{ index: true, element: <Navigate replace to={RoleDetailsTabs.Permissions} /> },
{ path: RoleDetailsTabs.Permissions, element: <RolePermissions /> },
{ path: RoleDetailsTabs.Users, element: <RoleUsers /> },
{ path: RoleDetailsTabs.M2mApps, element: <RoleApplications /> },
{ path: RoleDetailsTabs.General, element: <RoleSettings /> },
],
},
],
Expand Down
6 changes: 3 additions & 3 deletions packages/console/src/pages/RoleDetails/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,6 @@ function RoleDetails() {
{t('role_details.delete_description')}
</ConfirmModal>
<TabNav>
<TabNavItem href={`/roles/${data.id}/${RoleDetailsTabs.Settings}`}>
{t('role_details.settings_tab')}
</TabNavItem>
<TabNavItem href={`/roles/${data.id}/${RoleDetailsTabs.Permissions}`}>
{t('role_details.permissions_tab')}
</TabNavItem>
Expand All @@ -133,6 +130,9 @@ function RoleDetails() {
data.type === RoleType.User ? 'role_details.users_tab' : 'role_details.m2m_apps_tab'
)}
</TabNavItem>
<TabNavItem href={`/roles/${data.id}/${RoleDetailsTabs.General}`}>
{t('role_details.general_tab')}
</TabNavItem>
</TabNav>
<Outlet
context={
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const role_details = {
delete_description:
'Dadurch werden die mit dieser Rolle verbundenen Berechtigungen von den betroffenen Benutzern entfernt und die Zuordnung zwischen Rollen, Benutzern und Berechtigungen gelöscht.',
role_deleted: '{{name}} wurde erfolgreich gelöscht.',
settings_tab: 'Einstellungen',
general_tab: 'Allgemein',
users_tab: 'Benutzer',
m2m_apps_tab: 'Maschinen-zu-Maschinen-Apps',
permissions_tab: 'Berechtigungen',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const role_details = {
delete_description:
'Doing so will remove the permissions associated with this role from the affected users and delete the mapping between roles, users, and permissions.',
role_deleted: '{{name}} was successfully deleted.',
settings_tab: 'Settings',
general_tab: 'General',
users_tab: 'Users',
m2m_apps_tab: 'Machine-to-machine apps',
permissions_tab: 'Permissions',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const role_details = {
delete_description:
'Al hacerlo, se eliminarán los permisos asociados con este rol de los usuarios afectados y se eliminará la asignación entre roles, usuarios y permisos.',
role_deleted: '{{name}} fue eliminado correctamente.',
settings_tab: 'Configuración',
general_tab: 'General',
users_tab: 'Usuarios',
m2m_apps_tab: 'Aplicaciones de máquina a máquina',
permissions_tab: 'Permisos',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const role_details = {
delete_description:
'Cela supprimera les autorisations associées à ce rôle des utilisateurs concernés et supprimera la correspondance entre les rôles, les utilisateurs et les autorisations.',
role_deleted: '{{name}} a été supprimé avec succès.',
settings_tab: 'Paramètres',
general_tab: 'Général',
users_tab: 'Utilisateurs',
m2m_apps_tab: 'Applications machine-à-machine',
permissions_tab: 'Autorisations',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const role_details = {
delete_description:
'Ciò cancellerà anche i permessi associati a questo ruolo dagli utenti coinvolti e cancellerà la corrispondenza tra ruoli, utenti e permessi.',
role_deleted: '{{name}} è stato cancellato con successo.',
settings_tab: 'Impostazioni',
general_tab: 'Generale',
users_tab: 'Utenti',
m2m_apps_tab: 'App macchina-to-macchina',
permissions_tab: 'Permessi',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const role_details = {
delete_description:
'これを行うと、このロールに関連付けられた許可が影響を受けるユーザーから削除され、ロール、ユーザー、および許可のマッピングが削除されます。',
role_deleted: '{{name}} は正常に削除されました。',
settings_tab: '設定',
general_tab: '一般',
users_tab: 'ユーザー',
m2m_apps_tab: '機械対機械のアプリ',
permissions_tab: '許可',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const role_details = {
delete_description:
'이렇게 하면 영향을 받는 사용자에게서 이 역할과 관련된 권한이 제거되고 역할, 사용자 및 권한 간의 매핑이 삭제될 걈에요.',
role_deleted: '{{name}}이 성공적으로 삭제되었어요.',
settings_tab: '설정',
general_tab: '일반',
users_tab: '사용자',
m2m_apps_tab: '기계 대 기계 앱',
permissions_tab: '권한',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const role_details = {
delete_description:
'Usunięcie tej roli usunie uprawnienia z nią związane od użytkowników i usunie odwzorowanie między rolami, użytkownikami i uprawnieniami.',
role_deleted: '{{name}} został pomyślnie usunięty.',
settings_tab: 'Ustawienia',
general_tab: 'Ogólne',
users_tab: 'Użytkownicy',
m2m_apps_tab: 'Maszyny do maszyn',
permissions_tab: 'Uprawnienia',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const role_details = {
delete_description:
'Fazê-lo removerá as permissões associadas a este papel dos usuários afetados e excluirá o mapeamento entre papéis, usuários e permissões.',
role_deleted: '{{name}} foi excluído com sucesso.',
settings_tab: 'Configurações',
general_tab: 'Geral',
users_tab: 'Usuários',
m2m_apps_tab: 'Aplicativos máquina-a-máquina',
permissions_tab: 'Permissões',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const role_details = {
delete_description:
'Ao fazê-lo, serão removidas as permissões associadas a esta função dos utilizadores afetados e eliminado o mapeamento entre funções, utilizadores e permissões.',
role_deleted: '{{name}} foi eliminada com sucesso.',
settings_tab: 'Definições',
general_tab: 'Geral',
users_tab: 'Utilizadores',
m2m_apps_tab: 'Aplicações de máquina para máquina',
permissions_tab: 'Permissões',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const role_details = {
delete_description:
'Это действие удалит все соответствующие разрешения данной роли у затронутых пользователей и удалит отображение между ролями, пользователями и разрешениями.',
role_deleted: '{{name}} был успешно удален.',
settings_tab: 'Настройки',
general_tab: 'Общие',
users_tab: 'Пользователи',
m2m_apps_tab: 'Машинные приложения',
permissions_tab: 'Разрешения',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const role_details = {
delete_description:
'Bunu yapmak, rolle ilişkili izinleri etkilenen kullanıcılardan kaldırır ve roller, kullanıcılar ve izinler arasındaki eşleştirmeyi siler.',
role_deleted: '{{name}} başarıyla silindi.',
settings_tab: 'Ayarlar',
general_tab: 'Genel',
users_tab: 'Kullanıcılar',
m2m_apps_tab: 'Makine-makine uygulamaları',
permissions_tab: 'İzinler',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const role_details = {
delete_description:
'这样做将从受影响的用户中删除与该角色关联的权限,并删除角色、用户和权限之间的映射关系。',
role_deleted: '{{name}} 已成功删除。',
settings_tab: '设置',
general_tab: '常规',
users_tab: '用户',
m2m_apps_tab: '机器对机器应用',
permissions_tab: '权限',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const role_details = {
delete_description:
'這樣做將從受影響的用戶中刪除與該角色關聯的權限,並刪除角色、用戶和權限之間的映射關聯。',
role_deleted: '{{name}} 已成功刪除。',
settings_tab: '設置',
general_tab: '常規',
users_tab: '用戶',
m2m_apps_tab: '機器對機器應用',
permissions_tab: '權限',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const role_details = {
delete_description:
'這樣做將從受影響的用戶中刪除與該角色關聯的權限,並刪除角色、用戶和權限之間的映射關係。',
role_deleted: '{{name}} 已成功刪除。',
settings_tab: '設置',
general_tab: '常規',
users_tab: '用戶',
m2m_apps_tab: '機器對機器應用',
permissions_tab: '權限',
Expand Down

0 comments on commit 671f003

Please sign in to comment.