diff --git a/web/html/users.html b/web/html/users.html index c5fc3ee..5d3087c 100644 --- a/web/html/users.html +++ b/web/html/users.html @@ -140,27 +140,27 @@

Utilisateur

ID - +
Pseudo - +
Nom - +
Prenom - +
Email - +
@@ -175,12 +175,12 @@
Date de naissance - +
- Status - diff --git a/web/js/home.js b/web/js/home.js index ccab1d8..43be496 100644 --- a/web/js/home.js +++ b/web/js/home.js @@ -54,7 +54,8 @@ instance.get("users", {withCredentials: true, params :{ page:0, nbPages: nbPages td[4].querySelector(classTd).classList.remove("hidden"); trAll[i].addEventListener("click", function(e){ - console.log(e.currentTarget) + var id = e.currentTarget.querySelector("td").textContent; + location.href="/html/users.html?id="+id; }); } diff --git a/web/js/library.js b/web/js/library.js index c17ec20..0484536 100644 --- a/web/js/library.js +++ b/web/js/library.js @@ -29,12 +29,14 @@ function signOut(){ function getQuery(param){ - query = location.search.split("?")[1]; - var variables = query.split("&") var result = ""; - for (var i=0; i0){ + query = location.search.split("?")[1]; + var variables = query.split("&") + for (var i=0; i 0){ + instance.get("users/"+id, {withCredentials: true}) + .then(function(response){ + var listValue = [ "id", "pseudo", "name", "firstName", "email"]; + for (var i=0; i