forked from v4l3n71n/covas-bo
click event
This commit is contained in:
parent
a05f0db745
commit
d7eb43f4b1
@ -147,7 +147,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2>Section title</h2>
|
<h2>Liste d'utilisateur</h2>
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table id=users class="table table-striped table-sm">
|
<table id=users class="table table-striped table-sm">
|
||||||
<thead>
|
<thead>
|
||||||
@ -156,7 +156,6 @@
|
|||||||
<th scope="col">Pseudo</th>
|
<th scope="col">Pseudo</th>
|
||||||
<th scope="col">Mail</th>
|
<th scope="col">Mail</th>
|
||||||
<th scope="col">Rôle</th>
|
<th scope="col">Rôle</th>
|
||||||
<th scope="col">Header</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@ -165,7 +164,6 @@
|
|||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -50,6 +50,10 @@
|
|||||||
<body class="text-center">
|
<body class="text-center">
|
||||||
|
|
||||||
<main class="form-signin">
|
<main class="form-signin">
|
||||||
|
<div class="alert alert-danger alert-dismissible hidden" id="alertRequest" role="alert">
|
||||||
|
<div>Requête incorrecte</div>
|
||||||
|
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||||
|
</div>
|
||||||
<div class="alert alert-danger alert-dismissible hidden" id="alertUsername" role="alert">
|
<div class="alert alert-danger alert-dismissible hidden" id="alertUsername" role="alert">
|
||||||
<div>Utilisateur inexistant</div>
|
<div>Utilisateur inexistant</div>
|
||||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||||
|
@ -32,6 +32,10 @@ instance.get("users", {withCredentials: true, params :{ page:0, nbPages: nbPages
|
|||||||
td[1].textContent = listData[i].pseudo
|
td[1].textContent = listData[i].pseudo
|
||||||
td[2].textContent = listData[i].email
|
td[2].textContent = listData[i].email
|
||||||
td[3].textContent = listData[i].roles
|
td[3].textContent = listData[i].roles
|
||||||
|
trAll[i].addEventListener("click", function(e){
|
||||||
|
console.log(e.currentTarget)
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -43,3 +47,4 @@ document.getElementById("signout").addEventListener("click", function(){
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -10,6 +10,9 @@ document.getElementById("signin").addEventListener("submit", function(evt){
|
|||||||
.catch(function(error){
|
.catch(function(error){
|
||||||
|
|
||||||
switch (error.response.status){
|
switch (error.response.status){
|
||||||
|
case 400:
|
||||||
|
id = "alertRequest"
|
||||||
|
break;
|
||||||
case 406:
|
case 406:
|
||||||
id = "alertPassword";
|
id = "alertPassword";
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user