diff --git a/web/html/users.html b/web/html/users.html index 20d5177..648d80b 100644 --- a/web/html/users.html +++ b/web/html/users.html @@ -159,20 +159,24 @@ + - + + + + diff --git a/web/js/users.js b/web/js/users.js index 0839fba..290b3f3 100644 --- a/web/js/users.js +++ b/web/js/users.js @@ -96,10 +96,10 @@ instance.get("users", {withCredentials: true, params:param}).then(function(respo } var trAll = document.querySelectorAll("#users tbody tr") td = trAll[i].querySelectorAll("td"); - td[0].textContent = listData[i].id; - td[1].textContent = listData[i].username; - td[2].textContent = listData[i].email; - td[3].textContent = listData[i].roles; + td[1].textContent = listData[i].id; + td[2].textContent = listData[i].username; + td[3].textContent = listData[i].email; + td[4].textContent = listData[i].roles; var classTd = ""; switch(listData[i].status){ case 1: @@ -118,11 +118,11 @@ instance.get("users", {withCredentials: true, params:param}).then(function(respo classTd = ".unknownStatus" break; } - td[4].querySelector(".activeStatus").classList.add("hidden"); - td[4].querySelector(classTd).classList.remove("hidden"); + td[5].querySelector(".activeStatus").classList.add("hidden"); + td[5].querySelector(classTd).classList.remove("hidden"); trAll[i].addEventListener("click", function(e){ - var id = e.currentTarget.querySelector("td").textContent; + var id = e.currentTarget.querySelectorAll("td")[1].textContent; location.href="/html/user.html?id="+id; });
IDPseudoUsername Mail Rôle Statut