refator: trying to delete async and await
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
f95f977b69
commit
dc62841c3d
|
@ -50,6 +50,14 @@ class Controller extends Dialog {
|
|||
this.$.invoiceButton.disabled = false;
|
||||
}
|
||||
|
||||
invoice() {
|
||||
const clientAndAddress = clientsAndAddresses[this.pos];
|
||||
return this.post(`InvoiceOuts/globalInvoicing`, params, options).then(() => {
|
||||
this.pos++;
|
||||
this.invoice();
|
||||
});
|
||||
}
|
||||
|
||||
async responseHandler(response) {
|
||||
try {
|
||||
if (response !== 'accept')
|
||||
|
@ -69,7 +77,10 @@ class Controller extends Dialog {
|
|||
this.$.invoiceButton.disabled = true;
|
||||
if (this.clientsNumber == 'allClients') this.getMaxClientId();
|
||||
|
||||
return this.$http.post(`InvoiceOuts/clientToInvoice`, this.invoice)
|
||||
this.pos = 0;
|
||||
this.invoice();
|
||||
|
||||
this.$http.post(`InvoiceOuts/clientToInvoice`, this.invoice)
|
||||
.then(async res => {
|
||||
const invoice = res.data.invoice;
|
||||
const clientsAndAddresses = res.data.clientsAndAddresses;
|
||||
|
@ -91,7 +102,7 @@ class Controller extends Dialog {
|
|||
const options = {
|
||||
timeout: this.canceler.promise
|
||||
};
|
||||
await this.$http.post(`InvoiceOuts/globalInvoicing`, params, options);
|
||||
await this.$http.post(`InvoiceOuts/globalInvoicing`, params, options).then();
|
||||
}
|
||||
})
|
||||
.then(() => super.responseHandler(response))
|
||||
|
|
Loading…
Reference in New Issue