feat: update message while globalInvoicing
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
4f5abb709a
commit
53f78a98d2
|
@ -19,9 +19,7 @@
|
|||
ng-if="$ctrl.isInvoicing">
|
||||
<vn-horizontal>
|
||||
<vn-icon vn-none icon="warning"></vn-icon>
|
||||
<span vn-none translate>Adding invoices to queue...</span>
|
||||
{{$ctrl.lastClientId}}
|
||||
<span translate>{{::$ctrl.lastClientId || 'Vacío'}}</span>
|
||||
{{$ctrl.currentClientId}} {{$ctrl.$t('of')}} {{$ctrl.lastClientId}}
|
||||
</vn-horizontal>
|
||||
</div>
|
||||
<vn-horizontal>
|
||||
|
|
|
@ -57,19 +57,17 @@ class Controller extends Dialog {
|
|||
if (!this.invoice.fromClientId)
|
||||
throw new Error('Choose a valid clients range');
|
||||
|
||||
this.isInvoicing = true;
|
||||
return this.$http.post(`InvoiceOuts/clientToInvoice`, this.invoice)
|
||||
.then(res => {
|
||||
.then(async res => {
|
||||
this.lastClientId = res.data[res.data.length - 1];
|
||||
console.log(this.lastClientId);
|
||||
this.isInvoicing = true;
|
||||
for (let clientId of res.data) {
|
||||
this.currentClientId = clientId;
|
||||
const params = {clientId: clientId};
|
||||
await this.$http.post(`InvoiceOuts/globalInvoicing`, params);
|
||||
}
|
||||
})
|
||||
// .then(() => {
|
||||
// for (let clientId of res.data) {
|
||||
// const params = {clientId: clientId};
|
||||
// this.$http.post(`InvoiceOuts/globalInvoicing`, params);
|
||||
// }
|
||||
// })
|
||||
// .then(() => super.responseHandler(response))
|
||||
.then(() => super.responseHandler(response))
|
||||
.then(() => this.vnApp.showSuccess(this.$t('Data saved!')))
|
||||
.finally(() => this.isInvoicing = false);
|
||||
} catch (e) {
|
||||
|
|
|
@ -7,3 +7,4 @@ From client: Desde el cliente
|
|||
To client: Hasta el cliente
|
||||
Invoice date and the max date should be filled: La fecha de factura y la fecha límite deben rellenarse
|
||||
Choose a valid clients range: Selecciona un rango válido de clientes
|
||||
of: de
|
Loading…
Reference in New Issue