change on-response for on-accept
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Bernat Exposito Domenech 2020-06-23 12:46:24 +02:00
parent 84bacfd379
commit 2275541bb1
2 changed files with 8 additions and 10 deletions

View File

@ -168,5 +168,5 @@
<vn-confirm <vn-confirm
vn-id="confirm" vn-id="confirm"
question="Delete sale from claim?" question="Delete sale from claim?"
on-response="$ctrl.deleteClaimedSale($response)"> on-accept="$ctrl.deleteClaimedSale()">
</vn-confirm> </vn-confirm>

View File

@ -78,8 +78,7 @@ class Controller extends Section {
this.$.confirm.show(); this.$.confirm.show();
} }
deleteClaimedSale(response) { deleteClaimedSale() {
if (response === 'accept') {
let query = `ClaimBeginnings/${this.sale.id}`; let query = `ClaimBeginnings/${this.sale.id}`;
this.$http.delete(query).then(() => { this.$http.delete(query).then(() => {
this.vnApp.showSuccess(this.$translate.instant('Data saved!')); this.vnApp.showSuccess(this.$translate.instant('Data saved!'));
@ -87,7 +86,6 @@ class Controller extends Section {
this.calculateTotals(); this.calculateTotals();
}); });
} }
}
setClaimedQuantity(id, claimedQuantity) { setClaimedQuantity(id, claimedQuantity) {
let params = {id: id, quantity: claimedQuantity}; let params = {id: id, quantity: claimedQuantity};