refactor: refs #8322 changed supplier component to use VnSection/VnCardBeta
This commit is contained in:
parent
494b8440d6
commit
8aaab2c25c
|
@ -699,6 +699,8 @@ wagon:
|
|||
uncompleteTrays: There are incomplete trays
|
||||
|
||||
supplier:
|
||||
search: Search provider
|
||||
searchInfo: Search provider by id or name
|
||||
list:
|
||||
payMethod: Pay method
|
||||
account: Account
|
||||
|
|
|
@ -692,6 +692,8 @@ wagon:
|
|||
maxWagonHeight: 'La altura máxima del vagón es '
|
||||
uncompleteTrays: Hay bandejas sin completar
|
||||
supplier:
|
||||
search: Buscar proveedor
|
||||
searchInfo: Buscar proveedor por id o nombre
|
||||
list:
|
||||
payMethod: Método de pago
|
||||
account: Cuenta
|
||||
|
@ -699,6 +701,7 @@ supplier:
|
|||
tableVisibleColumns:
|
||||
nif: NIF/CIF
|
||||
account: Cuenta
|
||||
|
||||
summary:
|
||||
responsible: Responsable
|
||||
verified: Verificado
|
||||
|
|
|
@ -1,19 +1,7 @@
|
|||
<script setup>
|
||||
import VnCard from 'components/common/VnCard.vue';
|
||||
import SupplierDescriptor from './SupplierDescriptor.vue';
|
||||
import SupplierListFilter from '../SupplierListFilter.vue';
|
||||
import VnCardBeta from 'src/components/common/VnCardBeta.vue';
|
||||
</script>
|
||||
<template>
|
||||
<VnCard
|
||||
data-key="Supplier"
|
||||
base-url="Suppliers"
|
||||
:descriptor="SupplierDescriptor"
|
||||
:filter-panel="SupplierListFilter"
|
||||
search-data-key="SupplierList"
|
||||
:searchbar-props="{
|
||||
url: 'Suppliers/filter',
|
||||
searchUrl: 'table',
|
||||
label: 'Search suppliers',
|
||||
}"
|
||||
/>
|
||||
<VnCardBeta data-key="Supplier" base-url="Suppliers" :descriptor="SupplierDescriptor" />
|
||||
</template>
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
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 'src/components/common/RightMenu.vue';
|
||||
import SupplierListFilter from './SupplierListFilter.vue';
|
||||
import VnSection from 'src/components/common/VnSection.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const tableRef = ref();
|
||||
const dataKey = 'SupplierList';
|
||||
|
||||
const columns = computed(() => [
|
||||
{
|
||||
|
@ -98,19 +98,20 @@ const columns = computed(() => [
|
|||
},
|
||||
]);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<VnSearchbar data-key="SuppliersList" :limit="20" :label="t('Search suppliers')" />
|
||||
<RightMenu>
|
||||
<template #right-panel>
|
||||
<SupplierListFilter data-key="SuppliersList" />
|
||||
</template>
|
||||
</RightMenu>
|
||||
<VnSection
|
||||
:data-key="dataKey"
|
||||
:columns="columns"
|
||||
prefix="supplier"
|
||||
:array-data-props="{
|
||||
url: 'Suppliers/filter',
|
||||
order: 'id ASC',
|
||||
}"
|
||||
>
|
||||
<template #body>
|
||||
<VnTable
|
||||
ref="tableRef"
|
||||
data-key="SuppliersList"
|
||||
url="Suppliers/filter"
|
||||
redirect="supplier"
|
||||
:data-key="dataKey"
|
||||
:create="{
|
||||
urlCreate: 'Suppliers/newSupplier',
|
||||
title: t('Create Supplier'),
|
||||
|
@ -122,11 +123,12 @@ const columns = computed(() => [
|
|||
return data;
|
||||
},
|
||||
}"
|
||||
:right-search="false"
|
||||
order="id ASC"
|
||||
:columns="columns"
|
||||
redirect="supplier"
|
||||
/>
|
||||
</template>
|
||||
</VnSection>
|
||||
</template>
|
||||
|
||||
<i18n>
|
||||
es:
|
||||
|
|
|
@ -1,19 +1,13 @@
|
|||
import { RouterView } from 'vue-router';
|
||||
|
||||
export default {
|
||||
path: '/supplier',
|
||||
name: 'Supplier',
|
||||
const supplierCard = {
|
||||
name: 'SupplierCard',
|
||||
path: ':id',
|
||||
component: () => import('src/pages/Supplier/Card/SupplierCard.vue'),
|
||||
redirect: { name: 'SupplierSummary' },
|
||||
meta: {
|
||||
title: 'suppliers',
|
||||
icon: 'vn:supplier',
|
||||
moduleName: 'Supplier',
|
||||
keyBinding: 'p',
|
||||
},
|
||||
component: RouterView,
|
||||
redirect: { name: 'SupplierMain' },
|
||||
menus: {
|
||||
main: ['SupplierList'],
|
||||
card: [
|
||||
|
||||
menu: [
|
||||
'SupplierBasicData',
|
||||
'SupplierFiscalData',
|
||||
'SupplierBillingData',
|
||||
|
@ -26,38 +20,6 @@ export default {
|
|||
'SupplierDms',
|
||||
],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
name: 'SupplierMain',
|
||||
component: () => import('src/components/common/VnModule.vue'),
|
||||
redirect: { name: 'SupplierList' },
|
||||
children: [
|
||||
{
|
||||
path: 'list',
|
||||
name: 'SupplierList',
|
||||
meta: {
|
||||
title: 'list',
|
||||
icon: 'view_list',
|
||||
},
|
||||
component: () => import('src/pages/Supplier/SupplierList.vue'),
|
||||
},
|
||||
{
|
||||
path: 'create',
|
||||
name: 'SupplierCreate',
|
||||
meta: {
|
||||
title: 'supplierCreate',
|
||||
icon: 'add',
|
||||
},
|
||||
component: () => import('src/pages/Supplier/SupplierCreate.vue'),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'SupplierCard',
|
||||
path: ':id',
|
||||
component: () => import('src/pages/Supplier/Card/SupplierCard.vue'),
|
||||
redirect: { name: 'SupplierSummary' },
|
||||
children: [
|
||||
{
|
||||
name: 'SupplierSummary',
|
||||
|
@ -179,6 +141,55 @@ export default {
|
|||
component: () =>
|
||||
import('src/pages/Supplier/Card/SupplierAgencyTermCreate.vue'),
|
||||
},
|
||||
]
|
||||
};
|
||||
|
||||
export default {
|
||||
name: 'Supplier',
|
||||
path: '/supplier',
|
||||
meta: {
|
||||
title: 'suppliers',
|
||||
icon: 'vn:supplier',
|
||||
moduleName: 'Supplier',
|
||||
keyBinding: 'p',
|
||||
menu: ['SupplierList'],
|
||||
},
|
||||
component: RouterView,
|
||||
redirect: { name: 'SupplierMain' },
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
name: 'SupplierMain',
|
||||
component: () => import('src/components/common/VnModule.vue'),
|
||||
redirect: { name: 'SupplierIndexMain' },
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
name: 'SupplierIndexMain',
|
||||
redirect: { name: 'SupplierList' },
|
||||
component: () => import('src/pages/Supplier/SupplierList.vue'),
|
||||
children: [
|
||||
{
|
||||
path: 'list',
|
||||
name: 'SupplierList',
|
||||
meta: {
|
||||
title: 'list',
|
||||
icon: 'view_list',
|
||||
},
|
||||
|
||||
},
|
||||
supplierCard,
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'create',
|
||||
name: 'SupplierCreate',
|
||||
meta: {
|
||||
title: 'supplierCreate',
|
||||
icon: 'add',
|
||||
},
|
||||
component: () => import('src/pages/Supplier/SupplierCreate.vue'),
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
|
Loading…
Reference in New Issue