Address state fix #325

This commit is contained in:
Joan Sanchez 2018-05-28 13:44:41 +02:00
parent ca0524f24b
commit 125c6dea37
1 changed files with 3 additions and 3 deletions

View File

@ -109,16 +109,16 @@ export default class Controller {
);
} else if (canSubmitWatcher && !canSubmitObservations) {
this.$scope.watcher.submit().then(() => {
this.$state.go('client.card.addresses.list', {id: this.$state.params.id});
this.$state.go('client.card.address.index', {id: this.$state.params.id});
this.card.reload();
});
} else if (!canSubmitWatcher && canSubmitObservations) {
this._submitObservations(observationsObj).then(() => {
this.$state.go('client.card.addresses.list', {id: this.$state.params.id});
this.$state.go('client.card.address.index', {id: this.$state.params.id});
});
} else if (canSubmitWatcher && canSubmitObservations) {
this.$q.all([this.$scope.watcher.submit(), this._submitObservations(observationsObj)]).then(() => {
this.$state.go('client.card.addresses.list', {id: this.$state.params.id});
this.$state.go('client.card.address.index', {id: this.$state.params.id});
});
} else {
this.vnApp.showMessage(