fix: fixed sms when clients do not have phone
gitea/salix-front/pipeline/pr-master This commit looks good
Details
gitea/salix-front/pipeline/pr-master This commit looks good
Details
This commit is contained in:
parent
137c165b4d
commit
dfdb9685d2
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue