salix/modules/worker/front/basic-data/index.js

30 lines
532 B
JavaScript
Raw Normal View History

2019-01-28 15:24:45 +00:00
import ngModule from '../module';
class Controller {
constructor($, $state) {
Object.assign(this, {
$,
$state
});
}
onSubmit() {
this.$.watcher.submit().then(() => {
this.card.reload();
});
}
}
Controller.$inject = ['$scope', '$state'];
ngModule.component('vnWorkerBasicData', {
template: require('./index.html'),
controller: Controller,
bindings: {
worker: '<'
},
require: {
card: '^vnWorkerCard'
}
});