diff --git a/src/router/modules/ticket.js b/src/router/modules/ticket.js index 63692d591..2088817a9 100644 --- a/src/router/modules/ticket.js +++ b/src/router/modules/ticket.js @@ -6,22 +6,7 @@ const ticketCard = { component: () => import('src/pages/Ticket/Card/TicketCard.vue'), redirect: { name: 'TicketSummary' }, meta: { - title: 'tickets', - icon: 'vn:ticket', - moduleName: 'Ticket', - keyBinding: 't', - }, - component: RouterView, - redirect: { name: 'TicketMain' }, - menus: { - main: [ - 'TicketList', - 'TicketAdvance', - 'TicketWeekly', - 'TicketFuture', - 'TicketNegative', - ], - card: [ + menu: [ 'TicketBasicData', 'TicketSale', 'TicketLog', @@ -42,210 +27,123 @@ const ticketCard = { }, children: [ { - name: 'TicketMain', - path: '', - component: () => import('src/components/common/VnSectionMain.vue'), - redirect: { name: 'TicketList' }, - children: [ - { - path: 'list', - name: 'TicketList', - meta: { - title: 'list', - icon: 'view_list', - }, - component: () => import('src/pages/Ticket/TicketList.vue'), - }, - { - path: 'negative', - redirect: { name: 'TicketNegative' }, - children: [ - { - name: 'TicketNegative', - meta: { - title: 'negative', - icon: 'view_list', - }, - // redirect: { name: 'TicketNegative' }, - component: () => - import('src/pages/Ticket/Negative/TicketLackList.vue'), - path: '', - }, - { - name: 'NegativeDetail', - path: ':id', - meta: { - title: 'summary', - icon: 'launch', - }, - component: () => - import('src/pages/Ticket/Negative/TicketLackDetail.vue'), - }, - ], - }, - { - path: 'create', - name: 'TicketCreate', - meta: { - title: 'createTicket', - icon: 'vn:ticketAdd', - }, - component: () => import('src/pages/Ticket/TicketCreate.vue'), - }, - { - path: 'weekly', - name: 'TicketWeekly', - meta: { - title: 'weeklyTickets', - icon: 'access_time', - }, - component: () => import('src/pages/Ticket/TicketWeekly.vue'), - }, - { - path: 'future', - name: 'TicketFuture', - meta: { - title: 'futureTickets', - icon: 'keyboard_double_arrow_right', - }, - component: () => import('src/pages/Ticket/TicketFuture.vue'), - }, - { - name: 'TicketAdvance', - path: 'advance', - meta: { - title: 'ticketAdvance', - icon: 'keyboard_double_arrow_left', - }, - component: () => import('src/pages/Ticket/TicketAdvance.vue'), - }, - ], + path: 'summary', + name: 'TicketSummary', + meta: { + title: 'summary', + icon: 'launch', + }, + component: () => import('src/pages/Ticket/Card/TicketSummary.vue'), }, { - name: 'TicketCard', - path: ':id', - component: () => import('src/pages/Ticket/Card/TicketCard.vue'), - redirect: { name: 'TicketSummary' }, - children: [ - { - path: 'summary', - name: 'TicketSummary', - meta: { - title: 'summary', - icon: 'launch', - }, - component: () => import('src/pages/Ticket/Card/TicketSummary.vue'), - }, - { - path: 'basic-data', - name: 'TicketBasicData', - meta: { - title: 'basicData', - icon: 'vn:settings', - }, - component: () => - import('src/pages/Ticket/Card/BasicData/TicketBasicDataView.vue'), - }, - { - path: 'sale', - name: 'TicketSale', - meta: { - title: 'sale', - icon: 'vn:lines', - }, - component: () => import('src/pages/Ticket/Card/TicketSale.vue'), - }, - { - path: 'request', - name: 'TicketPurchaseRequest', - meta: { - title: 'purchaseRequest', - icon: 'vn:buyrequest', - }, - component: () => - import('src/pages/Ticket/Card/TicketPurchaseRequest.vue'), - }, - { - path: 'tracking', - name: 'TicketTracking', - meta: { - title: 'tracking', - icon: 'vn:eye', - }, - component: () => import('src/pages/Ticket/Card/TicketTracking.vue'), - }, - { - path: 'log', - name: 'TicketLog', - meta: { - title: 'log', - icon: 'history', - }, - component: () => import('src/pages/Ticket/Card/TicketLog.vue'), - }, - { - path: 'observation', - name: 'TicketNotes', - meta: { - title: 'notes', - icon: 'vn:notes', - }, - component: () => import('src/pages/Ticket/Card/TicketNotes.vue'), - }, - { - path: 'picture', - name: 'TicketPicture', - meta: { - title: 'pictures', - icon: 'vn:photo', - }, - component: () => import('src/pages/Ticket/Card/TicketPicture.vue'), - }, - { - path: 'volume', - name: 'TicketVolume', - meta: { - title: 'volume', - icon: 'vn:volume', - }, - component: () => import('src/pages/Ticket/Card/TicketVolume.vue'), - }, - { - path: 'expedition', - name: 'TicketExpedition', - meta: { - title: 'expedition', - icon: 'vn:package', - }, - component: () => import('src/pages/Ticket/Card/TicketExpedition.vue'), - }, - { - path: 'service', - name: 'TicketService', - meta: { - title: 'services', - icon: 'vn:services', - }, - component: () => import('src/pages/Ticket/Card/TicketService.vue'), - }, - { - path: 'package', - name: 'TicketPackage', - meta: { - title: 'packages', - icon: 'vn:bucket', - }, - component: () => import('src/pages/Ticket/Card/TicketPackage.vue'), - }, - { - path: 'components', - name: 'TicketComponents', - meta: { - title: 'components', - icon: 'vn:components', - }, - component: () => import('src/pages/Ticket/Card/TicketComponents.vue'), - }, + path: 'basic-data', + name: 'TicketBasicData', + meta: { + title: 'basicData', + icon: 'vn:settings', + }, + component: () => + import('src/pages/Ticket/Card/BasicData/TicketBasicDataView.vue'), + }, + { + path: 'sale', + name: 'TicketSale', + meta: { + title: 'sale', + icon: 'vn:lines', + }, + component: () => import('src/pages/Ticket/Card/TicketSale.vue'), + }, + { + path: 'request', + name: 'TicketPurchaseRequest', + meta: { + title: 'purchaseRequest', + icon: 'vn:buyrequest', + }, + component: () => import('src/pages/Ticket/Card/TicketPurchaseRequest.vue'), + }, + { + path: 'tracking', + name: 'TicketTracking', + meta: { + title: 'tracking', + icon: 'vn:eye', + }, + component: () => import('src/pages/Ticket/Card/TicketTracking.vue'), + }, + { + path: 'log', + name: 'TicketLog', + meta: { + title: 'log', + icon: 'history', + }, + component: () => import('src/pages/Ticket/Card/TicketLog.vue'), + }, + { + path: 'observation', + name: 'TicketNotes', + meta: { + title: 'notes', + icon: 'vn:notes', + }, + component: () => import('src/pages/Ticket/Card/TicketNotes.vue'), + }, + { + path: 'picture', + name: 'TicketPicture', + meta: { + title: 'pictures', + icon: 'vn:photo', + }, + component: () => import('src/pages/Ticket/Card/TicketPicture.vue'), + }, + { + path: 'volume', + name: 'TicketVolume', + meta: { + title: 'volume', + icon: 'vn:volume', + }, + component: () => import('src/pages/Ticket/Card/TicketVolume.vue'), + }, + { + path: 'expedition', + name: 'TicketExpedition', + meta: { + title: 'expedition', + icon: 'vn:package', + }, + component: () => import('src/pages/Ticket/Card/TicketExpedition.vue'), + }, + { + path: 'service', + name: 'TicketService', + meta: { + title: 'services', + icon: 'vn:services', + }, + component: () => import('src/pages/Ticket/Card/TicketService.vue'), + }, + { + path: 'package', + name: 'TicketPackage', + meta: { + title: 'packages', + icon: 'vn:bucket', + }, + component: () => import('src/pages/Ticket/Card/TicketPackage.vue'), + }, + { + path: 'components', + name: 'TicketComponents', + meta: { + title: 'components', + icon: 'vn:components', + }, + component: () => import('src/pages/Ticket/Card/TicketComponents.vue'), + }, { path: 'sale-tracking', @@ -294,7 +192,13 @@ export default { icon: 'vn:ticket', moduleName: 'Ticket', keyBinding: 't', - menu: ['TicketList', 'TicketAdvance', 'TicketWeekly', 'TicketFuture'], + menu: [ + 'TicketList', + 'TicketAdvance', + 'TicketWeekly', + 'TicketFuture', + 'TicketNegative', + ], }, component: RouterView, redirect: { name: 'TicketMain' }, @@ -331,6 +235,33 @@ export default { }, component: () => import('src/pages/Ticket/TicketCreate.vue'), }, + { + path: 'negative', + redirect: { name: 'TicketNegative' }, + children: [ + { + name: 'TicketNegative', + meta: { + title: 'negative', + icon: 'view_list', + }, + // redirect: { name: 'TicketNegative' }, + component: () => + import('src/pages/Ticket/Negative/TicketLackList.vue'), + path: '', + }, + { + name: 'NegativeDetail', + path: ':id', + meta: { + title: 'summary', + icon: 'launch', + }, + component: () => + import('src/pages/Ticket/Negative/TicketLackDetail.vue'), + }, + ], + }, { path: 'weekly', name: 'TicketWeekly',