checkToken(); signOut(); var param = {} param["nbPages"] = 20; instance.get("users/count", { withCredentials: true }).then(function(response){ var count = response.data / nbPages; var reste = response.data % nbPages; var total = 0; if(reste != 0){ total = Number.parseInt(count) + 1; } if(total > 1){ document.getElementById("page").classList.remove("hidden"); var pageCurrent = getQuery("page"); var page = 1; if(pageCurrent.length > 0){ page = Number.parseInt(pageCurrent); } for (var i=0; i 0){ param["page"] = Number.parseInt(pageCurrent); param["page"] = param["page"] - 1; } var listQuery = ["search", "uuid", "roles", "status", "email"]; for (var i=0; i 0){ param[listQuery[i]]=query; } } instance.get("users", {withCredentials: true, params :param}).then(function(response){ listData = response.data; for (var i=0; i 0){ location.href="/html/users.html?search="+search+"&status="+e.target.value+"&roles="+roles; } else { location.href="/html/users.html?status="+e.target.value+"&roles="+roles; } }); document.getElementById("inputRoles").addEventListener("change", function(e){ var search = document.getElementById("searchUser").value; var select = document.getElementById("inputStatus"); var status = select.options[select.selectedIndex].value; if(search.length > 0){ location.href="/html/users.html?search="+search+"&roles="+e.target.value+"&status="+status; } else { location.href="/html/users.html?roles="+e.target.value+"&status="+status; } });