From fd7f46cbe2aad0c08589e9dd425534c3953e620c Mon Sep 17 00:00:00 2001 From: wbuezas Date: Tue, 28 May 2024 18:33:18 -0300 Subject: [PATCH] several changes --- src/pages/Account/AccountFilter.vue | 8 ++++---- src/pages/Account/AccountList.vue | 13 +++++++++++++ src/pages/Account/locale/en.yml | 7 +++---- src/pages/Account/locale/es.yml | 7 +++---- 4 files changed, 23 insertions(+), 12 deletions(-) diff --git a/src/pages/Account/AccountFilter.vue b/src/pages/Account/AccountFilter.vue index 0a93afab2..0cddd3253 100644 --- a/src/pages/Account/AccountFilter.vue +++ b/src/pages/Account/AccountFilter.vue @@ -32,7 +32,7 @@ const rolesOptions = ref([]); > @@ -40,7 +40,7 @@ const rolesOptions = ref([]); import { useI18n } from 'vue-i18n'; import { useRouter } from 'vue-router'; +import { computed } from 'vue'; import VnPaginate from 'src/components/ui/VnPaginate.vue'; import VnSearchbar from 'components/ui/VnSearchbar.vue'; @@ -11,11 +12,15 @@ import AccountFilter from './AccountFilter.vue'; import { useSummaryDialog } from 'src/composables/useSummaryDialog'; import { useStateStore } from 'stores/useStateStore'; +import { useRole } from 'src/composables/useRole'; const stateStore = useStateStore(); const router = useRouter(); const { t } = useI18n(); const { viewSummary } = useSummaryDialog(); +const roleState = useRole(); + +const isItManagement = computed(() => roleState.hasAny(['itManagement'])); const filter = { fields: ['id', 'nickname', 'name', 'role'], @@ -48,6 +53,8 @@ const navigate = (event, id) => { return window.open(`${getApiUrl()}/#/account/${id}/summary`); router.push({ path: `/account/${id}` }); }; + +const redirectToItemCreate = () => router.push({ name: 'AccountCreate' }); + + + + {{ t('account.card.newUser') }} + + diff --git a/src/pages/Account/locale/en.yml b/src/pages/Account/locale/en.yml index a110c52fd..6cad60a0a 100644 --- a/src/pages/Account/locale/en.yml +++ b/src/pages/Account/locale/en.yml @@ -15,6 +15,7 @@ account: privileges: Privileges mailAlias: Mail Alias mailForwarding: Mail Forwarding + accountCreate: New user card: name: Name nickname: User @@ -22,6 +23,8 @@ account: email: Email alias: Alias lang: Language + roleFk: Role + newUser: New user actions: setPassword: Set password disableAccount: @@ -32,10 +35,6 @@ account: sync: Sync delete: Delete search: Search user - filterPanel: - name: Name - nickname: User - roleFk: Role role: pageTitles: inheritedRoles: Inherited Roles diff --git a/src/pages/Account/locale/es.yml b/src/pages/Account/locale/es.yml index aeff20365..f3b83adbc 100644 --- a/src/pages/Account/locale/es.yml +++ b/src/pages/Account/locale/es.yml @@ -15,6 +15,7 @@ account: privileges: Privilegios mailAlias: Alias de correo mailForwarding: Reenvío de correo + accountCreate: Nuevo usuario card: nickname: Usuario name: Nombre @@ -22,6 +23,8 @@ account: email: Mail alias: Alias lang: dioma + roleFk: Rol + newUser: Nuevo usuario actions: setPassword: Establecer contraseña disableAccount: @@ -41,10 +44,6 @@ account: title: El usuario será eliminado subtitle: ¿Seguro que quieres continuar? search: Buscar usuario - filterPanel: - name: Nombre - nickname: Usuario - roleFk: Rol role: pageTitles: inheritedRoles: Roles heredados