Fixed vue file..
This commit is contained in:
parent
7d33f9f3a6
commit
92d44030e6
19
resources/assets/js/views/modules/apps.js
vendored
19
resources/assets/js/views/modules/apps.js
vendored
@ -82,12 +82,15 @@ const app = new Vue({
|
|||||||
html: ''
|
html: ''
|
||||||
},
|
},
|
||||||
|
|
||||||
|
addToCartLoading: false,
|
||||||
loadMoreLoading: false,
|
loadMoreLoading: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
addToCart(alias, subscription_type) {
|
addToCart(alias, subscription_type) {
|
||||||
|
this.addToCartLoading = true;
|
||||||
|
|
||||||
let add_to_cart_promise = Promise.resolve(axios.get(url + '/apps/' + alias + '/' + subscription_type +'/add'));
|
let add_to_cart_promise = Promise.resolve(axios.get(url + '/apps/' + alias + '/' + subscription_type +'/add'));
|
||||||
|
|
||||||
add_to_cart_promise.then(response => {
|
add_to_cart_promise.then(response => {
|
||||||
@ -95,25 +98,15 @@ const app = new Vue({
|
|||||||
this.$notify({
|
this.$notify({
|
||||||
message: response.data.message,
|
message: response.data.message,
|
||||||
timeout: 0,
|
timeout: 0,
|
||||||
icon: "fas fa-bell",
|
icon: "shopping_cart_checkout",
|
||||||
type: 'success'
|
type: 'success'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (response.data.error) {
|
this.addToCartLoading = false;
|
||||||
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();
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
|
this.addToCartLoading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user