feat(descriptor-menu): handle error empty input
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
509e002e34
commit
dd47f209a2
|
@ -111,8 +111,7 @@
|
||||||
<span translate>Are you sure you want to send it?</span>
|
<span translate>Are you sure you want to send it?</span>
|
||||||
<vn-textfield vn-one
|
<vn-textfield vn-one
|
||||||
label="Email"
|
label="Email"
|
||||||
ng-model="sendPdfConfirmation.data.email"
|
ng-model="sendPdfConfirmation.data.email">
|
||||||
required>
|
|
||||||
</vn-textfield>
|
</vn-textfield>
|
||||||
</tpl-body>
|
</tpl-body>
|
||||||
<tpl-buttons>
|
<tpl-buttons>
|
||||||
|
@ -130,8 +129,7 @@
|
||||||
<span translate>Are you sure you want to send it?</span>
|
<span translate>Are you sure you want to send it?</span>
|
||||||
<vn-textfield vn-one
|
<vn-textfield vn-one
|
||||||
label="Email"
|
label="Email"
|
||||||
ng-model="sendCsvConfirmation.data.email"
|
ng-model="sendCsvConfirmation.data.email">
|
||||||
required>
|
|
||||||
</vn-textfield>
|
</vn-textfield>
|
||||||
</tpl-body>
|
</tpl-body>
|
||||||
<tpl-buttons>
|
<tpl-buttons>
|
||||||
|
|
|
@ -80,6 +80,9 @@ class Controller extends Section {
|
||||||
}
|
}
|
||||||
|
|
||||||
sendPdfInvoice($data) {
|
sendPdfInvoice($data) {
|
||||||
|
if (!$data.email)
|
||||||
|
return this.vnApp.showError(this.$t(`The email can't be empty`));
|
||||||
|
|
||||||
return this.vnEmail.send('invoice', {
|
return this.vnEmail.send('invoice', {
|
||||||
recipientId: this.invoiceOut.client.id,
|
recipientId: this.invoiceOut.client.id,
|
||||||
recipient: $data.email,
|
recipient: $data.email,
|
||||||
|
@ -88,6 +91,9 @@ class Controller extends Section {
|
||||||
}
|
}
|
||||||
|
|
||||||
sendCsvInvoice($data) {
|
sendCsvInvoice($data) {
|
||||||
|
if (!$data.email)
|
||||||
|
return this.vnApp.showError(this.$t(`The email can't be empty`));
|
||||||
|
|
||||||
return this.vnEmail.sendCsv('invoice', {
|
return this.vnEmail.sendCsv('invoice', {
|
||||||
recipientId: this.invoiceOut.client.id,
|
recipientId: this.invoiceOut.client.id,
|
||||||
recipient: $data.email,
|
recipient: $data.email,
|
||||||
|
|
|
@ -17,4 +17,5 @@ Are you sure you want to clone this invoice?: Estas seguro de clonar esta factur
|
||||||
InvoiceOut booked: Factura asentada
|
InvoiceOut booked: Factura asentada
|
||||||
Are you sure you want to book this invoice?: Estas seguro de querer asentar esta factura?
|
Are you sure you want to book this invoice?: Estas seguro de querer asentar esta factura?
|
||||||
Regenerate PDF invoice: Regenerar PDF factura
|
Regenerate PDF invoice: Regenerar PDF factura
|
||||||
The invoice PDF document has been regenerated: El documento PDF de la factura ha sido regenerado
|
The invoice PDF document has been regenerated: El documento PDF de la factura ha sido regenerado
|
||||||
|
The email can't be empty: El correo no puede estar vacío
|
Loading…
Reference in New Issue