fer
This commit is contained in:
parent
cbebc058c9
commit
20f5af1f9b
|
|
@ -108,24 +108,10 @@ class ControleurAjaxuserrhclient extends Controleur {
|
|||
$this->gc->gereraccesaffection($codeUtilisateur, $AffectionVisible);
|
||||
}
|
||||
|
||||
|
||||
public function desactivergcassureur(){
|
||||
$idGarant = $this->requete->getParametreFormulaire("idGarant");
|
||||
|
||||
$this->gc->desactivergcassureur($idGarant);
|
||||
}
|
||||
|
||||
public function reactivergcassureur(){
|
||||
$id = $this->requete->getParametreFormulaire("id");
|
||||
|
||||
$this->gc->reactivergcassureur($id);
|
||||
}
|
||||
|
||||
public function supprimer(){
|
||||
$id = $this->requete->getParametreFormulaire("id");
|
||||
|
||||
$this->gc->supprimer($id);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
130
Js/fonctions.js
130
Js/fonctions.js
|
|
@ -4507,7 +4507,7 @@ function creer_user_gc()
|
|||
.then((isConfirmed) => {
|
||||
if (isConfirmed) {
|
||||
$.ajax({
|
||||
url: $("#racineWeb").val()+"Ajaxgcassureur/creerusergc/",
|
||||
url: $("#racineWeb").val()+"Ajaxuserrhclient/creerusergc/",
|
||||
type : 'post',
|
||||
data: donnees,
|
||||
error: function(errorData) {
|
||||
|
|
@ -4538,4 +4538,132 @@ function creer_user_gc()
|
|||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function reinitpaswd_user_rh(codeUtilisateur)
|
||||
{
|
||||
v_msg="Confirmez-vous la réinitialisation?";
|
||||
v_msgEng="Do you confirm the reset?";
|
||||
|
||||
|
||||
confirm_ebene(v_msg, v_msgEng)
|
||||
.then((isConfirmed) => {
|
||||
if (isConfirmed) {
|
||||
// L'utilisateur a confirmé
|
||||
donnees = "codeUtilisateur="+codeUtilisateur;
|
||||
|
||||
$.ajax({
|
||||
url: $("#racineWeb").val()+"Ajaxuserrhclient/reinitpaswd/",
|
||||
|
||||
type : 'post',
|
||||
data: donnees,
|
||||
error: function(errorData) {
|
||||
},
|
||||
success: function(data) {
|
||||
},
|
||||
complete: function() {
|
||||
v_msg="Opération effectuée avec succès!";
|
||||
v_msgEng="Operation successfully completed";
|
||||
alert_ebene(v_msg, v_msgEng);
|
||||
|
||||
users_gc();
|
||||
}
|
||||
});
|
||||
return;
|
||||
} else {
|
||||
// L'utilisateur a annulé
|
||||
v_msg="Opération annulée!";
|
||||
v_msgEng="Operation canceled!";
|
||||
alert_ebene(v_msg, v_msgEng);
|
||||
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
function users_rh_client()
|
||||
{
|
||||
window.location.assign($("#racineWeb" ).val()+"Usersrhclient/");
|
||||
}
|
||||
|
||||
function desactiver_user_rh_client(codeUtilisateur)
|
||||
{
|
||||
v_msg="Confirmez-vous la désactivation?";
|
||||
v_msgEng="Do you confirm the deactivation?";
|
||||
|
||||
confirm_ebene(v_msg, v_msgEng)
|
||||
.then((isConfirmed) => {
|
||||
if (isConfirmed) {
|
||||
// L'utilisateur a confirmé
|
||||
donnees = "codeUtilisateur="+codeUtilisateur;
|
||||
|
||||
$.ajax({
|
||||
url: $("#racineWeb").val()+"Ajaxuserrhclient/desactiver/",
|
||||
type : 'post',
|
||||
data: donnees,
|
||||
error: function(errorData) {
|
||||
},
|
||||
success: function(data) {
|
||||
},
|
||||
complete: function() {
|
||||
v_msg="Opération effectuée avec succès!";
|
||||
v_msgEng="Operation successfully completed";
|
||||
alert_ebene(v_msg, v_msgEng);
|
||||
|
||||
users_rh_client();
|
||||
}
|
||||
});
|
||||
return;
|
||||
} else {
|
||||
// L'utilisateur a annulé
|
||||
v_msg="Opération annulée!";
|
||||
v_msgEng="Operation canceled!";
|
||||
alert_ebene(v_msg, v_msgEng);
|
||||
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function activer_user_rh_client(codeUtilisateur)
|
||||
{
|
||||
v_msg="Confirmez-vous l\'activation?";
|
||||
v_msgEng="Do you confirm the activation?";
|
||||
|
||||
confirm_ebene(v_msg, v_msgEng)
|
||||
.then((isConfirmed) => {
|
||||
if (isConfirmed) {
|
||||
// L'utilisateur a confirmé
|
||||
donnees = "codeUtilisateur="+codeUtilisateur;
|
||||
|
||||
$.ajax({
|
||||
url: $("#racineWeb").val()+"Ajaxuserrhclient/activer/",
|
||||
type : 'post',
|
||||
data: donnees,
|
||||
error: function(errorData) {
|
||||
},
|
||||
success: function(data) {
|
||||
},
|
||||
complete: function() {
|
||||
v_msg="Opération effectuée avec succès!";
|
||||
v_msgEng="Operation successfully completed";
|
||||
alert_ebene(v_msg, v_msgEng);
|
||||
|
||||
users_rh_client();
|
||||
}
|
||||
});
|
||||
return;
|
||||
} else {
|
||||
// L'utilisateur a annulé
|
||||
v_msg="Opération annulée!";
|
||||
v_msgEng="Operation canceled!";
|
||||
alert_ebene(v_msg, v_msgEng);
|
||||
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
|
@ -327,4 +327,26 @@ class Client extends Modele {
|
|||
|
||||
$resultat = $this->executerRequete($sql, array($idUtilisateur, $nom, $prenoms, $actif, $actVisible, $codeLangue, $AffectionVisible, $user, $telephone, $email, $codeProfil));
|
||||
}
|
||||
|
||||
public function reinitpaswd($codeUtilisateur)
|
||||
{
|
||||
$sql = 'call sp_c_reinit_utilisateur_rh_client(?)';
|
||||
|
||||
$this->executerRequete($sql, array($codeUtilisateur));
|
||||
}
|
||||
|
||||
public function desactiver($codeUtilisateur)
|
||||
{
|
||||
$sql = 'call sp_c_desactiver_utilisateur_rh_client(?)';
|
||||
|
||||
$this->executerRequete($sql, array($codeUtilisateur));
|
||||
}
|
||||
|
||||
public function activer($codeUtilisateur)
|
||||
{
|
||||
$sql = 'call sp_c_activer_utilisateur_rh_client(?)';
|
||||
|
||||
$this->executerRequete($sql, array($codeUtilisateur));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -70,12 +70,12 @@
|
|||
<td class="text-center">
|
||||
<?php if($actif === 1): ?>
|
||||
<button class="btn btn-sm btn-outline-success rounded-pill px-3 fw-bold"
|
||||
onClick="desactiver_user_client('<?= $codeUtilisateur ?>');">
|
||||
onClick="desactiver_user_rh_client('<?= $codeUtilisateur ?>');">
|
||||
<i class="fas fa-check-circle me-1"></i> <?= _("Actif") ?>
|
||||
</button>
|
||||
<?php else: ?>
|
||||
<button class="btn btn-sm btn-outline-danger rounded-pill px-3 fw-bold"
|
||||
onClick="activer_user_client('<?= $codeUtilisateur ?>');">
|
||||
onClick="activer_user_rh_client('<?= $codeUtilisateur ?>');">
|
||||
<i class="fas fa-ban me-1"></i> <?= _("Bloqué") ?>
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
|
|
@ -90,7 +90,7 @@
|
|||
</button>
|
||||
<button class="btn btn-outline-secondary btn-sm <?= ($reInit === 1) ? 'text-danger fw-bold' : '' ?>"
|
||||
title="<?= _("Ré-initialiser mot de passe") ?>"
|
||||
onClick="reinitpaswd_client('<?= $codeUtilisateur ?>');">
|
||||
onClick="reinitpaswd_user_rh('<?= $codeUtilisateur ?>');">
|
||||
<i class="fas fa-key"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -662,7 +662,7 @@ $photoAssureCrypte = $_SESSION['photoAssureCrypte'];
|
|||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
||||
|
||||
<!-- Application Scripts -->
|
||||
<script src="/Js/fonctions.js?ver=2026.01.14.04"></script>
|
||||
<script src="/Js/fonctions.js?ver=2026.01.14.05"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
raffraichier_gabarit();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user