diff --git a/modules/ticket/front/sale/index.js b/modules/ticket/front/sale/index.js index 665f0e22f..706ef9d5f 100644 --- a/modules/ticket/front/sale/index.js +++ b/modules/ticket/front/sale/index.js @@ -20,6 +20,11 @@ class Controller { this._sales = []; this.imagesPath = '//verdnatura.es/vn-image-data/catalog'; } + isTicketEditable() { + this.$http.get(`/api/Tickets/${this.$state.params.id}/isEditable`).then(res => { + this.isEditable = res.data; + }); + } get ticket() { return this._ticket; @@ -27,7 +32,7 @@ class Controller { set ticket(value) { this._ticket = value; - this.isEditable(); + this.isTicketEditable(); } get sales() { @@ -94,12 +99,6 @@ class Controller { callback.call(this); } - isEditable() { - this.$http.get(`/api/Tickets/${this.$state.params.id}/isEditable`).then(res => { - this.isEditable = res.data; - }); - } - get isChecked() { if (this.sales) { for (let instance of this.sales)