WIP: refactor: #8322 changed supplier component to use VnSection/VnCardBeta #1216
|
@ -704,6 +704,8 @@ wagon:
|
||||||
name: Name
|
name: Name
|
||||||
|
|
||||||
supplier:
|
supplier:
|
||||||
|
search: Search provider
|
||||||
|
searchInfo: Search provider by id or name
|
||||||
list:
|
list:
|
||||||
payMethod: Pay method
|
payMethod: Pay method
|
||||||
account: Account
|
account: Account
|
||||||
|
|
|
@ -701,6 +701,8 @@ wagon:
|
||||||
volume: Volumen
|
volume: Volumen
|
||||||
name: Nombre
|
name: Nombre
|
||||||
supplier:
|
supplier:
|
||||||
|
search: Buscar proveedor
|
||||||
|
searchInfo: Buscar proveedor por id o nombre
|
||||||
list:
|
list:
|
||||||
payMethod: Método de pago
|
payMethod: Método de pago
|
||||||
account: Cuenta
|
account: Cuenta
|
||||||
|
@ -708,6 +710,7 @@ supplier:
|
||||||
tableVisibleColumns:
|
tableVisibleColumns:
|
||||||
nif: NIF/CIF
|
nif: NIF/CIF
|
||||||
account: Cuenta
|
account: Cuenta
|
||||||
|
|
||||||
summary:
|
summary:
|
||||||
responsible: Responsable
|
responsible: Responsable
|
||||||
verified: Verificado
|
verified: Verificado
|
||||||
|
|
|
@ -1,19 +1,7 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import VnCard from 'components/common/VnCard.vue';
|
|
||||||
import SupplierDescriptor from './SupplierDescriptor.vue';
|
import SupplierDescriptor from './SupplierDescriptor.vue';
|
||||||
import SupplierListFilter from '../SupplierListFilter.vue';
|
import VnCardBeta from 'src/components/common/VnCardBeta.vue';
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<VnCard
|
<VnCardBeta data-key="Supplier" base-url="Suppliers" :descriptor="SupplierDescriptor" />
|
||||||
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',
|
|
||||||
}"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
import { computed, ref } from 'vue';
|
import { computed, ref } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import VnTable from 'components/VnTable/VnTable.vue';
|
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 SupplierListFilter from './SupplierListFilter.vue';
|
||||||
|
import VnSection from 'src/components/common/VnSection.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
|
const dataKey = 'SupplierList';
|
||||||
|
|
||||||
const columns = computed(() => [
|
const columns = computed(() => [
|
||||||
{
|
{
|
||||||
|
@ -98,19 +98,20 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<VnSearchbar data-key="SuppliersList" :limit="20" :label="t('Search suppliers')" />
|
<VnSection
|
||||||
<RightMenu>
|
:data-key="dataKey"
|
||||||
<template #right-panel>
|
:columns="columns"
|
||||||
<SupplierListFilter data-key="SuppliersList" />
|
prefix="supplier"
|
||||||
</template>
|
:array-data-props="{
|
||||||
</RightMenu>
|
url: 'Suppliers/filter',
|
||||||
|
order: 'id ASC',
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<template #body>
|
||||||
<VnTable
|
<VnTable
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
data-key="SuppliersList"
|
:data-key="dataKey"
|
||||||
url="Suppliers/filter"
|
|
||||||
redirect="supplier"
|
|
||||||
:create="{
|
:create="{
|
||||||
urlCreate: 'Suppliers/newSupplier',
|
urlCreate: 'Suppliers/newSupplier',
|
||||||
title: t('Create Supplier'),
|
title: t('Create Supplier'),
|
||||||
|
@ -122,11 +123,12 @@ const columns = computed(() => [
|
||||||
return data;
|
return data;
|
||||||
},
|
},
|
||||||
}"
|
}"
|
||||||
:right-search="false"
|
|
||||||
order="id ASC"
|
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
|
redirect="supplier"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
</VnSection>
|
||||||
|
</template>
|
||||||
|
|
||||||
<i18n>
|
<i18n>
|
||||||
es:
|
es:
|
||||||
|
|
|
@ -1,19 +1,13 @@
|
||||||
import { RouterView } from 'vue-router';
|
import { RouterView } from 'vue-router';
|
||||||
|
|
||||||
export default {
|
const supplierCard = {
|
||||||
path: '/supplier',
|
name: 'SupplierCard',
|
||||||
name: 'Supplier',
|
path: ':id',
|
||||||
|
component: () => import('src/pages/Supplier/Card/SupplierCard.vue'),
|
||||||
|
redirect: { name: 'SupplierSummary' },
|
||||||
meta: {
|
meta: {
|
||||||
title: 'suppliers',
|
|
||||||
icon: 'vn:supplier',
|
menu: [
|
||||||
moduleName: 'Supplier',
|
|
||||||
keyBinding: 'p',
|
|
||||||
},
|
|
||||||
component: RouterView,
|
|
||||||
redirect: { name: 'SupplierMain' },
|
|
||||||
menus: {
|
|
||||||
main: ['SupplierList'],
|
|
||||||
card: [
|
|
||||||
'SupplierBasicData',
|
'SupplierBasicData',
|
||||||
'SupplierFiscalData',
|
'SupplierFiscalData',
|
||||||
'SupplierBillingData',
|
'SupplierBillingData',
|
||||||
|
@ -26,38 +20,6 @@ export default {
|
||||||
'SupplierDms',
|
'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: [
|
children: [
|
||||||
{
|
{
|
||||||
name: 'SupplierSummary',
|
name: 'SupplierSummary',
|
||||||
|
@ -179,6 +141,55 @@ export default {
|
||||||
component: () =>
|
component: () =>
|
||||||
import('src/pages/Supplier/Card/SupplierAgencyTermCreate.vue'),
|
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