]> _ Git - pmi.git/commitdiff
wait #6368 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 9 Oct 2023 15:48:48 +0000 (17:48 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 9 Oct 2023 15:48:48 +0000 (17:48 +0200)
resources/js/app.js

index 739190e92612ab86f7428873be5d89e3ec023ead..62d92e8bdd985711d23b15deec89f7b22fdae6da 100644 (file)
@@ -127,8 +127,9 @@ const app = new Vue({
         this.validateAction = this.$refs.forgotpwd?.dataset.status //specific code for the forgot password confirmation
 
         let option = this.$refs.optionsExist?.dataset.val;
-        this.statusConfig = !option && this.price ? true : false
+        this.statusConfig = option===undefined ||(!option && this.price);
 
+        console.log(this.$refs.optionsExist,option,this.statusConfig,this.price);
     },
 
     watch: {
@@ -206,6 +207,7 @@ const app = new Vue({
                     console.error('Error saving cart!', error);
                 });
         },
+
         openCart(event) {
             // Only trigger cart popup on larger screens
             // On smaller screens, the link will behave as normal.
@@ -214,6 +216,7 @@ const app = new Vue({
                 document.body.classList.add('cart-open');
             }
         },
+
         closeCart() {
             document.body.classList.remove('cart-open');
         },
@@ -229,12 +232,14 @@ const app = new Vue({
                 behavior: "smooth"
             })
         },
+
         lockTab(tab) {
             // Add hash to url to stay in same tab when page is reloading
             // It used in account page when we navigate between different tab
             let fullUrl = window.location.origin + window.location.pathname
             history.pushState("", "", fullUrl + '#' + tab);
         },
+
         activeTab(tab) {
             this.tab = tab
             this.lockTab(tab)
@@ -242,9 +247,11 @@ const app = new Vue({
             this.errorsForm = {}
             this.removeErrorsForm()
         },
+
         toggleType(el) {
             this.type[el] = this.type[el] === "password" ? "text" : "password"
         },
+
         removeErrorsForm() {
             let errors = document.querySelector('.form-errors'),
                 errorInput = document.querySelectorAll('.error')
@@ -256,6 +263,7 @@ const app = new Vue({
 
             this.errorsForm = {}
         },
+
         errorHandling(data, root, form) {
             if (data.response) {
                 let errors = {'errors': data.response.data.errors, 'id': form}
@@ -283,6 +291,7 @@ const app = new Vue({
                 }
             }
         },
+
         animateDelete(el, parent = null) {
             el.animate([
                     {opacity: 1},
@@ -296,6 +305,7 @@ const app = new Vue({
                 parent && !el.classList.contains('ajax-form') ? el.parentElement.remove() : el.remove()
             }, 1000)
         },
+
         checkEmailExist() {
             let root = this,
                 data = {
@@ -315,6 +325,7 @@ const app = new Vue({
                     }
                 )
         },
+
         signin() {
             let root = this,
                 form = document.getElementById('signin-form'),
@@ -345,6 +356,7 @@ const app = new Vue({
                     }
                 )
         },
+
         signup() {
             let root = this,
                 form = document.getElementById('signup-form'),
@@ -369,6 +381,7 @@ const app = new Vue({
                     }
                 )
         },
+
         getUser() {
             let root = this