diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index d7187371e..7ce4e49a1 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -893,6 +893,8 @@ components: VnLv: copyText: '{copyValue} has been copied to the clipboard' iban_tooltip: 'IBAN: ES21 1234 5678 90 0123456789' + VnNotes: + clientWithoutPhone: 'The following clients do not have a phone number and the message will not be sent to them: {clientWithoutPhone}' weekdays: sun: Sunday mon: Monday diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index fc3018f39..7ce2a446b 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -980,6 +980,8 @@ components: VnLv: copyText: '{copyValue} se ha copiado al portapepeles' iban_tooltip: 'IBAN: ES21 1234 5678 90 0123456789' + VnNotes: + clientWithoutPhone: 'Estos clientes no tienen asociado número de télefono y el sms no les será enviado: {clientWithoutPhone}' weekdays: sun: Domingo mon: Lunes diff --git a/src/pages/Route/RouteTickets.vue b/src/pages/Route/RouteTickets.vue index adc7dfdaa..c056a0b3d 100644 --- a/src/pages/Route/RouteTickets.vue +++ b/src/pages/Route/RouteTickets.vue @@ -199,12 +199,22 @@ const confirmRemove = (ticket) => { const openSmsDialog = async () => { const clientsId = []; const clientsPhone = []; - + const clientWithoutPhone = []; for (let ticket of selectedRows.value) { clientsId.push(ticket?.clientFk); const { data: client } = await axios.get(`Clients/${ticket?.clientFk}`); + if (!client.phone) { + clientWithoutPhone.push(ticket?.clientFk); + continue; + } clientsPhone.push(client.phone); } + if (clientWithoutPhone.length) { + quasar.notify({ + type: 'warning', + message: t('components.VnNotes.clientWithoutPhone', { clientWithoutPhone }), + }); + } quasar.dialog({ component: SendSmsDialog,