From 92d44030e681e8dc72e19732a234c47836b821a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Tue, 14 Jun 2022 18:01:22 +0300 Subject: [PATCH] Fixed vue file.. --- resources/assets/js/views/modules/apps.js | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/resources/assets/js/views/modules/apps.js b/resources/assets/js/views/modules/apps.js index 8078dad7b..12ff89136 100644 --- a/resources/assets/js/views/modules/apps.js +++ b/resources/assets/js/views/modules/apps.js @@ -82,12 +82,15 @@ 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 => { @@ -95,25 +98,15 @@ const app = new Vue({ 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 = '
' + response.data.message + '
'; - } - - // 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; }); },