From 89048935287bf4dc84c03ab20e98a9f226fa59f3 Mon Sep 17 00:00:00 2001 From: pablone Date: Mon, 16 Oct 2023 08:50:58 +0200 Subject: [PATCH 1/2] fix(sms): se importa workerDescriptro y se maneja el error refs #6303 --- src/pages/Ticket/Card/TicketDescriptor.vue | 1 + src/pages/Ticket/Card/TicketDescriptorMenu.vue | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pages/Ticket/Card/TicketDescriptor.vue b/src/pages/Ticket/Card/TicketDescriptor.vue index 25c9dfb1c..641ffee0c 100644 --- a/src/pages/Ticket/Card/TicketDescriptor.vue +++ b/src/pages/Ticket/Card/TicketDescriptor.vue @@ -8,6 +8,7 @@ import CardDescriptor from 'components/ui/CardDescriptor.vue'; import TicketDescriptorMenu from './TicketDescriptorMenu.vue'; import VnLv from 'src/components/ui/VnLv.vue'; import useCardDescription from 'src/composables/useCardDescription'; +import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue'; const $props = defineProps({ id: { diff --git a/src/pages/Ticket/Card/TicketDescriptorMenu.vue b/src/pages/Ticket/Card/TicketDescriptorMenu.vue index f55229bcf..7177db593 100644 --- a/src/pages/Ticket/Card/TicketDescriptorMenu.vue +++ b/src/pages/Ticket/Card/TicketDescriptorMenu.vue @@ -64,6 +64,7 @@ async function sendDeliveryNote({ address, type, documentType }) { const shipped = toDate(ticket.value.shipped); function showSmsDialog(template, customData) { + console.log('Entra'); const address = ticket.value.address; const client = ticket.value.client; const phone = @@ -87,7 +88,7 @@ function showSmsDialog(template, customData) { componentProps: { phone: phone, template: template, - locale: client.user.lang, + locale: client.user ? client.user.lang : 'default_locale', data: data, promise: sendSms, }, From 065d2307f8945b9a2bc46e2e9ad34ade21aa5e9f Mon Sep 17 00:00:00 2001 From: pablone Date: Wed, 25 Oct 2023 21:00:29 +0200 Subject: [PATCH 2/2] fix(ticketDescriptorMenu): refs #6303 remove console.log modify clientLang --- src/pages/Ticket/Card/TicketDescriptorMenu.vue | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/pages/Ticket/Card/TicketDescriptorMenu.vue b/src/pages/Ticket/Card/TicketDescriptorMenu.vue index 7177db593..95f6a94d9 100644 --- a/src/pages/Ticket/Card/TicketDescriptorMenu.vue +++ b/src/pages/Ticket/Card/TicketDescriptorMenu.vue @@ -64,7 +64,6 @@ async function sendDeliveryNote({ address, type, documentType }) { const shipped = toDate(ticket.value.shipped); function showSmsDialog(template, customData) { - console.log('Entra'); const address = ticket.value.address; const client = ticket.value.client; const phone = @@ -88,7 +87,7 @@ function showSmsDialog(template, customData) { componentProps: { phone: phone, template: template, - locale: client.user ? client.user.lang : 'default_locale', + locale: client?.user?.lang ?? 'default_locale', data: data, promise: sendSms, },