Skip to content

Commit

Permalink
Fixed vue file..
Browse files Browse the repository at this point in the history
  • Loading branch information
cuneytsenturk committed Jun 14, 2022
1 parent 7d33f9f commit 92d4403
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions resources/assets/js/views/modules/apps.js
Expand Up @@ -82,38 +82,31 @@ const app = new Vue({
html: ''
},

addToCartLoading: false,
loadMoreLoading: false,
}
},

methods: {
addToCart(alias, subscription_type) {
this.addToCartLoading = true;

let add_to_cart_promise = Promise.resolve(axios.get(url + '/apps/' + alias + '/' + subscription_type +'/add'));

add_to_cart_promise.then(response => {
if (response.data.success) {
this.$notify({
message: response.data.message,
timeout: 0,
icon: "fas fa-bell",
icon: "shopping_cart_checkout",
type: 'success'
});
}

if (response.data.error) {
this.installation.status = 'exception';
this.installation.html = '<div class="text-red">' + response.data.message + '</div>';
}

// Set steps
if (response.data.data) {
this.installation.steps = response.data.data;
this.installation.steps_total = this.installation.steps.length;

this.next();
}
this.addToCartLoading = false;
})
.catch(error => {
this.addToCartLoading = false;
});
},

Expand Down

0 comments on commit 92d4403

Please sign in to comment.