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

46 lines
1.2 KiB
JavaScript
Raw Normal View History

import ngModule from '../../module';
2018-07-17 06:44:31 +00:00
class Controller {
constructor($scope, $stateParams) {
this.$ = $scope;
2018-07-17 06:44:31 +00:00
this.$stateParams = $stateParams;
this.filter = {
include: [
{
2019-01-22 09:04:42 +00:00
relation: 'worker',
2018-07-17 06:44:31 +00:00
scope: {
fields: ['userFk'],
include: {
relation: 'user',
scope: {
fields: ['nickname']
}
}
2018-07-17 06:44:31 +00:00
}
},
{
2019-01-22 09:04:42 +00:00
relation: 'state',
2018-07-17 06:44:31 +00:00
scope: {
2019-01-22 09:04:42 +00:00
fields: ['name']
2018-07-17 06:44:31 +00:00
}
}
]
};
}
showWorkerDescriptor(event, userId) {
event.preventDefault();
event.stopImmediatePropagation();
this.selectedWorker = userId;
this.$.workerDescriptor.parent = event.target;
this.$.workerDescriptor.show();
}
2018-07-17 06:44:31 +00:00
}
Controller.$inject = ['$scope', '$stateParams'];
ngModule.component('vnTicketTrackingIndex', {
template: require('./index.html'),
2018-07-17 06:44:31 +00:00
controller: Controller
});