add disabled_at

This commit is contained in:
Valentin CZERYBA 2023-11-04 20:59:06 +01:00
parent 5f4b231e39
commit 5a7283b92f
3 changed files with 21 additions and 29 deletions

View File

@ -186,46 +186,27 @@
<input id="idUpdateInput" type="text" class="form-control" placeholder="" aria-label="Id" aria-describedby="idUpdate" disabled>
</div>
<div class="input-group mb-3">
<span class="input-group-text" id="usernameUpdate">Pseudo</span>
<input id="usernameUpdateInput" type="text" class="form-control" placeholder="Pseudo" aria-label="Pseudo" aria-describedby="usernameUpdate">
</div>
<div class="input-group mb-3">
<span class="input-group-text" id="passwordUpdate">Mot de passe</span>
<input id="passwordUpdateInput" type="password" class="form-control" placeholder="Mot de passe" aria-label="Mot de passe" aria-describedby="passwordUpdate">
</div>
<div class="input-group mb-3">
<span class="input-group-text" id="nameUpdate">Nom</span>
<input id="nameUpdateInput" type="text" class="form-control" placeholder="Nom" aria-label="Nom" aria-describedby="nameUpdate">
</div>
<div class="input-group mb-3">
<span class="input-group-text" id="firstNameUpdate">Prenom</span>
<input id="firstNameUpdateInput" type="text" class="form-control" placeholder="Prenom" aria-label="Prenom" aria-describedby="firstNameUpdate">
<span class="input-group-text" id="placeUpdate">Lieu</span>
<input id="placeUpdateInput" type="text" class="form-control" placeholder="Lieu" aria-label="Lieu" aria-describedby="placeUpdate">
</div>
<div class="input-group mb-3">
<span class="input-group-text" id="emailUpdate">Email</span>
<input id="emailUpdateInput" type="text" class="form-control" placeholder="Email" aria-label="Email" aria-describedby="emailUpdate">
<span class="input-group-text" id="dateUpdate">Date de début</span>
<input id="startDateUpdateInput" type="date" class="form-control" placeholder="Date de début" aria-label="Date de début" aria-describedby="startDateUpdate">
</div>
<div class="input-group mb-3">
<span class="input-group-text" id="endDateUpdate">Date de fin</span>
<input id="endDateUpdateInput" type="date" class="form-control" placeholder="Date de fin" aria-label="Date de fin" aria-describedby="endDateUpdate">
</div>
<div class="input-group mb-3">
<label class="input-group-text" for="rolesSelector">Roles</label>
<select class="form-select" id="rolesSelector">
<option value="Admin">Administrateur</option>
<option value="User">Utilisateur</option>
</select>
</div>
<div class="input-group mb-3">
<span class="input-group-text" id="birthUpdate">Date de naissance</span>
<input id="birthUpdateInput" type="date" class="form-control" placeholder="Date de naissance" aria-label="Date de naissance" aria-describedby="birthdateUpdate">
</div>
<div class="input-group mb-3">
<span class="input-group-text" id="connected_atUpdate">Dernière connexion</span>
<input id="connected_atUpdateInput" type="text" class="form-control" placeholder="" aria-label="Dernière connexion" aria-describedby="connected_atUpdate" disabled>
@ -241,6 +222,11 @@
<input id="updated_atUpdateInput" type="text" class="form-control" placeholder="" aria-label="Date de mise à jour" aria-describedby="updated_atUpdate" disabled>
</div>
<div class="input-group mb-3">
<span class="input-group-text" id="disabled_atUpdate">Date de désactivation</span>
<input id="disabled_atUpdateInput" type="text" class="form-control" placeholder="" aria-label="Date de désactivation" aria-describedby="disabled_atUpdate" disabled>
</div>
<div class="input-group mb-3">
<span class="input-group-text" id="deleted_atUpdate">Date de suppression</span>
<input id="deleted_atUpdateInput" type="text" class="form-control" placeholder="" aria-label="Date de suppression" aria-describedby="deleted_atUpdate" disabled>

View File

@ -241,6 +241,11 @@
<input id="updated_atUpdateInput" type="text" class="form-control" placeholder="" aria-label="Date de mise à jour" aria-describedby="updated_atUpdate" disabled>
</div>
<div class="input-group mb-3">
<span class="input-group-text" id="disabled_atUpdate">Date de désactivation</span>
<input id="disabled_atUpdateInput" type="text" class="form-control" placeholder="" aria-label="Date de désactivation" aria-describedby="disabled_atUpdate" disabled>
</div>
<div class="input-group mb-3">
<span class="input-group-text" id="deleted_atUpdate">Date de suppression</span>
<input id="deleted_atUpdateInput" type="text" class="form-control" placeholder="" aria-label="Date de suppression" aria-describedby="deleted_atUpdate" disabled>

View File

@ -7,7 +7,7 @@ if(id.length > 0){
instance.get("users/"+id, {withCredentials: true})
.then(function(response){
var listValue = [ "id", "username", "name", "firstName", "email", "birth"];
var listTime = ["connected_at", "created_at", "updated_at", "deleted_at"];
var listTime = ["connected_at", "created_at", "updated_at", "deleted_at", "disabled_at"];
for (var i=0; i<listValue.length; i++){
if(response.data[listValue[i]] != null){
document.getElementById(listValue[i]+"UpdateInput").value=response.data[listValue[i]];
@ -134,6 +134,7 @@ if(id.length > 0){
"created_at": "",
"updated_at": "",
"deleted_at": "",
"disabled_at":"",
"connected_at": ""
}