diff --git a/web/html/home.html b/web/html/home.html
index 02d8f29..852635a 100644
--- a/web/html/home.html
+++ b/web/html/home.html
@@ -156,6 +156,7 @@
Pseudo |
Mail |
Rôle |
+ Statut |
@@ -164,6 +165,7 @@
|
|
|
+ ActivéDésactivé |
diff --git a/web/html/users.html b/web/html/users.html
new file mode 100644
index 0000000..4ccb001
--- /dev/null
+++ b/web/html/users.html
@@ -0,0 +1,190 @@
+
+
+
+
+
+
+
+
+ Dashboard Template · Bootstrap v5.2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/web/js/home.js b/web/js/home.js
index 10f3216..3a5cf9b 100644
--- a/web/js/home.js
+++ b/web/js/home.js
@@ -1,4 +1,5 @@
checkToken();
+signOut();
var nbPages = 20;
@@ -32,6 +33,12 @@ instance.get("users", {withCredentials: true, params :{ page:0, nbPages: nbPages
td[1].textContent = listData[i].pseudo
td[2].textContent = listData[i].email
td[3].textContent = listData[i].roles
+ var classTd = ".disableStatus";
+ if(listData[i].status){
+ classTd = ".activeStatus";
+ }
+ td[4].querySelector(classTd).classList.remove("hidden");
+
trAll[i].addEventListener("click", function(e){
console.log(e.currentTarget)
});
@@ -40,11 +47,4 @@ instance.get("users", {withCredentials: true, params :{ page:0, nbPages: nbPages
});
-document.getElementById("signout").addEventListener("click", function(){
- instance.delete("token" , {withCredentials:true}).then(function(response){
- if(response.status == 200){
- location.href="/"
- }
- });
-});
diff --git a/web/js/library.js b/web/js/library.js
index 5291fae..b3e6cf7 100644
--- a/web/js/library.js
+++ b/web/js/library.js
@@ -13,4 +13,16 @@ function checkToken(){
}
});
+}
+
+
+function signOut(){
+
+ document.getElementById("signout").addEventListener("click", function(){
+ instance.delete("token" , {withCredentials:true}).then(function(response){
+ if(response.status == 200){
+ location.href="/"
+ }
+ });
+ });
}
\ No newline at end of file
diff --git a/web/js/users.js b/web/js/users.js
new file mode 100644
index 0000000..9423a30
--- /dev/null
+++ b/web/js/users.js
@@ -0,0 +1,2 @@
+checkToken();
+signOut();
\ No newline at end of file