2019-03-23 15:16:47 +00:00
|
|
|
import ngModule from '../module';
|
|
|
|
|
2019-09-30 06:26:51 +00:00
|
|
|
class Controller {
|
2020-02-18 11:51:29 +00:00
|
|
|
constructor($scope, vnApp, $translate) {
|
2019-10-25 11:29:05 +00:00
|
|
|
this.$ = $scope;
|
2020-02-18 11:51:29 +00:00
|
|
|
this.vnApp = vnApp;
|
|
|
|
this.$translate = $translate;
|
2019-09-30 06:26:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
onSubmit() {
|
2019-10-25 11:29:05 +00:00
|
|
|
this.$.watcher.submit().then(() => {
|
2019-09-30 06:26:51 +00:00
|
|
|
this.card.reload();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
2020-02-18 11:51:29 +00:00
|
|
|
Controller.$inject = ['$scope', 'vnApp', '$translate'];
|
2019-10-25 11:29:05 +00:00
|
|
|
|
2019-03-23 15:16:47 +00:00
|
|
|
ngModule.component('vnRouteBasicData', {
|
|
|
|
template: require('./index.html'),
|
2019-09-30 06:26:51 +00:00
|
|
|
controller: Controller,
|
2019-03-23 15:16:47 +00:00
|
|
|
bindings: {
|
|
|
|
route: '<'
|
2019-09-30 06:26:51 +00:00
|
|
|
},
|
|
|
|
require: {
|
|
|
|
card: '^vnRouteCard'
|
2019-03-23 15:16:47 +00:00
|
|
|
}
|
|
|
|
});
|