52 lines
1.2 KiB
JavaScript
52 lines
1.2 KiB
JavaScript
import ngModule from '../module';
|
|
|
|
export default class Controller {
|
|
constructor($scope) {
|
|
this.$ = $scope;
|
|
this.ticketSelected = null;
|
|
|
|
this.filter = {
|
|
include: [
|
|
{
|
|
relation: 'client',
|
|
scope: {
|
|
fields: ['name']
|
|
}
|
|
},
|
|
{
|
|
relation: 'worker',
|
|
scope: {
|
|
fields: ['firstName', 'name']
|
|
}
|
|
},
|
|
{
|
|
relation: 'claimState',
|
|
scope: {
|
|
fields: ['description']
|
|
}
|
|
}
|
|
],
|
|
order: 'claimStateFk ASC, created DESC'
|
|
};
|
|
}
|
|
|
|
showDescriptor(event, clientFk) {
|
|
this.$.descriptor.clientFk = clientFk;
|
|
this.$.descriptor.parent = event.target;
|
|
this.$.descriptor.show();
|
|
event.preventDefault();
|
|
event.stopImmediatePropagation();
|
|
}
|
|
|
|
onDescriptorLoad() {
|
|
this.$.popover.relocate();
|
|
}
|
|
}
|
|
|
|
Controller.$inject = ['$scope'];
|
|
|
|
ngModule.component('vnClaimIndex', {
|
|
template: require('./index.html'),
|
|
controller: Controller
|
|
});
|