feat: mostrar error
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Vicent Llopis 2023-01-26 09:25:52 +01:00
parent 77340c8459
commit 0ba95bd163
3 changed files with 10 additions and 26 deletions

View File

@ -1,4 +1,4 @@
<vn-card class="vn-w-lg"> <vn-card class="vn-w-lg vn-ma-md">
<h5 ng-if="$ctrl.packageInvoicing" translate text-center class="vn-pa-md">{{'Calculating packages to invoice...'}}</h5> <h5 ng-if="$ctrl.packageInvoicing" translate text-center class="vn-pa-md">{{'Calculating packages to invoice...'}}</h5>
<vn-vertical ng-if="$ctrl.clients.length" text-center class="vn-pa-md"> <vn-vertical ng-if="$ctrl.clients.length" text-center class="vn-pa-md">
<h5 translate>Invoicing</h5> <h5 translate>Invoicing</h5>
@ -19,7 +19,7 @@
<vn-th field="nickname">Nickname</vn-th> <vn-th field="nickname">Nickname</vn-th>
<vn-th field="addressId" number>Address id</vn-th> <vn-th field="addressId" number>Address id</vn-th>
<vn-th field="street" expand>Street</vn-th> <vn-th field="street" expand>Street</vn-th>
<vn-th shrink></vn-th> <vn-th field="error" expand>Error</vn-th>
</vn-tr> </vn-tr>
</vn-thead> </vn-thead>
<vn-tbody> <vn-tbody>
@ -41,20 +41,12 @@
<vn-td expand> <vn-td expand>
{{::client.address.street}} {{::client.address.street}}
</vn-td> </vn-td>
<vn-td shrink> <vn-td expand>
<vn-spinner <vn-spinner
ng-if="client.status == 'waiting'" ng-if="client.status == 'waiting'"
enable="true"> enable="true">
</vn-spinner> </vn-spinner>
<vn-icon {{::client.error}}
ng-if="client.status == 'ok'"
icon="check">
</vn-icon>
<vn-icon
vn-tooltip={{::client.error}}
ng-if="client.status == 'error'"
icon="clear">
</vn-icon>
</vn-td> </vn-td>
</vn-tr> </vn-tr>
</vn-tbody> </vn-tbody>

View File

@ -10,10 +10,6 @@ class Controller extends Section {
maxShipped: new Date(), maxShipped: new Date(),
companyFk: this.vnConfig.companyFk companyFk: this.vnConfig.companyFk
}; };
this.invoice.invoiceDate = new Date();
this.invoice.companyFk = 442;
this.invoice.printerFk = 1;
} }
$onInit() { $onInit() {
@ -84,7 +80,6 @@ class Controller extends Section {
return this.$http.post(`InvoiceOuts/invoiceClient`, params) return this.$http.post(`InvoiceOuts/invoiceClient`, params)
.then(() => { .then(() => {
this.$.data[index].status = 'ok';
this.$.data.shift(); this.$.data.shift();
}).catch(res => { }).catch(res => {
this.$.data[index].status = 'error'; this.$.data[index].status = 'error';

View File

@ -2,17 +2,14 @@
vn-invoice-out-global-invoicing{ vn-invoice-out-global-invoicing{
vn-td {
vn-icon[icon=clear] {
color: $color-alert;
}
vn-icon[icon=check] {
color: $color-success;
}
}
h5{ h5{
color: $color-primary; color: $color-primary;
} }
.vn-table vn-tbody > * > vn-td {
overflow: visible;
}
} }