0
0
Fork 0

Merge pull request 'refs #7355 fix searchbar' (!797) from hotfix-AccountSearchbar into master

Reviewed-on: verdnatura/salix-front#797
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
Carlos Satorres 2024-10-04 10:09:53 +00:00
commit 45c8f6f4c5
2 changed files with 10 additions and 17 deletions

View File

@ -5,7 +5,8 @@ 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 { useSummaryDialog } from 'src/composables/useSummaryDialog'; import { useSummaryDialog } from 'src/composables/useSummaryDialog';
import AccountFilter from './AccountFilter.vue';
import RightMenu from 'src/components/common/RightMenu.vue';
const { t } = useI18n(); const { t } = useI18n();
const { viewSummary } = useSummaryDialog(); const { viewSummary } = useSummaryDialog();
const tableRef = ref(); const tableRef = ref();
@ -18,14 +19,6 @@ const columns = computed(() => [
isId: true, isId: true,
field: 'id', field: 'id',
cardVisible: true, cardVisible: true,
columnFilter: {
component: 'select',
name: 'search',
attrs: {
url: 'VnUsers/preview',
fields: ['id', 'name'],
},
},
}, },
{ {
align: 'left', align: 'left',
@ -36,9 +29,6 @@ const columns = computed(() => [
columnField: { columnField: {
component: null, component: null,
}, },
columnFilter: {
inWhere: true,
},
cardVisible: true, cardVisible: true,
create: true, create: true,
}, },
@ -50,9 +40,6 @@ const columns = computed(() => [
columnField: { columnField: {
component: null, component: null,
}, },
columnFilter: {
inWhere: true,
},
cardVisible: true, cardVisible: true,
create: true, create: true,
}, },
@ -105,7 +92,11 @@ const exprBuilder = (param, value) => {
:label="t('account.search')" :label="t('account.search')"
:info="t('account.searchInfo')" :info="t('account.searchInfo')"
/> />
<RightMenu>
<template #right-panel>
<AccountFilter data-key="AccountUsers" />
</template>
</RightMenu>
<VnTable <VnTable
ref="tableRef" ref="tableRef"
data-key="AccountUsers" data-key="AccountUsers"
@ -115,6 +106,8 @@ const exprBuilder = (param, value) => {
default-mode="table" default-mode="table"
redirect="account" redirect="account"
:use-model="true" :use-model="true"
:right-search="false"
auto-load
/> />
</template> </template>

View File

@ -10,7 +10,7 @@ const { t } = useI18n();
<VnCard <VnCard
data-key="Account" data-key="Account"
:descriptor="AccountDescriptor" :descriptor="AccountDescriptor"
search-data-key="AccountUsers" search-data-key="AccountList"
:searchbar-props="{ :searchbar-props="{
url: 'VnUsers/preview', url: 'VnUsers/preview',
label: t('account.search'), label: t('account.search'),