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-id="confirm"
question="Delete sale from claim?"
on-response="$ctrl.deleteClaimedSale($response)">
on-accept="$ctrl.deleteClaimedSale()">
</vn-confirm>

View File

@ -78,15 +78,13 @@ class Controller extends Section {
this.$.confirm.show();
}
deleteClaimedSale(response) {
if (response === 'accept') {
let query = `ClaimBeginnings/${this.sale.id}`;
this.$http.delete(query).then(() => {
this.vnApp.showSuccess(this.$translate.instant('Data saved!'));
this.$.model.remove(this.sale);
this.calculateTotals();
});
}
deleteClaimedSale() {
let query = `ClaimBeginnings/${this.sale.id}`;
this.$http.delete(query).then(() => {
this.vnApp.showSuccess(this.$translate.instant('Data saved!'));
this.$.model.remove(this.sale);
this.calculateTotals();
});
}
setClaimedQuantity(id, claimedQuantity) {