Bug #313 Cuando cancelas vn-confirm guarda los datos igualmente

This commit is contained in:
gerard 2018-05-21 11:59:23 +02:00
parent 7f54bcb019
commit 6f45a8fa5b
2 changed files with 8 additions and 11 deletions

View File

@ -56,15 +56,14 @@ class Controller {
} }
returnDialog(response) { returnDialog(response) {
if (response === 'CANCEL') if (response === 'ACCEPT') {
return;
let params = {finished: Date.now()}; let params = {finished: Date.now()};
this.$http.patch(`/client/api/CreditClassifications/${this.classificationId}`, params).then(() => { this.$http.patch(`/client/api/CreditClassifications/${this.classificationId}`, params).then(() => {
this._getClassifications(this.client.id); this._getClassifications(this.client.id);
}); });
} }
} }
}
Controller.$inject = ['$http', '$scope']; Controller.$inject = ['$http', '$scope'];

View File

@ -18,9 +18,7 @@ class Controller {
} }
returnDialog(response) { returnDialog(response) {
if (response === 'CANCEL') if (response === 'ACCEPT')
return;
this.addCredit(); this.addCredit();
} }