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,13 +56,12 @@ class Controller {
}
returnDialog(response) {
if (response === 'CANCEL')
return;
let params = {finished: Date.now()};
this.$http.patch(`/client/api/CreditClassifications/${this.classificationId}`, params).then(() => {
this._getClassifications(this.client.id);
});
if (response === 'ACCEPT') {
let params = {finished: Date.now()};
this.$http.patch(`/client/api/CreditClassifications/${this.classificationId}`, params).then(() => {
this._getClassifications(this.client.id);
});
}
}
}

View File

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