2018-03-16 14:06:42 +00:00
|
|
|
import ngModule from '../module';
|
|
|
|
|
2018-03-22 09:57:55 +00:00
|
|
|
class Controller {
|
2018-08-30 06:50:03 +00:00
|
|
|
constructor($stateParams, $scope) {
|
|
|
|
this.$stateParams = $stateParams;
|
2018-03-16 14:06:42 +00:00
|
|
|
this.$scope = $scope;
|
|
|
|
}
|
|
|
|
|
2018-08-30 06:50:03 +00:00
|
|
|
onSubmit() {
|
|
|
|
this.$scope.watcher.check();
|
|
|
|
this.$scope.model.save().then(() => {
|
|
|
|
this.$scope.watcher.notifySaved();
|
|
|
|
this.$scope.model.refresh();
|
2018-03-16 14:06:42 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-08-30 06:50:03 +00:00
|
|
|
Controller.$inject = ['$stateParams', '$scope'];
|
2018-03-16 14:06:42 +00:00
|
|
|
|
2018-03-22 09:57:55 +00:00
|
|
|
ngModule.component('vnTicketObservation', {
|
2018-05-25 08:03:45 +00:00
|
|
|
template: require('./index.html'),
|
2018-03-22 09:57:55 +00:00
|
|
|
controller: Controller,
|
2018-03-16 14:06:42 +00:00
|
|
|
bindings: {
|
|
|
|
ticket: '<'
|
|
|
|
}
|
|
|
|
});
|