From be86b690796e5f72c42df805fd7efb383ee47cd1 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Mon, 15 Jul 2024 11:53:10 +0200 Subject: [PATCH] fix: ticket menu order and i18n --- src/i18n/locale/en.yml | 13 ++-- src/pages/Ticket/Card/TicketComponents.vue | 4 +- src/router/modules/ticket.js | 79 ++++++++++++++++------ 3 files changed, 67 insertions(+), 29 deletions(-) diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index 8fa79962a..6943252c9 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -197,6 +197,12 @@ globals: autonomous: Autonomous suppliers: Suppliers supplier: Supplier + expedition: Expedition + services: Service + components: Components + pictures: Pictures + packages: Packages + tracking: Tracking labeler: Labeler supplierCreate: New supplier accounts: Accounts @@ -553,15 +559,8 @@ ticket: observation: Notes ticketAdvance: Advance tickets futureTickets: Future tickets - expedition: Expedition purchaseRequest: Purchase request weeklyTickets: Weekly tickets - saleTracking: Sale tracking - services: Service - tracking: Tracking - components: Components - pictures: Pictures - packages: Packages list: nickname: Nickname state: State diff --git a/src/pages/Ticket/Card/TicketComponents.vue b/src/pages/Ticket/Card/TicketComponents.vue index 47a1f0aa1..3954b5a62 100644 --- a/src/pages/Ticket/Card/TicketComponents.vue +++ b/src/pages/Ticket/Card/TicketComponents.vue @@ -111,7 +111,7 @@ const columns = computed(() => [ const getBase = computed(() => { let sum = 0; - for (let sale of ticketComponents.value) { + for (let sale of components.value) { for (let saleComponent of sale.components) { if (saleComponent.component.componentType.isBase) { sum += sale.quantity * saleComponent.value; @@ -123,7 +123,7 @@ const getBase = computed(() => { const getTotal = computed(() => { let total = 0; - for (let sale of ticketComponents.value) { + for (let sale of components.value) { for (let saleComponent of sale.components) { total += sale.quantity * saleComponent.value; } diff --git a/src/router/modules/ticket.js b/src/router/modules/ticket.js index c6121e836..c507553d6 100644 --- a/src/router/modules/ticket.js +++ b/src/router/modules/ticket.js @@ -21,7 +21,10 @@ export default { 'TicketPurchaseRequest', 'TicketTracking', 'TicketNotes', + 'TicketPicture', 'TicketVolume', + 'TicketComponents', + 'TicketPackage', 'TicketService', 'TicketSaleTracking', 'TicketBoxing', @@ -146,13 +149,40 @@ export default { component: () => import('src/pages/Ticket/Card/TicketLog.vue'), }, { - path: 'boxing', - name: 'TicketBoxing', + path: 'observation', + name: 'TicketNotes', meta: { - title: 'boxing', + 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/TicketBoxing.vue'), + component: () => import('src/pages/Ticket/Card/TicketExpedition.vue'), }, { path: 'service', @@ -164,23 +194,33 @@ export default { component: () => import('src/pages/Ticket/Card/TicketService.vue'), }, { - path: 'volume', - name: 'TicketVolume', + path: 'package', + name: 'TicketPackage', meta: { - title: 'volume', - icon: 'vn:volume', + title: 'packages', + icon: 'vn:bin', }, - component: () => import('src/pages/Ticket/Card/TicketVolume.vue'), + 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: 'observation', - name: 'TicketNotes', + path: 'sale-tracking', + name: 'TicketSaleTracking', meta: { - title: 'notes', - icon: 'vn:notes', + title: 'saleTracking', + icon: 'assignment', }, - component: () => import('src/pages/Ticket/Card/TicketNotes.vue'), + component: () => + import('src/pages/Ticket/Card/TicketSaleTracking.vue'), }, { path: 'dms', @@ -192,14 +232,13 @@ export default { component: () => import('src/pages/Ticket/Card/TicketDms.vue'), }, { - path: 'sale-tracking', - name: 'TicketSaleTracking', + path: 'boxing', + name: 'TicketBoxing', meta: { - title: 'saleTracking', - icon: 'vn:buyrequest', + title: 'boxing', + icon: 'science', }, - component: () => - import('src/pages/Ticket/Card/TicketSaleTracking.vue'), + component: () => import('src/pages/Ticket/Card/TicketBoxing.vue'), }, { path: 'sms',