salix/modules/ticket/front/tracking/index/index.js

46 lines
1.2 KiB
JavaScript

import ngModule from '../../module';
class Controller {
constructor($scope, $stateParams) {
this.$ = $scope;
this.$stateParams = $stateParams;
this.filter = {
include: [
{
relation: 'worker',
scope: {
fields: ['userFk'],
include: {
relation: 'user',
scope: {
fields: ['nickname']
}
}
}
},
{
relation: 'state',
scope: {
fields: ['name']
}
}
]
};
}
showWorkerDescriptor(event, workerFk) {
event.preventDefault();
event.stopImmediatePropagation();
this.selectedWorker = workerFk;
this.$.workerDescriptor.parent = event.target;
this.$.workerDescriptor.show();
}
}
Controller.$inject = ['$scope', '$stateParams'];
ngModule.component('vnTicketTrackingIndex', {
template: require('./index.html'),
controller: Controller
});