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: {
console.error('Error saving cart!', error);
});
},
+
openCart(event) {
// Only trigger cart popup on larger screens
// On smaller screens, the link will behave as normal.
document.body.classList.add('cart-open');
}
},
+
closeCart() {
document.body.classList.remove('cart-open');
},
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)
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')
this.errorsForm = {}
},
+
errorHandling(data, root, form) {
if (data.response) {
let errors = {'errors': data.response.data.errors, 'id': form}
}
}
},
+
animateDelete(el, parent = null) {
el.animate([
{opacity: 1},
parent && !el.classList.contains('ajax-form') ? el.parentElement.remove() : el.remove()
}, 1000)
},
+
checkEmailExist() {
let root = this,
data = {
}
)
},
+
signin() {
let root = this,
form = document.getElementById('signin-form'),
}
)
},
+
signup() {
let root = this,
form = document.getElementById('signup-form'),
}
)
},
+
getUser() {
let root = this