24 lines
586 B
JavaScript
24 lines
586 B
JavaScript
|
import ngModule from '../module';
|
||
|
|
||
|
class ClientGreugeCreate {
|
||
|
constructor($scope, $state) {
|
||
|
this.$ = $scope;
|
||
|
this.$state = $state;
|
||
|
this.greuge = {};
|
||
|
}
|
||
|
onSubmit() {
|
||
|
this.greuge.clientFk = this.$state.params.id;
|
||
|
this.$.watcher.submit().then(
|
||
|
() => {
|
||
|
this.$state.go('clientCard.greuge.list');
|
||
|
}
|
||
|
);
|
||
|
}
|
||
|
}
|
||
|
ClientGreugeCreate.$inject = ['$scope', '$state'];
|
||
|
|
||
|
ngModule.component('vnClientGreugeCreate', {
|
||
|
template: require('./greuge-create.html'),
|
||
|
controller: ClientGreugeCreate
|
||
|
});
|