Merge pull request 'Hotfix[SendSms]: Fixed SMS when clients do not have phone' (!1610) from Hotfix-RouteSendSms into master
gitea/salix-front/pipeline/head This commit looks good Details

Reviewed-on: #1610
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
Jon Elias 2025-03-18 11:55:40 +00:00
commit 4a1b6136d8
3 changed files with 15 additions and 1 deletions

View File

@ -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

View File

@ -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

View File

@ -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,