feat: añadir clientes al principio del array y borrarlos si han sido OK
gitea/salix/pipeline/head Something is wrong with the build of this commit
Details
gitea/salix/pipeline/head Something is wrong with the build of this commit
Details
This commit is contained in:
parent
adc2c32ac4
commit
ae051c73f2
|
@ -67,7 +67,7 @@ class Controller extends Section {
|
|||
.then(res => {
|
||||
this.address = res.data;
|
||||
|
||||
this.$.data.push({
|
||||
this.$.data.unshift({
|
||||
id: clientAndAddress.clientId,
|
||||
address: this.address,
|
||||
status: 'waiting'
|
||||
|
@ -80,6 +80,7 @@ class Controller extends Section {
|
|||
return this.$http.post(`InvoiceOuts/invoiceClient`, params)
|
||||
.then(() => {
|
||||
this.$.data[index].status = 'ok';
|
||||
this.$.data.shift();
|
||||
}).catch(res => {
|
||||
this.$.data[index].status = 'error';
|
||||
this.$.data[index].error = res.data.error.message;
|
||||
|
@ -101,6 +102,9 @@ class Controller extends Section {
|
|||
if (!this.invoice.companyFk)
|
||||
throw new Error('Choose a valid company');
|
||||
|
||||
if (!this.invoice.printerFk)
|
||||
throw new Error('Choose a valid printer');
|
||||
|
||||
this.$.invoiceButton.disabled = true;
|
||||
this.$.data = [];
|
||||
this.packageInvoicing = true;
|
||||
|
|
|
@ -4,6 +4,7 @@ Invoice date: Fecha de factura
|
|||
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
|
||||
Choose a valid company: Selecciona un empresa válida
|
||||
Choose a valid printer: Selecciona una impresora válida
|
||||
Clients range: Rango de clientes
|
||||
All clients: Todos los clientes
|
||||
Calculating packages to invoice...: Calculando paquetes a facturar...
|
||||
|
|
Loading…
Reference in New Issue