40 lines
1008 B
JavaScript
40 lines
1008 B
JavaScript
import ngModule from '../module';
|
|
|
|
class Controller {
|
|
constructor($scope, $stateParams) {
|
|
this.$scope = $scope;
|
|
this.$stateParams = $stateParams;
|
|
}
|
|
|
|
showDescriptor(event, itemFk) {
|
|
this.quicklinks = {
|
|
btnThree: {
|
|
icon: 'icon-transaction',
|
|
state: `item.card.diary({
|
|
id: ${itemFk},
|
|
warehouseFk: ${this.ticket.warehouseFk},
|
|
ticketFk: ${this.ticket.id}
|
|
})`,
|
|
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('vnTicketSaleTracking', {
|
|
template: require('./index.html'),
|
|
controller: Controller,
|
|
bindings: {
|
|
ticket: '<',
|
|
},
|
|
});
|