248 lines
7.3 KiB
JavaScript
248 lines
7.3 KiB
JavaScript
import { RouterView } from 'vue-router';
|
|
|
|
const itemCard = {
|
|
name: 'ItemCard',
|
|
path: ':id',
|
|
component: () => import('src/pages/Item/Card/ItemCard.vue'),
|
|
redirect: { name: 'ItemSummary' },
|
|
meta: {
|
|
menu: [
|
|
'ItemBasicData',
|
|
'ItemTags',
|
|
'ItemLastEntries',
|
|
'ItemTax',
|
|
'ItemBotanical',
|
|
'ItemShelving',
|
|
'ItemBarcode',
|
|
'ItemDiary',
|
|
'ItemLog',
|
|
],
|
|
},
|
|
children: [
|
|
{
|
|
name: 'ItemSummary',
|
|
path: 'summary',
|
|
meta: {
|
|
title: 'summary',
|
|
icon: 'launch',
|
|
},
|
|
component: () => import('src/pages/Item/Card/ItemSummary.vue'),
|
|
},
|
|
{
|
|
path: 'basic-data',
|
|
name: 'ItemBasicData',
|
|
meta: {
|
|
title: 'basicData',
|
|
icon: 'vn:settings',
|
|
},
|
|
component: () => import('src/pages/Item/Card/ItemBasicData.vue'),
|
|
},
|
|
{
|
|
path: 'tags',
|
|
name: 'ItemTags',
|
|
meta: {
|
|
title: 'tags',
|
|
icon: 'vn:tag',
|
|
},
|
|
component: () => import('src/pages/Item/Card/ItemTags.vue'),
|
|
},
|
|
{
|
|
path: 'last-entries',
|
|
name: 'ItemLastEntries',
|
|
meta: {
|
|
title: 'lastEntries',
|
|
icon: 'vn:regentry',
|
|
},
|
|
component: () => import('src/pages/Item/Card/ItemLastEntries.vue'),
|
|
},
|
|
{
|
|
path: 'tax',
|
|
name: 'ItemTax',
|
|
meta: {
|
|
title: 'tax',
|
|
icon: 'vn:tax',
|
|
},
|
|
component: () => import('src/pages/Item/Card/ItemTax.vue'),
|
|
},
|
|
{
|
|
path: 'botanical',
|
|
name: 'ItemBotanical',
|
|
meta: {
|
|
title: 'botanical',
|
|
icon: 'vn:botanical',
|
|
},
|
|
component: () => import('src/pages/Item/Card/ItemBotanical.vue'),
|
|
},
|
|
{
|
|
path: 'shelving',
|
|
name: 'ItemShelving',
|
|
meta: {
|
|
title: 'shelving',
|
|
icon: 'vn:inventory',
|
|
},
|
|
component: () => import('src/pages/Item/Card/ItemShelving.vue'),
|
|
},
|
|
{
|
|
path: 'barcode',
|
|
name: 'ItemBarcode',
|
|
meta: {
|
|
title: 'barcode',
|
|
icon: 'vn:barcode',
|
|
},
|
|
component: () => import('src/pages/Item/Card/ItemBarcode.vue'),
|
|
},
|
|
{
|
|
path: 'diary',
|
|
name: 'ItemDiary',
|
|
meta: {
|
|
title: 'diary',
|
|
icon: 'vn:transaction',
|
|
},
|
|
component: () => import('src/pages/Item/Card/ItemDiary.vue'),
|
|
},
|
|
{
|
|
path: 'log',
|
|
name: 'ItemLog',
|
|
meta: {
|
|
title: 'log',
|
|
icon: 'vn:History',
|
|
},
|
|
component: () => import('src/pages/Item/Card/ItemLog.vue'),
|
|
},
|
|
],
|
|
};
|
|
|
|
const itemTypeCard = {
|
|
name: 'ItemTypeCard',
|
|
path: ':id',
|
|
component: () => import('src/pages/Item/ItemType/Card/ItemTypeCard.vue'),
|
|
redirect: { name: 'ItemTypeSummary' },
|
|
meta: {
|
|
menu: ['ItemTypeBasicData', 'ItemTypeLog'],
|
|
},
|
|
children: [
|
|
{
|
|
path: 'summary',
|
|
name: 'ItemTypeSummary',
|
|
meta: {
|
|
title: 'summary',
|
|
icon: 'launch',
|
|
},
|
|
component: () => import('src/pages/Item/ItemType/Card/ItemTypeSummary.vue'),
|
|
},
|
|
{
|
|
path: 'basic-data',
|
|
name: 'ItemTypeBasicData',
|
|
meta: {
|
|
title: 'basicData',
|
|
icon: 'vn:settings',
|
|
},
|
|
component: () => import('src/pages/Item/ItemType/Card/ItemTypeBasicData.vue'),
|
|
},
|
|
{
|
|
path: 'log',
|
|
name: 'ItemTypeLog',
|
|
meta: {
|
|
title: 'log',
|
|
icon: 'vn:History',
|
|
},
|
|
component: () => import('src/pages/Item/ItemType/Card/ItemTypeLog.vue'),
|
|
},
|
|
],
|
|
};
|
|
|
|
export default {
|
|
name: 'Item',
|
|
path: '/item',
|
|
meta: {
|
|
title: 'items',
|
|
icon: 'vn:item',
|
|
moduleName: 'Item',
|
|
keyBinding: 'a',
|
|
menu: [
|
|
'ItemList',
|
|
'WasteBreakdown',
|
|
'ItemFixedPrice',
|
|
'ItemRequest',
|
|
'ItemTypeList',
|
|
],
|
|
},
|
|
component: RouterView,
|
|
redirect: { name: 'ItemMain' },
|
|
children: [
|
|
{
|
|
name: 'ItemMain',
|
|
path: '',
|
|
component: () => import('src/components/common/VnModule.vue'),
|
|
redirect: { name: 'ItemIndexMain' },
|
|
children: [
|
|
{
|
|
path: '',
|
|
name: 'ItemIndexMain',
|
|
redirect: { name: 'ItemList' },
|
|
component: () => import('src/pages/Item/ItemList.vue'),
|
|
children: [
|
|
{
|
|
name: 'ItemList',
|
|
path: 'list',
|
|
meta: {
|
|
title: 'list',
|
|
icon: 'view_list',
|
|
},
|
|
},
|
|
itemCard,
|
|
],
|
|
},
|
|
{
|
|
path: 'request',
|
|
name: 'ItemRequest',
|
|
meta: {
|
|
title: 'buyRequest',
|
|
icon: 'vn:buyrequest',
|
|
},
|
|
component: () => import('src/pages/Item/ItemRequest.vue'),
|
|
},
|
|
{
|
|
path: 'waste-breakdown',
|
|
name: 'WasteBreakdown',
|
|
meta: {
|
|
title: 'wasteBreakdown',
|
|
icon: 'vn:claims',
|
|
},
|
|
beforeEnter: (to, from, next) => {
|
|
next({ name: 'ItemList' });
|
|
window.location.href =
|
|
'https://grafana.verdnatura.es/d/TTNXQAxVk';
|
|
},
|
|
},
|
|
{
|
|
path: 'fixed-price',
|
|
name: 'ItemFixedPrice',
|
|
meta: {
|
|
title: 'fixedPrice',
|
|
icon: 'vn:fixedPrice',
|
|
},
|
|
component: () => import('src/pages/Item/ItemFixedPrice.vue'),
|
|
},
|
|
{
|
|
path: 'item-type',
|
|
name: 'ItemTypeMain',
|
|
redirect: { name: 'ItemTypeList' },
|
|
component: () => import('src/pages/Item/ItemTypeList.vue'),
|
|
children: [
|
|
{
|
|
name: 'ItemTypeList',
|
|
path: 'list',
|
|
meta: {
|
|
title: 'family',
|
|
icon: 'contact_support',
|
|
},
|
|
},
|
|
itemTypeCard,
|
|
],
|
|
},
|
|
],
|
|
},
|
|
],
|
|
};
|