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