Forgot your password? No problem. Just let us know your email address and we will email you a password reset link that will allow you to choose a new one.
// loading time wait message setup
// GLOBAL LOADER CORE
let loaderTimer;
function showLoaderWithDelay() {
loaderTimer = setTimeout(() => {
const el = document.getElementById('global-loader');
if (el) el.style.display = 'block';
}, 1000); // After 1 second
}
function showLoaderImmediate() {
const el = document.getElementById('global-loader');
if (el) el.style.display = 'block';
}
function hideLoader() {
clearTimeout(loaderTimer);
const el = document.getElementById('global-loader');
if (el) el.style.display = 'none';
}
//LIVEWIRE SUPPORT
document.addEventListener("livewire:load", function () {
Livewire.hook('message.sent', () => {
showLoaderWithDelay();
});
Livewire.hook('message.processed', () => {
hideLoader();
});
});
//LINK NAVIGATION (ALL PAGES)
document.addEventListener("click", function(e) {
let link = e.target.closest("a");
if (link && link.href && !link.target && !link.hasAttribute('wire:navigate')) {
showLoaderWithDelay();
}
});
//PAGE RELOAD / REFRESH
window.addEventListener("beforeunload", function () {
showLoaderImmediate();
});
window.addEventListener("load", hideLoader);
//FETCH (modern JS API)
const originalFetch = window.fetch;
window.fetch = async function (...args) {
showLoaderWithDelay();
try {
const response = await originalFetch(...args);
return response;
} finally {
hideLoader();
}
};
//AXIOS SUPPORT FOR EVERY VIEW
if (window.axios) {
axios.interceptors.request.use(function (config) {
showLoaderWithDelay();
return config;
});
axios.interceptors.response.use(function (response) {
hideLoader();
return response;
}, function (error) {
hideLoader();
return Promise.reject(error);
});
}
// JQUERY AJAX SUPPORT (if used)
if (window.$) {
$(document).ajaxStart(function () {
showLoaderWithDelay();
});
$(document).ajaxStop(function () {
hideLoader();
});
}
//End loading time manage