This commit is contained in:
KONE SOREL 2026-03-31 11:04:13 +00:00
parent b796a15fdd
commit 529103d2b3
2 changed files with 151 additions and 0 deletions

View File

@ -44843,4 +44843,142 @@ function activer_user_rh_client(codeUtilisateur)
function afficher_users_client_id(idUtilisateur)
{
window.location.assign($("#racineWeb" ).val()+"Ficheuserrhclient/"+idUtilisateur+"/");
}
function retour_a_users_rh_client()
{
window.location.assign($("#racineWeb" ).val()+"Usersrhclient/");
}
function enregistrer_modif_user_rh()
{
idUtilisateur = $("#idUtilisateur").val();
nom = $("#nom").val();
prenoms = $("#prenoms").val();
actif = $("#actif").val();
actVisible = "0";
codeLangue = $("#codeLangueUser").val();
AffectionVisible = "0";
telephone = $("#telephone").val();
email = $("#email").val();
codeProfil = $("#codeProfil").val();
if (nom<=" ")
{
v_msg="Veuillez saisir le nom!";
v_msgEng="Please enter the name!";
alert_ebene(v_msg, v_msgEng).then(() => {
// Ce code ne sexécute quaprès clic sur OK
return;
});
$("#nom").focus();
return;
}
if (actif<=" ")
{
v_msg="Utilisateur actif oui ou non?";
v_msgEng="Is the user active yes or no?";
alert_ebene(v_msg, v_msgEng).then(() => {
// Ce code ne sexécute quaprès clic sur OK
return;
});
$("#actif").focus();
return;
}
if(codeLangue<=" ")
{
v_msg="Veuillez indiquer la langue!";
v_msgEng="Please select the language";
alert_ebene(v_msg, v_msgEng).then(() => {
// Ce code ne sexécute quaprès clic sur OK
return;
});
$("#codeLangueUser").focus();
return;
}
if (codeProfil<=" ")
{
v_msg="Le profil utilisateur est obligatoire!";
v_msgEng="The user profile is required!";
alert_ebene(v_msg, v_msgEng).then(() => {
// Ce code ne sexécute quaprès clic sur OK
return;
});
$("#codeProfil").focus();
return;
}
if(!verifMailValeur(email))
{
v_msg="Veuillez revoir l'adresse mail!";
v_msgEng="Please review the email address!";
alert_ebene(v_msg, v_msgEng).then(() => {
// Ce code ne sexécute quaprès clic sur OK
return;
});
$("#email").focus();
return;
}
donnees = 'idUtilisateur=' + idUtilisateur;
donnees += '&nom=' + nom;
donnees += '&prenoms=' + prenoms;
donnees += '&actif=' + actif;
donnees += '&actVisible=' + actVisible;
donnees += '&codeLangue=' + codeLangue;
donnees += '&codeProfil=' + codeProfil;
donnees += '&AffectionVisible=' + AffectionVisible;
donnees += '&telephone='+telephone+'&email='+email;
v_msg="Confirmez-vous ces modifications?";
v_msgEng="Do you confirm these modifications?";
confirm_ebene(v_msg, v_msgEng)
.then((isConfirmed) => {
if (isConfirmed) {
// L'utilisateur a confirmé
$.ajax({
url: $("#racineWeb").val()+"Ajaxuserrhclient/enregistrermodifuser/",
type : 'post',
data: donnees,
error: function(errorData) {
},
success: function(data) {
//$('#div_test_gabarit').html(data);
},
complete: function() {
retour_a_users_rh_client();
}
});
} else {
// L'utilisateur a annulé
console.log("Confirmation refusée");
}
});
}

View File

@ -12,9 +12,22 @@
<div id="div_liste" class="container-fluid py-2 animate__animated animate__fadeIn">
<input class="sr-only" type="text" id="idUtilisateur" value="<?= $idUtilisateur ?>">
<input class="sr-only" type="text" id="idClient" value="<?= $idClient ?>">
<input class="sr-only" type="text" id="actif" value="<?= $idClient ?>">
<legend> <?= _("Modifier l'utilisateur") . " : " . $codeUtilisateur ?> </legend>
<div>
<?php if($actif === 1): ?>
<span class="badge" style="background-color:green; color:white;">
<?= _("Actif") ?>
</span>
<?php else: ?>
<span class="badge" style="background-color:red; color:white;">
<?= _("Bloqué") ?>
</span>
<?php endif; ?>
</div>
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
<tbody>
<tr>