salix/modules/worker/front/index/index.js

32 lines
765 B
JavaScript

import ngModule from '../module';
import Section from 'salix/components/section';
export default class Controller extends Section {
preview(event, worker) {
if (event.defaultPrevented) return;
event.preventDefault();
event.stopPropagation();
this.selectedWorker = worker;
this.$.preview.show();
}
goToTimeControl(event, workerId) {
if (event.defaultPrevented) return;
event.preventDefault();
event.stopPropagation();
this.$state.go('worker.card.timeControl', {id: workerId}, {absolute: true});
}
onMoreChange(callback) {
callback.call(this);
}
}
ngModule.component('vnWorkerIndex', {
template: require('./index.html'),
controller: Controller
});