change status users
This commit is contained in:
parent
b5023429e9
commit
9a86fad407
@ -165,7 +165,7 @@
|
|||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><span class="activeStatus hidden">Activé</span><span class="disableStatus hidden">Désactivé</span></td>
|
<td><span class="activeStatus hidden">Activé</span><span class="disableStatus hidden">Désactivé</span><span class="confirmStatus hidden">En attente de confirmation</span><span class="removeStatus hidden">En attente de suppression</span><span class="unknownStatus hidden">Statut inconnu</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -33,10 +33,24 @@ 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
|
||||||
var classTd = ".disableStatus";
|
var classTd = "";
|
||||||
if(listData[i].status){
|
switch(listData[i].status){
|
||||||
classTd = ".activeStatus";
|
case 1:
|
||||||
}
|
classTd = ".activeStatus";
|
||||||
|
break;
|
||||||
|
case 0:
|
||||||
|
classTd = ".disableStatus";
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
classTd = ".confirmStatus";
|
||||||
|
break;
|
||||||
|
case -1:
|
||||||
|
classTd = ".removeStatus";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
classTd = ".unknownStatus"
|
||||||
|
break;
|
||||||
|
}
|
||||||
td[4].querySelector(classTd).classList.remove("hidden");
|
td[4].querySelector(classTd).classList.remove("hidden");
|
||||||
|
|
||||||
trAll[i].addEventListener("click", function(e){
|
trAll[i].addEventListener("click", function(e){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user