Account Submodule #412
|
@ -32,7 +32,7 @@ const rolesOptions = ref([]);
|
|||
>
|
||||
<template #tags="{ tag, formatFn }">
|
||||
<div class="q-gutter-x-xs">
|
||||
<strong>{{ t(`account.filterPanel.${tag.label}`) }}: </strong>
|
||||
<strong>{{ t(`account.card.${tag.label}`) }}: </strong>
|
||||
<span>{{ formatFn(tag.value) }}</span>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -40,7 +40,7 @@ const rolesOptions = ref([]);
|
|||
<QItem class="q-my-sm">
|
||||
<QItemSection>
|
||||
<VnInput
|
||||
:label="t('account.filterPanel.name')"
|
||||
:label="t('account.card.name')"
|
||||
v-model="params.name"
|
||||
|
||||
lazy-rules
|
||||
is-outlined
|
||||
|
@ -50,7 +50,7 @@ const rolesOptions = ref([]);
|
|||
<QItem class="q-my-sm">
|
||||
<QItemSection>
|
||||
<VnInput
|
||||
:label="t('account.filterPanel.nickname')"
|
||||
:label="t('account.card.nickname')"
|
||||
v-model="params.nickname"
|
||||
lazy-rules
|
||||
is-outlined
|
||||
|
@ -60,7 +60,7 @@ const rolesOptions = ref([]);
|
|||
<QItem class="q-mb-sm">
|
||||
<QItemSection>
|
||||
<VnSelect
|
||||
:label="t('account.filterPanel.roleFk')"
|
||||
:label="t('account.card.nickname')"
|
||||
v-model="params.roleFk"
|
||||
@update:model-value="searchFn()"
|
||||
:options="rolesOptions"
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<script setup>
|
||||
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' });
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -119,5 +126,11 @@ const navigate = (event, id) => {
|
|||
</template>
|
||||
</VnPaginate>
|
||||
</div>
|
||||
<QPageSticky v-if="isItManagement" :offset="[20, 20]">
|
||||
<QBtn @click="redirectToItemCreate()" color="primary" fab icon="add" />
|
||||
<QTooltip class="text-no-wrap">
|
||||
{{ t('account.card.newUser') }}
|
||||
</QTooltip>
|
||||
</QPageSticky>
|
||||
</QPage>
|
||||
</template>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Revisar