diff --git a/src/components/ui/CardSummary.vue b/src/components/ui/CardSummary.vue index 1a4514ef5..e52be753f 100644 --- a/src/components/ui/CardSummary.vue +++ b/src/components/ui/CardSummary.vue @@ -54,6 +54,13 @@ async function fetch() { emit('onFetch', Array.isArray(data) ? data[0] : data); isLoading.value = false; } + +const showRedirectToSummaryIcon = computed(() => { + const routeExists = route.matched.some( + (route) => route.name === `${route.meta.moduleName}Summary` + ); + return !isSummary.value && route.meta.moduleName && routeExists; +}); + + + + + + + + + + + {{ t('salesMonitor.ticketsMonitor') }} + + + + + + + + + diff --git a/src/pages/Monitor/MonitorMain.vue b/src/pages/Monitor/MonitorMain.vue new file mode 100644 index 000000000..c1f2a31db --- /dev/null +++ b/src/pages/Monitor/MonitorMain.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/pages/Monitor/SalesClientsTable.vue b/src/pages/Monitor/SalesClientsTable.vue new file mode 100644 index 000000000..3f2389471 --- /dev/null +++ b/src/pages/Monitor/SalesClientsTable.vue @@ -0,0 +1,219 @@ + + + diff --git a/src/pages/Monitor/SalesOrdersTable.vue b/src/pages/Monitor/SalesOrdersTable.vue new file mode 100644 index 000000000..d8e28f6b7 --- /dev/null +++ b/src/pages/Monitor/SalesOrdersTable.vue @@ -0,0 +1,203 @@ + + + + diff --git a/src/pages/Monitor/SalesTicketsTable.vue b/src/pages/Monitor/SalesTicketsTable.vue new file mode 100644 index 000000000..f451123e9 --- /dev/null +++ b/src/pages/Monitor/SalesTicketsTable.vue @@ -0,0 +1,636 @@ + + + diff --git a/src/pages/Monitor/locale/en.yml b/src/pages/Monitor/locale/en.yml new file mode 100644 index 000000000..f58db7854 --- /dev/null +++ b/src/pages/Monitor/locale/en.yml @@ -0,0 +1,45 @@ +salesMonitor: + clientsOnWebsite: Clients on website + recentOrderActions: Recent order actions + ticketsMonitor: Tickets monitor +salesClientsTable: + from: From + to: To + date: Date + hour: Hour + salesPerson: Salesperson + client: Client +salesOrdersTable: + delete: Delete + date: Date + client: Client + salesPerson: Salesperson + deleteConfirmTitle: Delete selected elements + deleteConfirmMessage: All the selected elements will be deleted. Are you sure you want to continue? +salesTicketsTable: + autoRefresh: Auto-refresh + problems: Problems + noVerifiedData: No verified data + notVisible: Not visible + purchaseRequest: Purchase request + clientFrozen: Client frozen + risk: Risk + componentLack: Component lack + tooLittle: Ticket too little + identifier: Identifier + client: Client + salesPerson: Salesperson + date: Date + theoretical: Theoretical + practical: Practical + province: Province + state: State + isFragile: Is fragile + zone: Zone + goToLines: Go to lines + preview: Preview + total: Total + preparation: Preparation +searchBar: + label: Search tickets + info: Search tickets by id or alias diff --git a/src/pages/Monitor/locale/es.yml b/src/pages/Monitor/locale/es.yml new file mode 100644 index 000000000..918b51813 --- /dev/null +++ b/src/pages/Monitor/locale/es.yml @@ -0,0 +1,45 @@ +salesMonitor: + clientsOnWebsite: Clientes activos en la web + recentOrderActions: Acciones recientes en pedidos + ticketsMonitor: Monitor de tickets +salesClientsTable: + from: Desde + to: Hasta + date: Fecha + hour: Hora + salesPerson: Comercial + client: Cliente +salesOrdersTable: + delete: Eliminar + date: Fecha + client: Cliente + salesPerson: Comercial + deleteConfirmTitle: Eliminar los elementos seleccionados + deleteConfirmMessage: Todos los elementos seleccionados serán eliminados. ¿Seguro que quieres continuar? +salesTicketsTable: + autoRefresh: Auto-refresco + problems: Problemas + noVerifiedData: Sin datos comprobados + notVisible: No visible + purchaseRequest: Petición de compra + clientFrozen: Cliente congelado + risk: Riesgo + componentLack: Faltan componentes + tooLittle: Ticket demasiado pequeño + identifier: Identificador + client: Cliente + salesPerson: Comercial + date: Fecha + theoretical: Teórica + practical: Práctica + province: Provincia + state: Estado + isFragile: Es frágil + zone: Zona + goToLines: Ir a líneas + preview: Vista previa + total: Total + preparation: Preparación +searchBar: + label: Buscar tickets + info: Buscar tickets por identificador o alias diff --git a/src/pages/Ticket/Card/TicketSale.vue b/src/pages/Ticket/Card/TicketSale.vue new file mode 100644 index 000000000..02cccaff2 --- /dev/null +++ b/src/pages/Ticket/Card/TicketSale.vue @@ -0,0 +1 @@ + diff --git a/src/router/modules/index.js b/src/router/modules/index.js index 7fff2f2e5..38bcd54d5 100644 --- a/src/router/modules/index.js +++ b/src/router/modules/index.js @@ -18,6 +18,7 @@ import Parking from './parking'; import Agency from './agency'; import ItemType from './itemType'; import Zone from './zone'; +import Monitor from './monitor'; export default [ Item, @@ -40,4 +41,5 @@ export default [ Agency, ItemType, Zone, + Monitor, ]; diff --git a/src/router/modules/monitor.js b/src/router/modules/monitor.js new file mode 100644 index 000000000..6c388a474 --- /dev/null +++ b/src/router/modules/monitor.js @@ -0,0 +1,36 @@ +import { RouterView } from 'vue-router'; + +export default { + path: '/monitor', + name: 'Monitor', + meta: { + title: 'monitors', + icon: 'grid_view', + moduleName: 'Monitor', + }, + component: RouterView, + redirect: { name: 'MonitorMain' }, + menus: { + main: ['MonitorList'], + card: [], + }, + children: [ + { + path: '', + name: 'MonitorMain', + component: () => import('src/pages/Monitor/MonitorMain.vue'), + redirect: { name: 'MonitorList' }, + children: [ + { + path: 'list', + name: 'MonitorList', + meta: { + title: 'list', + icon: 'grid_view', + }, + component: () => import('src/pages/Monitor/MonitorList.vue'), + }, + ], + }, + ], +}; diff --git a/src/router/modules/ticket.js b/src/router/modules/ticket.js index eb6c1b6d2..6cb7291dc 100644 --- a/src/router/modules/ticket.js +++ b/src/router/modules/ticket.js @@ -12,7 +12,7 @@ export default { redirect: { name: 'TicketMain' }, menus: { main: ['TicketList'], - card: ['TicketBoxing', 'TicketSms'], + card: ['TicketBoxing', 'TicketSms', 'TicketSale'], }, children: [ { @@ -66,6 +66,15 @@ export default { }, component: () => import('src/pages/Ticket/Card/TicketBasicData.vue'), }, + { + name: 'TicketSale', + path: 'sale', + meta: { + title: 'sale', + icon: 'vn:lines', + }, + component: () => import('src/pages/Ticket/Card/TicketSale.vue'), + }, { path: 'boxing', name: 'TicketBoxing', diff --git a/src/router/routes.js b/src/router/routes.js index 04780ee17..6a0430d51 100644 --- a/src/router/routes.js +++ b/src/router/routes.js @@ -18,6 +18,7 @@ import roadmap from 'src/router/modules/roadmap'; import parking from 'src/router/modules/parking'; import agency from 'src/router/modules/agency'; import zone from 'src/router/modules/zone'; +import monitor from 'src/router/modules/monitor'; const routes = [ { @@ -65,6 +66,7 @@ const routes = [ shelving, invoiceOut, invoiceIn, + monitor, wagon, order, route, diff --git a/src/stores/useNavigationStore.js b/src/stores/useNavigationStore.js index ee1e04e9b..263a9dec8 100644 --- a/src/stores/useNavigationStore.js +++ b/src/stores/useNavigationStore.js @@ -15,6 +15,7 @@ export const useNavigationStore = defineStore('navigationStore', () => { 'travel', 'invoiceOut', 'invoiceIn', + 'monitor', 'supplier', 'claim', 'route', @@ -31,7 +32,6 @@ export const useNavigationStore = defineStore('navigationStore', () => { for (const module of modules) { const moduleDef = routes.find((route) => toLowerCamel(route.name) === module); if (!moduleDef) continue; - const item = addMenuItem(module, moduleDef, modulesRoutes.value); if (!item) continue;