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
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:
commit
4a1b6136d8
|
@ -893,6 +893,8 @@ components:
|
||||||
VnLv:
|
VnLv:
|
||||||
copyText: '{copyValue} has been copied to the clipboard'
|
copyText: '{copyValue} has been copied to the clipboard'
|
||||||
iban_tooltip: 'IBAN: ES21 1234 5678 90 0123456789'
|
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:
|
weekdays:
|
||||||
sun: Sunday
|
sun: Sunday
|
||||||
mon: Monday
|
mon: Monday
|
||||||
|
|
|
@ -980,6 +980,8 @@ components:
|
||||||
VnLv:
|
VnLv:
|
||||||
copyText: '{copyValue} se ha copiado al portapepeles'
|
copyText: '{copyValue} se ha copiado al portapepeles'
|
||||||
iban_tooltip: 'IBAN: ES21 1234 5678 90 0123456789'
|
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:
|
weekdays:
|
||||||
sun: Domingo
|
sun: Domingo
|
||||||
mon: Lunes
|
mon: Lunes
|
||||||
|
|
|
@ -199,12 +199,22 @@ const confirmRemove = (ticket) => {
|
||||||
const openSmsDialog = async () => {
|
const openSmsDialog = async () => {
|
||||||
const clientsId = [];
|
const clientsId = [];
|
||||||
const clientsPhone = [];
|
const clientsPhone = [];
|
||||||
|
const clientWithoutPhone = [];
|
||||||
for (let ticket of selectedRows.value) {
|
for (let ticket of selectedRows.value) {
|
||||||
clientsId.push(ticket?.clientFk);
|
clientsId.push(ticket?.clientFk);
|
||||||
const { data: client } = await axios.get(`Clients/${ticket?.clientFk}`);
|
const { data: client } = await axios.get(`Clients/${ticket?.clientFk}`);
|
||||||
|
if (!client.phone) {
|
||||||
|
clientWithoutPhone.push(ticket?.clientFk);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
clientsPhone.push(client.phone);
|
clientsPhone.push(client.phone);
|
||||||
}
|
}
|
||||||
|
if (clientWithoutPhone.length) {
|
||||||
|
quasar.notify({
|
||||||
|
type: 'warning',
|
||||||
|
message: t('components.VnNotes.clientWithoutPhone', { clientWithoutPhone }),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
quasar.dialog({
|
quasar.dialog({
|
||||||
component: SendSmsDialog,
|
component: SendSmsDialog,
|
||||||
|
|
Loading…
Reference in New Issue