#1723 ticket.index si el total es menor de 50€
gitea/salix/dev This commit looks good Details

This commit is contained in:
Carlos Jimenez Ruiz 2019-09-24 16:38:57 +02:00
parent 0c27b90c5d
commit 92eef27f37
2 changed files with 10 additions and 1 deletions

View File

@ -122,7 +122,11 @@
<vn-td>{{::ticket.warehouse}}</vn-td> <vn-td>{{::ticket.warehouse}}</vn-td>
<vn-td>{{::ticket.refFk | dashIfEmpty}}</vn-td> <vn-td>{{::ticket.refFk | dashIfEmpty}}</vn-td>
<vn-td shrink>{{::ticket.zoneLanding | dateTime: 'HH:mm'}}</vn-td> <vn-td shrink>{{::ticket.zoneLanding | dateTime: 'HH:mm'}}</vn-td>
<vn-td number>{{::ticket.total | currency: 'EUR': 2}}</vn-td> <vn-td>
<span number class="chip {{$ctrl.totalPriceColor(ticket)}}">
{{::ticket.total | currency: 'EUR': 2}}
</span>
</vn-td>
<vn-td actions> <vn-td actions>
<vn-icon-button <vn-icon-button
ng-click="$ctrl.goToLines($event, ticket.id)" ng-click="$ctrl.goToLines($event, ticket.id)"

View File

@ -102,6 +102,11 @@ export default class Controller {
return 'alert'; return 'alert';
} }
totalPriceColor(ticket) {
if (parseInt(ticket.total) < 50)
return 'warning';
}
showClientDescriptor(event, clientFk) { showClientDescriptor(event, clientFk) {
this.preventDefault(event); this.preventDefault(event);
this.$.clientDescriptor.clientFk = clientFk; this.$.clientDescriptor.clientFk = clientFk;