salix/client/claim/src/index/index.js

52 lines
1.2 KiB
JavaScript
Raw Normal View History

2018-08-07 09:57:11 +00:00
import ngModule from '../module';
export default class Controller {
constructor($scope) {
this.$ = $scope;
this.ticketSelected = null;
this.filter = {
include: [
{
2018-08-07 10:48:55 +00:00
relation: 'client',
2018-08-07 09:57:11 +00:00
scope: {
fields: ['name']
}
2018-08-07 10:48:55 +00:00
},
{
relation: 'worker',
2018-08-07 09:57:11 +00:00
scope: {
2018-08-07 10:48:55 +00:00
fields: ['firstName', 'name']
2018-08-07 09:57:11 +00:00
}
2018-08-07 10:48:55 +00:00
},
{
relation: 'claimState',
2018-08-07 09:57:11 +00:00
scope: {
2018-08-07 10:48:55 +00:00
fields: ['description']
2018-08-07 09:57:11 +00:00
}
}
],
2018-08-07 10:48:55 +00:00
order: 'claimStateFk ASC, created DESC'
2018-08-07 09:57:11 +00:00
};
}
2018-08-31 12:35:20 +00:00
showDescriptor(event, clientFk) {
this.$.descriptor.clientFk = clientFk;
this.$.descriptor.parent = event.target;
this.$.descriptor.show();
event.preventDefault();
event.stopImmediatePropagation();
}
onDescriptorLoad() {
this.$.popover.relocate();
}
2018-08-07 09:57:11 +00:00
}
Controller.$inject = ['$scope'];
ngModule.component('vnClaimIndex', {
template: require('./index.html'),
controller: Controller
});