From ecf131ba78847e8eb8c0f02bff45f3e495da9a8b Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Thu, 14 Nov 2024 12:06:12 +0100 Subject: [PATCH] feat: move buttons to DescriptorMenu --- .../Customer/Card/CustomerDescriptor.vue | 34 -------------- .../Customer/Card/CustomerDescriptorMenu.vue | 44 +++++++++++++++++++ src/pages/Ticket/TicketList.vue | 12 ++--- 3 files changed, 51 insertions(+), 39 deletions(-) diff --git a/src/pages/Customer/Card/CustomerDescriptor.vue b/src/pages/Customer/Card/CustomerDescriptor.vue index 974b05181..e46d2cb29 100644 --- a/src/pages/Customer/Card/CustomerDescriptor.vue +++ b/src/pages/Customer/Card/CustomerDescriptor.vue @@ -174,23 +174,6 @@ const setData = (entity) => (data.value = useCardDescription(entity?.name, entit > {{ t('Customer ticket list') }} - - {{ t('New ticket') }} - - {{ t('New order') }} - + + {{ t('globals.pageTitles.createTicket') }} + + + + + {{ t('globals.pageTitles.createOrder') }} + + {{ t('Send SMS') }} diff --git a/src/pages/Ticket/TicketList.vue b/src/pages/Ticket/TicketList.vue index a3876a1a6..0685217ac 100644 --- a/src/pages/Ticket/TicketList.vue +++ b/src/pages/Ticket/TicketList.vue @@ -45,6 +45,13 @@ const userParams = { from: null, to: null, }; + +onMounted(() => { + initializeFromQuery(); + stateStore.rightDrawer = true; + if (!route.query.createForm) return; + onClientSelected(JSON.parse(route.query.createForm)); +}); // Método para inicializar las variables desde la query string const initializeFromQuery = () => { const query = route.query.table ? JSON.parse(route.query.table) : {}; @@ -301,11 +308,6 @@ const getDateColor = (date) => { if (comparation < 0) return 'bg-success'; }; -onMounted(() => { - initializeFromQuery(); - stateStore.rightDrawer = true; -}); - async function makeInvoice(ticket) { const ticketsIds = ticket.map((item) => item.id); const { data } = await axios.post(`Tickets/invoiceTicketsAndPdf`, { ticketsIds });