Account Submodule #412

Merged
jsegarra merged 29 commits from :feature/AccountList into dev 2024-06-19 05:45:08 +00:00
5 changed files with 14 additions and 3 deletions
Showing only changes of commit e47bda0afc - Show all commits

View File

@ -46,6 +46,10 @@ const props = defineProps({
type: Array, type: Array,
default: () => [], default: () => [],
}, },
redirect: {
type: Boolean,
default: true,
},
}); });
const emit = defineEmits(['refresh', 'clear', 'search', 'init', 'remove']); const emit = defineEmits(['refresh', 'clear', 'search', 'init', 'remove']);
@ -93,7 +97,7 @@ async function search() {
isLoading.value = false; isLoading.value = false;
emit('search'); emit('search');
navigate(store.data, {}); if (props.redirect) navigate(store.data, {});
} }
async function reload() { async function reload() {
@ -104,7 +108,7 @@ async function reload() {
if (!props.showAll && !params.length) store.data = []; if (!props.showAll && !params.length) store.data = [];
isLoading.value = false; isLoading.value = false;
emit('refresh'); emit('refresh');
navigate(store.data, {}); if (props.redirect) navigate(store.data, {});
} }
async function clearFilters() { async function clearFilters() {

View File

@ -13,6 +13,10 @@ const props = defineProps({
type: String, type: String,
required: true, required: true,
}, },
exprBuilder: {
type: Function,
default: null,
},
}); });
const rolesOptions = ref([]); const rolesOptions = ref([]);
@ -29,6 +33,7 @@ const rolesOptions = ref([]);
:data-key="props.dataKey" :data-key="props.dataKey"
:search-button="true" :search-button="true"
:hidden-tags="['search']" :hidden-tags="['search']"
:redirect="false"
> >
<template #tags="{ tag, formatFn }"> <template #tags="{ tag, formatFn }">
<div class="q-gutter-x-xs"> <div class="q-gutter-x-xs">

View File

@ -65,7 +65,7 @@ const redirectToItemCreate = () => router.push({ name: 'AccountCreate' });
url="VnUsers/preview" url="VnUsers/preview"
:expr-builder="exprBuilder" :expr-builder="exprBuilder"
:label="t('account.search')" :label="t('account.search')"
:info="t('You can search by account id or customer name')" :info="t('account.searchInfo')"
/> />
</Teleport> </Teleport>
<Teleport to="#actions-append"> <Teleport to="#actions-append">

View File

@ -35,6 +35,7 @@ account:
sync: Sync sync: Sync
delete: Delete delete: Delete
search: Search user search: Search user
searchInfo: You can search by id, name or nickname
role: role:
pageTitles: pageTitles:
inheritedRoles: Inherited Roles inheritedRoles: Inherited Roles

View File

@ -44,6 +44,7 @@ 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
searchInfo: Puedes buscar por id, nombre o usuario
role: role:
pageTitles: pageTitles:
inheritedRoles: Roles heredados inheritedRoles: Roles heredados