refs #7355 fix list
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Carlos Satorres 2024-07-12 09:33:32 +02:00
parent 29405a8771
commit fc3fc27461
1 changed files with 9 additions and 38 deletions

View File

@ -1,17 +1,14 @@
<script setup> <script setup>
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import { computed } from 'vue'; import { ref, computed } from 'vue';
import VnTable from 'components/VnTable/VnTable.vue'; import VnTable from 'components/VnTable/VnTable.vue';
import VnSearchbar from 'components/ui/VnSearchbar.vue'; import VnSearchbar from 'components/ui/VnSearchbar.vue';
import AccountSummary from './Card/AccountSummary.vue'; import AccountSummary from './Card/AccountSummary.vue';
import AccountFilter from './AccountFilter.vue';
import { useSummaryDialog } from 'src/composables/useSummaryDialog'; import { useSummaryDialog } from 'src/composables/useSummaryDialog';
import { useStateStore } from 'stores/useStateStore';
const stateStore = useStateStore();
const { t } = useI18n(); const { t } = useI18n();
const { viewSummary } = useSummaryDialog(); const { viewSummary } = useSummaryDialog();
const tableRef = ref();
const columns = computed(() => [ const columns = computed(() => [
{ {
@ -27,6 +24,7 @@ const columns = computed(() => [
name: 'nickname', name: 'nickname',
label: t('nickname'), label: t('nickname'),
field: 'nickname', field: 'nickname',
isTitle: true,
component: 'input', component: 'input',
columnField: { columnField: {
component: null, component: null,
@ -62,47 +60,20 @@ const columns = computed(() => [
</script> </script>
<template> <template>
<template v-if="stateStore.isHeaderMounted()">
<Teleport to="#searchbar">
<VnSearchbar <VnSearchbar
data-key="AccountList"
url="VnUsers/preview"
:expr-builder="exprBuilder"
:label="t('account.search')" :label="t('account.search')"
data-key="AccountUsers"
:info="t('account.searchInfo')" :info="t('account.searchInfo')"
/> />
</Teleport>
<Teleport to="#actions-append">
<div class="row q-gutter-x-sm">
<QBtn
flat
@click="stateStore.toggleRightDrawer()"
round
dense
icon="menu"
>
<QTooltip bottom anchor="bottom right">
{{ t('globals.collapseMenu') }}
</QTooltip>
</QBtn>
</div>
</Teleport>
</template>
<QDrawer v-model="stateStore.rightDrawer" side="right" :width="256" show-if-above>
<QScrollArea class="fit text-grey-8">
<AccountFilter data-key="AccountList" :expr-builder="exprBuilder" />
</QScrollArea>
</QDrawer>
<VnTable <VnTable
ref="tableRef" ref="tableRef"
data-key="AccountUsers" data-key="AccountUsers"
:url="`VnUsers`" url="VnUsers"
order="id DESC" order="id DESC"
:columns="columns" :columns="columns"
default-mode="table" default-mode="table"
auto-load auto-load
:is-editable="true"
redirect="account" redirect="account"
:use-model="true" :use-model="true"
/> />