import ngModule from '../module'; export default class Controller { constructor($scope, vnToken) { this.accessToken = vnToken.token; this.$ = $scope; } showWorkerDescriptor(event, workerFk) { if (event.defaultPrevented) return; event.preventDefault(); event.stopImmediatePropagation(); this.selectedWorker = workerFk; this.$.workerDescriptor.parent = event.target; this.$.workerDescriptor.show(); } preview(event, route) { this.routeSelected = route; this.$.summary.show(); event.preventDefault(); event.stopImmediatePropagation(); } onSearch(params) { if (params) this.$.model.applyFilter(null, params); else this.$.model.clear(); } } Controller.$inject = ['$scope', 'vnToken']; ngModule.component('vnRouteIndex', { template: require('./index.html'), controller: Controller });