From 64c21aa5d924de23125e8ee846e343a8ef870962 Mon Sep 17 00:00:00 2001 From: carlossa Date: Mon, 1 Jul 2024 17:53:48 +0200 Subject: [PATCH] refs #7355 fix vnTable --- src/pages/Account/AccountList.vue | 120 +++++++++++++++++------------- 1 file changed, 68 insertions(+), 52 deletions(-) diff --git a/src/pages/Account/AccountList.vue b/src/pages/Account/AccountList.vue index dee019fed..d645a599a 100644 --- a/src/pages/Account/AccountList.vue +++ b/src/pages/Account/AccountList.vue @@ -2,7 +2,7 @@ import { useI18n } from 'vue-i18n'; import { useRouter } from 'vue-router'; import { computed, ref } from 'vue'; - +import VnTable from 'components/VnTable/VnTable.vue'; import VnPaginate from 'src/components/ui/VnPaginate.vue'; import VnSearchbar from 'components/ui/VnSearchbar.vue'; import VnLv from 'src/components/ui/VnLv.vue'; @@ -47,6 +47,52 @@ const exprBuilder = (param, value) => { } }; +const columns = computed(() => [ + { + align: 'left', + name: 'id', + label: t('id'), + isId: true, + field: 'id', + cardVisible: true, + }, + { + align: 'left', + name: 'nickname', + label: t('nickname'), + field: 'nickname', + component: 'input', + columnField: { + component: null, + }, + cardVisible: true, + create: true, + }, + { + align: 'left', + name: 'name', + label: t('name'), + field: 'name', + component: 'input', + columnField: { + component: null, + }, + cardVisible: true, + create: true, + }, + { + align: 'right', + label: '', + name: 'tableActions', + actions: [ + { + title: t('View Summary'), + icon: 'preview', + action: (row) => viewSummary(row.id, AccountSummary), + }, + ], + }, +]); const getApiUrl = () => new URL(window.location).origin; const navigate = (event, id) => { @@ -90,55 +136,25 @@ const openCreateModal = () => accountCreateDialogRef.value.show(); - -
- - - -
- - - - - - - {{ t('account.card.newUser') }} - - -
+ +