diff --git a/src/components/LeftMenuItem.vue b/src/components/LeftMenuItem.vue index 5e0ee461f..d12fb8428 100644 --- a/src/components/LeftMenuItem.vue +++ b/src/components/LeftMenuItem.vue @@ -20,7 +20,13 @@ const itemComputed = computed(() => { }); - + @@ -33,3 +39,9 @@ const itemComputed = computed(() => { + + diff --git a/src/pages/Account/Role/AccountRoles.vue b/src/pages/Account/Role/AccountRoles.vue index 7018f4a17..2109a3ab4 100644 --- a/src/pages/Account/Role/AccountRoles.vue +++ b/src/pages/Account/Role/AccountRoles.vue @@ -6,14 +6,17 @@ import { toDate } from 'filters/index'; import VnPaginate from 'src/components/ui/VnPaginate.vue'; import VnLv from 'src/components/ui/VnLv.vue'; import CardList from 'src/components/ui/CardList.vue'; -import VnUserLink from 'src/components/ui/VnUserLink.vue'; import AccountSummary from '../Card/AccountSummary.vue'; +import { ref } from 'vue'; +import RoleForm from './Card/RoleForm.vue'; const stateStore = useStateStore(); const router = useRouter(); const { t } = useI18n(); -const redirectToCreateView = () => { - router.push({ name: 'RoleCreate' }); +const roleCreateDialogRef = ref(null); + +const openCreateModal = () => { + roleCreateDialogRef.value.show(); }; function getApiUrl() { return new URL(window.location).origin; @@ -43,12 +46,15 @@ function navigate(event, id) { v-for="row of rows" > - - - + + + + + + + + + - - - - {{ t('role.pageTitles.roleCreate') }} - + + + {{ t('account.pageTitles.newRole') }} + diff --git a/src/pages/Account/Role/Card/RoleForm.vue b/src/pages/Account/Role/Card/RoleForm.vue index 6143239d9..0fef124c6 100644 --- a/src/pages/Account/Role/Card/RoleForm.vue +++ b/src/pages/Account/Role/Card/RoleForm.vue @@ -1,7 +1,7 @@ - - - + @@ -40,5 +38,10 @@ const defaultInitialData = { - + + + + es: + Create role: Crear role + diff --git a/src/pages/Account/locale/en.yml b/src/pages/Account/locale/en.yml index 993299e75..dd0955d91 100644 --- a/src/pages/Account/locale/en.yml +++ b/src/pages/Account/locale/en.yml @@ -11,7 +11,7 @@ account: connections: Connections inheritedRoles: Inherited Roles subRoles: Sub Roles - roleCreate: New role + newRole: New role privileges: Privileges mailAlias: Mail Alias mailForwarding: Mail Forwarding diff --git a/src/pages/Account/locale/es.yml b/src/pages/Account/locale/es.yml index c0bdaa151..95fa3bc36 100644 --- a/src/pages/Account/locale/es.yml +++ b/src/pages/Account/locale/es.yml @@ -10,7 +10,7 @@ account: acls: ACLs connections: Conexiones inheritedRoles: Roles heredados - roleCreate: Nuevo rol + newRole: Nuevo rol subRoles: Subroles privileges: Privilegios mailAlias: Alias de correo @@ -46,7 +46,7 @@ role: pageTitles: inheritedRoles: Roles heredados subRoles: Subroles - roleCreate: Nuevo rol + newRole: Nuevo rol card: description: DescripciĆ³n id: Idd diff --git a/src/router/modules/account.js b/src/router/modules/account.js index 6dc2825b3..0f38d8a40 100644 --- a/src/router/modules/account.js +++ b/src/router/modules/account.js @@ -54,17 +54,6 @@ export default { }, component: () => import('src/pages/Account/Role/AccountRoles.vue'), }, - - { - name: 'RoleCreate', - path: 'create', - meta: { - title: 'roleCreate', - icon: 'add', - }, - component: () => import('src/pages/Account/Role/Card/RoleForm.vue'), - }, - { path: 'alias', name: 'AccountAlias',