#1029 ir a lineas pedido en ticket.index

This commit is contained in:
Gerard 2019-02-06 09:55:17 +01:00
parent 3b4126ee79
commit 6d54c860cd
2 changed files with 13 additions and 2 deletions

View File

@ -74,7 +74,12 @@
<vn-td>{{::ticket.agencyMode}}</vn-td> <vn-td>{{::ticket.agencyMode}}</vn-td>
<vn-td>{{::ticket.warehouse}}</vn-td> <vn-td>{{::ticket.warehouse}}</vn-td>
<vn-td number>{{::ticket.total | currency: 'EUR': 2}}</vn-td> <vn-td number>{{::ticket.total | currency: 'EUR': 2}}</vn-td>
<vn-td> <vn-td number>
<vn-icon-button
ng-click="$ctrl.goToLines(ticket.id)"
vn-tooltip="Preview"
icon="icon-lines">
</vn-icon-button>
<vn-icon-button <vn-icon-button
ng-click="$ctrl.preview($event, ticket)" ng-click="$ctrl.preview($event, ticket)"
vn-tooltip="Preview" vn-tooltip="Preview"

View File

@ -8,7 +8,9 @@ export default class Controller {
this.$state = $state; this.$state = $state;
this.selectedTicket = null; this.selectedTicket = null;
this.moreOptions = [ this.moreOptions = [
{callback: this.goToTurns, name: 'Turns', always: true}, {callback: () => {
this.goToTurns('ticket.weekly');
}, name: 'Turns', always: true},
]; ];
if (!$stateParams.q) { if (!$stateParams.q) {
@ -42,6 +44,10 @@ export default class Controller {
this.$.model.clear(); this.$.model.clear();
} }
goToLines(ticketFk) {
this.$state.go('ticket.card.lines', {id: ticketFk});
}
goToTurns() { goToTurns() {
this.$state.go('ticket.weekly'); this.$state.go('ticket.weekly');
} }