refactor: delete counter
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
39f4445172
commit
53112995bc
|
@ -51,7 +51,7 @@ class Controller extends Dialog {
|
|||
}
|
||||
|
||||
invoiceOut(invoice, clientsAndAddresses) {
|
||||
const clientAndAddress = clientsAndAddresses[this.pos];
|
||||
const [clientAndAddress] = clientsAndAddresses;
|
||||
if (!clientAndAddress) return;
|
||||
this.currentClientId = clientAndAddress.clientId;
|
||||
const params = {
|
||||
|
@ -70,7 +70,7 @@ class Controller extends Dialog {
|
|||
|
||||
return this.$http.post(`InvoiceOuts/invoiceClient`, params, options)
|
||||
.then(() => {
|
||||
this.pos++;
|
||||
clientsAndAddresses.shift();
|
||||
return this.invoiceOut(invoice, clientsAndAddresses);
|
||||
});
|
||||
}
|
||||
|
@ -100,7 +100,6 @@ class Controller extends Dialog {
|
|||
const clientsAndAddresses = res.data.clientsAndAddresses;
|
||||
if (!clientsAndAddresses.length) return super.responseHandler(response);
|
||||
this.lastClientId = clientsAndAddresses[clientsAndAddresses.length - 1].clientId;
|
||||
this.pos = 0;
|
||||
return this.invoiceOut(invoice, clientsAndAddresses);
|
||||
})
|
||||
.then(() => super.responseHandler(response))
|
||||
|
|
Loading…
Reference in New Issue