Merge pull request 'item diary, fix ticket descriptor' (#290) from 2288-item_diary into dev
gitea/salix/pipeline/head This commit looks good Details

Reviewed-by: Joan Sanchez <joan@verdnatura.es>
This commit is contained in:
Joan Sanchez 2020-06-03 11:09:19 +00:00
commit ca19581a5d
2 changed files with 9 additions and 4 deletions

View File

@ -48,9 +48,8 @@
</span> </span>
</vn-td> </vn-td>
<vn-td number> <vn-td number>
<span class="chip" <span ng-class="::{link: sale.isTicket}"
ng-class="::{link: sale.isTicket}" ng-click="$ctrl.showTicketDescriptor($event, sale)"
vn-click-stop="descriptor.show($event, sale.origin)"
name="origin"> name="origin">
{{::sale.origin | dashIfEmpty}} {{::sale.origin | dashIfEmpty}}
</span> </span>
@ -83,7 +82,7 @@
</vn-card> </vn-card>
</vn-vertical> </vn-vertical>
<vn-ticket-descriptor-popover <vn-ticket-descriptor-popover
vn-id="descriptor"> vn-id="ticket-descriptor">
</vn-ticket-descriptor-popover> </vn-ticket-descriptor-popover>
<vn-client-descriptor-popover <vn-client-descriptor-popover
vn-id="clientDescriptor"> vn-id="clientDescriptor">

View File

@ -57,6 +57,12 @@ class Controller extends Section {
this.$location.hash(hash); this.$location.hash(hash);
this.$anchorScroll(); this.$anchorScroll();
} }
showTicketDescriptor(event, sale) {
if (!sale.isTicket) return;
this.$.ticketDescriptor.show(event.target, sale.origin);
}
} }
Controller.$inject = ['$element', '$scope', '$anchorScroll', '$location']; Controller.$inject = ['$element', '$scope', '$anchorScroll', '$location'];