2019-01-28 15:24:45 +00:00
|
|
|
import ngModule from '../module';
|
2020-03-18 11:55:22 +00:00
|
|
|
import Section from 'salix/components/section';
|
2019-01-28 15:24:45 +00:00
|
|
|
|
2020-03-18 11:55:22 +00:00
|
|
|
export default class Controller extends Section {
|
2019-01-28 15:24:45 +00:00
|
|
|
preview(event, worker) {
|
|
|
|
if (event.defaultPrevented) return;
|
2020-02-03 13:03:09 +00:00
|
|
|
|
2019-01-28 15:24:45 +00:00
|
|
|
event.preventDefault();
|
2019-11-10 10:08:44 +00:00
|
|
|
event.stopPropagation();
|
|
|
|
|
2019-01-28 15:24:45 +00:00
|
|
|
this.selectedWorker = worker;
|
|
|
|
this.$.preview.show();
|
|
|
|
}
|
2019-03-12 14:04:09 +00:00
|
|
|
|
2020-02-03 13:03:09 +00:00
|
|
|
goToTimeControl(event, workerId) {
|
|
|
|
if (event.defaultPrevented) return;
|
|
|
|
|
|
|
|
event.preventDefault();
|
|
|
|
event.stopPropagation();
|
|
|
|
this.$state.go('worker.card.timeControl', {id: workerId}, {absolute: true});
|
|
|
|
}
|
2020-03-18 11:55:22 +00:00
|
|
|
|
2019-03-12 14:04:09 +00:00
|
|
|
onMoreChange(callback) {
|
|
|
|
callback.call(this);
|
|
|
|
}
|
2019-01-28 15:24:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ngModule.component('vnWorkerIndex', {
|
|
|
|
template: require('./index.html'),
|
|
|
|
controller: Controller
|
|
|
|
});
|