Bug #252 CR Juan
This commit is contained in:
parent
80a3f0a914
commit
b3405a3164
|
@ -110,6 +110,7 @@ export default class Controller {
|
|||
} else if (canSubmitWatcher && !canSubmitObservations) {
|
||||
this.$scope.watcher.submit().then(() => {
|
||||
this.$state.go('clientCard.addresses.list', {id: this.$state.params.id});
|
||||
this.card.reload();
|
||||
});
|
||||
} else if (!canSubmitWatcher && canSubmitObservations) {
|
||||
this._submitObservations(observationsObj).then(() => {
|
||||
|
@ -148,5 +149,8 @@ Controller.$inject = ['$state', '$scope', '$http', '$q', '$translate', 'vnApp'];
|
|||
|
||||
ngModule.component('vnAddressEdit', {
|
||||
template: require('./address-edit.html'),
|
||||
controller: Controller
|
||||
controller: Controller,
|
||||
require: {
|
||||
card: '^vnClientCard'
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,12 +1,19 @@
|
|||
import ngModule from '../module';
|
||||
|
||||
export default class Controller {
|
||||
constructor() {
|
||||
constructor($scope) {
|
||||
this.$scope = $scope;
|
||||
this.client = null;
|
||||
}
|
||||
|
||||
reload() {
|
||||
this.$scope.edit.accept();
|
||||
}
|
||||
}
|
||||
Controller.$inject = ['$scope'];
|
||||
|
||||
ngModule.component('vnClientCard', {
|
||||
template: require('./card.html'),
|
||||
controller: Controller
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue