45 lines
1.2 KiB
JavaScript
45 lines
1.2 KiB
JavaScript
import ngModule from '../module';
|
|
|
|
export default class Controller {
|
|
constructor($scope, $state, $stateParams) {
|
|
this.$stateParams = $stateParams;
|
|
this.$state = $state;
|
|
this.$ = $scope;
|
|
this.ticketSelected = null;
|
|
}
|
|
|
|
showClientDescriptor(event, clientFk) {
|
|
this.$.clientDescriptor.clientFk = clientFk;
|
|
this.$.clientDescriptor.parent = event.target;
|
|
this.$.clientDescriptor.show();
|
|
event.preventDefault();
|
|
event.stopImmediatePropagation();
|
|
}
|
|
|
|
showWorkerDescriptor(event, workerFk) {
|
|
event.preventDefault();
|
|
event.stopImmediatePropagation();
|
|
this.selectedWorker = workerFk;
|
|
this.$.workerDescriptor.parent = event.target;
|
|
this.$.workerDescriptor.show();
|
|
}
|
|
|
|
onDescriptorLoad() {
|
|
this.$.popover.relocate();
|
|
}
|
|
|
|
preview(event, order) {
|
|
event.preventDefault();
|
|
event.stopImmediatePropagation();
|
|
this.selectedOrder = order;
|
|
this.$.summary.show();
|
|
}
|
|
}
|
|
|
|
Controller.$inject = ['$scope', '$state', '$stateParams'];
|
|
|
|
ngModule.component('vnOrderIndex', {
|
|
template: require('./index.html'),
|
|
controller: Controller
|
|
});
|