change status users
This commit is contained in:
parent
b5023429e9
commit
9a86fad407
@ -165,7 +165,7 @@
|
||||
<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>
|
||||
|
||||
</tbody>
|
||||
|
@ -33,9 +33,23 @@ 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";
|
||||
var classTd = "";
|
||||
switch(listData[i].status){
|
||||
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");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user