salix/modules/ticket/front/note/index.js

27 lines
589 B
JavaScript
Raw Normal View History

2018-03-16 14:06:42 +00:00
import ngModule from '../module';
class Controller {
constructor($stateParams, $scope) {
this.$stateParams = $stateParams;
2018-03-16 14:06:42 +00:00
this.$scope = $scope;
}
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
});
}
}
Controller.$inject = ['$stateParams', '$scope'];
2018-03-16 14:06:42 +00:00
ngModule.component('vnTicketObservation', {
template: require('./index.html'),
controller: Controller,
2018-03-16 14:06:42 +00:00
bindings: {
ticket: '<'
}
});