import ngModule from '../module'; class Controller { constructor($scope, $stateParams) { this.$scope = $scope; this.$stateParams = $stateParams; this.filter = { include: [{ relation: 'item', scope: { include: { relation: 'tags', scope: { fields: ['tagFk', 'value'], include: { relation: 'tag', scope: { fields: ['name'] } }, limit: 6 } }, fields: ['itemFk', 'name'] } }, { relation: 'isChecked', scope: { fields: ['isChecked'] } }] }; } showDescriptor(event, itemFk) { this.quicklinks = { btnThree: { icon: 'icon-transaction', state: `item.card.diary({ id: ${itemFk}, q: '{"warehouseFk": ${this.ticket.warehouseFk}}' })`, tooltip: 'Item diary' } }; this.$scope.descriptor.itemFk = itemFk; this.$scope.descriptor.parent = event.target; this.$scope.descriptor.show(); } onDescriptorLoad() { this.$scope.popover.relocate(); } } Controller.$inject = ['$scope', '$stateParams']; ngModule.component('vnTicketSaleChecked', { template: require('./index.html'), controller: Controller, bindings: { ticket: '<' } });