0
0
Fork 0

Merge branch 'dev' into 7500_ChangeEntryDms

This commit is contained in:
Jon Elias 2024-07-25 08:05:32 +00:00
commit fee7743b6e
3 changed files with 31 additions and 38 deletions

View File

@ -285,7 +285,9 @@ defineExpose({
<template #body>
<div
class="row no-wrap flex-center"
v-for="col of splittedColumns.columns"
v-for="col of splittedColumns.columns.filter(
(c) => c.columnFilter ?? true
)"
:key="col.id"
>
<VnTableFilter

View File

@ -152,7 +152,7 @@ function getUrl(section) {
/>
<VnLv
:label="t('supplier.summary.country')"
:value="supplier.country?.country"
:value="supplier.country?.name"
dash
/>
</QCard>

View File

@ -3,8 +3,6 @@ import { computed, ref } from 'vue';
import { useI18n } from 'vue-i18n';
import VnTable from 'components/VnTable/VnTable.vue';
import VnSearchbar from 'components/ui/VnSearchbar.vue';
import RightMenu from 'components/common/RightMenu.vue';
import SupplierListFilter from './SupplierListFilter.vue';
const { t } = useI18n();
const tableRef = ref();
@ -21,75 +19,70 @@ const columns = computed(() => [
label: t('supplier.list.tableVisibleColumns.name'),
name: 'socialName',
create: true,
component: 'input',
columnField: {
component: null,
columnFilter: {
name: 'nickname',
},
},
{
align: 'left',
label: t('supplier.list.tableVisibleColumns.nif'),
name: 'nif',
component: 'input',
columnField: {
component: null,
},
},
{
align: 'left',
label: t('supplier.list.tableVisibleColumns.nickname'),
name: 'alias',
component: 'input',
columnField: {
component: null,
columnFilter: {
name: 'nickname',
},
},
{
align: 'left',
label: t('supplier.list.tableVisibleColumns.account'),
name: 'account',
component: 'input',
columnField: {
component: null,
},
columnFilter: false,
},
{
align: 'left',
label: t('supplier.list.tableVisibleColumns.payMethod'),
name: 'payMethod',
component: 'select',
attrs: {
url: 'payMethods',
fields: ['id', 'name'],
},
columnField: {
component: null,
},
columnFilter: false,
},
{
align: 'left',
label: t('supplier.list.tableVisibleColumns.payDay'),
name: 'payDat',
component: 'input',
columnField: {
component: null,
name: 'payDay',
columnFilter: false,
},
{
align: 'left',
name: 'countryFk',
label: t('customer.extendedList.tableVisibleColumns.countryFk'),
component: 'select',
attrs: {
url: 'Countries',
},
visible: false,
},
{
align: 'left',
label: t('customer.extendedList.tableVisibleColumns.provinceFk'),
name: 'provinceFk',
component: 'select',
attrs: {
url: 'Provinces',
},
visible: false,
},
]);
</script>
<template>
<VnSearchbar data-key="SuppliersList" :limit="20" :label="t('Search suppliers')" />
<RightMenu>
<template #right-panel>
<SupplierListFilter data-key="SuppliersList" />
</template>
</RightMenu>
<VnTable
ref="tableRef"
data-key="SuppliersList"
url="Suppliers/filter"
save-url="Suppliers/crud"
redirect="supplier"
:create="{
urlCreate: 'Suppliers/newSupplier',
@ -100,8 +93,6 @@ const columns = computed(() => [
order="id ASC"
:columns="columns"
auto-load
:right-search="false"
:use-model="true"
/>
</template>