2019-03-21 12:46:14 +00:00
|
|
|
import ngModule from '../module';
|
2020-03-17 14:24:55 +00:00
|
|
|
import Section from 'salix/components/section';
|
2019-03-21 12:46:14 +00:00
|
|
|
|
2020-03-17 14:24:55 +00:00
|
|
|
export default class Controller extends Section {
|
2019-04-25 06:28:08 +00:00
|
|
|
showWorkerDescriptor(event, workerFk) {
|
2019-03-21 12:46:14 +00:00
|
|
|
if (event.defaultPrevented) return;
|
|
|
|
event.preventDefault();
|
2019-11-10 10:08:44 +00:00
|
|
|
event.stopPropagation();
|
2019-03-21 12:46:14 +00:00
|
|
|
|
2019-04-25 06:28:08 +00:00
|
|
|
this.selectedWorker = workerFk;
|
2019-03-21 12:46:14 +00:00
|
|
|
this.$.workerDescriptor.parent = event.target;
|
|
|
|
this.$.workerDescriptor.show();
|
|
|
|
}
|
|
|
|
|
|
|
|
preview(event, route) {
|
2019-11-10 10:08:44 +00:00
|
|
|
if (event.defaultPrevented) return;
|
|
|
|
event.preventDefault();
|
|
|
|
event.stopPropagation();
|
|
|
|
|
2019-03-21 12:46:14 +00:00
|
|
|
this.routeSelected = route;
|
2019-03-22 10:10:23 +00:00
|
|
|
this.$.summary.show();
|
2019-03-21 12:46:14 +00:00
|
|
|
}
|
2019-04-25 06:28:08 +00:00
|
|
|
|
|
|
|
onSearch(params) {
|
|
|
|
if (params)
|
|
|
|
this.$.model.applyFilter(null, params);
|
|
|
|
else
|
|
|
|
this.$.model.clear();
|
|
|
|
}
|
2019-03-21 12:46:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ngModule.component('vnRouteIndex', {
|
|
|
|
template: require('./index.html'),
|
|
|
|
controller: Controller
|
|
|
|
});
|