From 2275541bb185717048538e08163d6049aca6af73 Mon Sep 17 00:00:00 2001 From: Bernat Exposito Domenech Date: Tue, 23 Jun 2020 12:46:24 +0200 Subject: [PATCH] change on-response for on-accept --- modules/claim/front/detail/index.html | 2 +- modules/claim/front/detail/index.js | 16 +++++++--------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/modules/claim/front/detail/index.html b/modules/claim/front/detail/index.html index 56dbc3c539..e364801bf0 100644 --- a/modules/claim/front/detail/index.html +++ b/modules/claim/front/detail/index.html @@ -168,5 +168,5 @@ + on-accept="$ctrl.deleteClaimedSale()"> \ No newline at end of file diff --git a/modules/claim/front/detail/index.js b/modules/claim/front/detail/index.js index 8237241df9..7719a9fc9a 100644 --- a/modules/claim/front/detail/index.js +++ b/modules/claim/front/detail/index.js @@ -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) {