Account Submodule #412
|
@ -32,7 +32,7 @@ const rolesOptions = ref([]);
|
||||||
>
|
>
|
||||||
<template #tags="{ tag, formatFn }">
|
<template #tags="{ tag, formatFn }">
|
||||||
<div class="q-gutter-x-xs">
|
<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>
|
<span>{{ formatFn(tag.value) }}</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -40,7 +40,7 @@ const rolesOptions = ref([]);
|
||||||
<QItem class="q-my-sm">
|
<QItem class="q-my-sm">
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnInput
|
<VnInput
|
||||||
:label="t('account.filterPanel.name')"
|
:label="t('account.card.name')"
|
||||||
v-model="params.name"
|
v-model="params.name"
|
||||||
|
|||||||
lazy-rules
|
lazy-rules
|
||||||
is-outlined
|
is-outlined
|
||||||
|
@ -50,7 +50,7 @@ const rolesOptions = ref([]);
|
||||||
<QItem class="q-my-sm">
|
<QItem class="q-my-sm">
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnInput
|
<VnInput
|
||||||
:label="t('account.filterPanel.nickname')"
|
:label="t('account.card.nickname')"
|
||||||
v-model="params.nickname"
|
v-model="params.nickname"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
is-outlined
|
is-outlined
|
||||||
|
@ -60,7 +60,7 @@ const rolesOptions = ref([]);
|
||||||
<QItem class="q-mb-sm">
|
<QItem class="q-mb-sm">
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('account.filterPanel.roleFk')"
|
:label="t('account.card.nickname')"
|
||||||
v-model="params.roleFk"
|
v-model="params.roleFk"
|
||||||
@update:model-value="searchFn()"
|
@update:model-value="searchFn()"
|
||||||
:options="rolesOptions"
|
:options="rolesOptions"
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
|
import { computed } from 'vue';
|
||||||
|
|
||||||
import VnPaginate from 'src/components/ui/VnPaginate.vue';
|
import VnPaginate from 'src/components/ui/VnPaginate.vue';
|
||||||
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
||||||
|
@ -11,11 +12,15 @@ import AccountFilter from './AccountFilter.vue';
|
||||||
|
|
||||||
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||||
import { useStateStore } from 'stores/useStateStore';
|
import { useStateStore } from 'stores/useStateStore';
|
||||||
|
import { useRole } from 'src/composables/useRole';
|
||||||
|
|
||||||
const stateStore = useStateStore();
|
const stateStore = useStateStore();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const { viewSummary } = useSummaryDialog();
|
const { viewSummary } = useSummaryDialog();
|
||||||
|
const roleState = useRole();
|
||||||
|
|
||||||
|
const isItManagement = computed(() => roleState.hasAny(['itManagement']));
|
||||||
|
|
||||||
const filter = {
|
const filter = {
|
||||||
fields: ['id', 'nickname', 'name', 'role'],
|
fields: ['id', 'nickname', 'name', 'role'],
|
||||||
|
@ -48,6 +53,8 @@ const navigate = (event, id) => {
|
||||||
return window.open(`${getApiUrl()}/#/account/${id}/summary`);
|
return window.open(`${getApiUrl()}/#/account/${id}/summary`);
|
||||||
router.push({ path: `/account/${id}` });
|
router.push({ path: `/account/${id}` });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const redirectToItemCreate = () => router.push({ name: 'AccountCreate' });
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -119,5 +126,11 @@ const navigate = (event, id) => {
|
||||||
</template>
|
</template>
|
||||||
</VnPaginate>
|
</VnPaginate>
|
||||||
</div>
|
</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>
|
</QPage>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -15,6 +15,7 @@ account:
|
||||||
privileges: Privileges
|
privileges: Privileges
|
||||||
mailAlias: Mail Alias
|
mailAlias: Mail Alias
|
||||||
mailForwarding: Mail Forwarding
|
mailForwarding: Mail Forwarding
|
||||||
|
accountCreate: New user
|
||||||
card:
|
card:
|
||||||
name: Name
|
name: Name
|
||||||
nickname: User
|
nickname: User
|
||||||
|
@ -22,6 +23,8 @@ account:
|
||||||
email: Email
|
email: Email
|
||||||
alias: Alias
|
alias: Alias
|
||||||
lang: Language
|
lang: Language
|
||||||
|
roleFk: Role
|
||||||
|
newUser: New user
|
||||||
actions:
|
actions:
|
||||||
setPassword: Set password
|
setPassword: Set password
|
||||||
disableAccount:
|
disableAccount:
|
||||||
|
@ -32,10 +35,6 @@ account:
|
||||||
sync: Sync
|
sync: Sync
|
||||||
delete: Delete
|
delete: Delete
|
||||||
search: Search user
|
search: Search user
|
||||||
filterPanel:
|
|
||||||
name: Name
|
|
||||||
nickname: User
|
|
||||||
roleFk: Role
|
|
||||||
role:
|
role:
|
||||||
pageTitles:
|
pageTitles:
|
||||||
inheritedRoles: Inherited Roles
|
inheritedRoles: Inherited Roles
|
||||||
|
|
|
@ -15,6 +15,7 @@ account:
|
||||||
privileges: Privilegios
|
privileges: Privilegios
|
||||||
mailAlias: Alias de correo
|
mailAlias: Alias de correo
|
||||||
mailForwarding: Reenvío de correo
|
mailForwarding: Reenvío de correo
|
||||||
|
accountCreate: Nuevo usuario
|
||||||
card:
|
card:
|
||||||
nickname: Usuario
|
nickname: Usuario
|
||||||
name: Nombre
|
name: Nombre
|
||||||
|
@ -22,6 +23,8 @@ account:
|
||||||
email: Mail
|
email: Mail
|
||||||
alias: Alias
|
alias: Alias
|
||||||
lang: dioma
|
lang: dioma
|
||||||
|
roleFk: Rol
|
||||||
|
newUser: Nuevo usuario
|
||||||
actions:
|
actions:
|
||||||
setPassword: Establecer contraseña
|
setPassword: Establecer contraseña
|
||||||
disableAccount:
|
disableAccount:
|
||||||
|
@ -41,10 +44,6 @@ account:
|
||||||
title: El usuario será eliminado
|
title: El usuario será eliminado
|
||||||
subtitle: ¿Seguro que quieres continuar?
|
subtitle: ¿Seguro que quieres continuar?
|
||||||
search: Buscar usuario
|
search: Buscar usuario
|
||||||
filterPanel:
|
|
||||||
name: Nombre
|
|
||||||
nickname: Usuario
|
|
||||||
roleFk: Rol
|
|
||||||
role:
|
role:
|
||||||
pageTitles:
|
pageTitles:
|
||||||
inheritedRoles: Roles heredados
|
inheritedRoles: Roles heredados
|
||||||
|
|
Loading…
Reference in New Issue
Revisar