This commit is contained in:
KANE LAZENI 2026-04-10 08:10:22 +00:00
commit 5d1ed202b5
21 changed files with 1936 additions and 90 deletions

4
.gitignore vendored
View File

@ -9,4 +9,6 @@ Cron/prod.ini
Temp/
Temp
*.sh
.ssh/
.ssh/
Gettext/
Gettext

View File

@ -0,0 +1,28 @@
<?php
require_once 'Framework/Controleur.php';
require_once 'Modele/Utilisateur.php';
require_once 'Modele/Menuvueutilisateur.php';
class ControleurAccessubmenus extends Controleur
{
private $menuvue;
private $utilisateur;
public function __construct() {
$this->menuvue = new Menuvueutilisateur();
$this->menuvue->getMenuVue('Accessubmenus');
$this->utilisateur = new Utilisateur();
}
public function index()
{
$profil = $this->utilisateur->getListeProfilCodeRh();
$menus = array();
$this->genererVue(array(
'profil' => $profil,
'menus' => $menus
));
}
}

View File

@ -0,0 +1,20 @@
<?php
require_once 'Framework/Controleur.php';
require_once 'Modele/Ged.php';
class ControleurAjaxgedassuremvt extends Controleur {
private $ged;
public function __construct() {
$this->ged = new Ged();
}
public function index() {
$idBeneficiaire = $this->requete->getParametreFormulaire("idBeneficiaire");
$geds = $this->ged->getgedassuremvt($idBeneficiaire);
$this->genererVueAjax(array('geds' => $geds));
}
}

View File

@ -0,0 +1,108 @@
<?php
require_once 'Framework/Controleur.php'; // OK
require_once 'Modele/Utilisateur.php';
class ControleurAjaxhabilitation extends Controleur
{
private $utilisateur;
public function __construct()
{
$this->utilisateur = new Utilisateur();
}
public function index()
{
$codeProfil = $this->requete->getParametreFormulaire("codeProfil");
$menus_accessibles = $this->utilisateur->getMenusAccessiblesProfilRh($codeProfil);
$menus_non_accessibles = $this->utilisateur->getMenusNonAccessiblesProfilRh($codeProfil);
$this->genererVueAjax(array('menus_accessibles' => $menus_accessibles, 'menus_non_accessibles' => $menus_non_accessibles));
}
public function ajouterunmenuprofilrh()
{
$codeProfil = $this->requete->getParametreFormulaire("codeProfil");
$codeMenu = $this->requete->getParametreFormulaire("codeMenu");
$this->utilisateur->ajouterunmenuprofilrh($codeProfil, $codeMenu);
}
public function retirerunmenuprofilrh()
{
$codeProfil = $this->requete->getParametreFormulaire("codeProfil");
$codeMenu = $this->requete->getParametreFormulaire("codeMenu");
$this->utilisateur->retirerunmenuprofilrh($codeProfil, $codeMenu);
}
public function ajoutertousmenusprofilrh()
{
$codeProfil = $this->requete->getParametreFormulaire("codeProfil");
$this->utilisateur->ajoutertousmenusprofilrh($codeProfil);
}
public function retirertousmenuprofilrh()
{
$codeProfil = $this->requete->getParametreFormulaire("codeProfil");
$this->utilisateur->retirertousmenuprofilrh($codeProfil);
}
public function afficheraccessousmenus()
{
$codeProfil = $this->requete->getParametreFormulaire("codeProfil");
$codeVue = $this->requete->getParametreFormulaire("codeVue");
$menus_accessibles = $this->utilisateur->getSousMenusAccessiblesVueRh($codeProfil, $codeVue);
$menus_non_accessibles = $this->utilisateur->getSousMenusNonAccessiblesVueRh($codeProfil,$codeVue);
$this->genererVueAjax(array(
'menus_accessibles' => $menus_accessibles,
'menus_non_accessibles' => $menus_non_accessibles
));
}
public function ajoutertoussousmenusrh()
{
$codeProfil = $this->requete->getParametreFormulaire("codeProfil");
$codeVue = $this->requete->getParametreFormulaire("codeVue");
$this->utilisateur->ajoutertoussousmenusrh($codeProfil, $codeVue);
}
public function retirertoussousmenusrh()
{
$codeProfil = $this->requete->getParametreFormulaire("codeProfil");
$codeVue = $this->requete->getParametreFormulaire("codeVue");
$this->utilisateur->retirertoussousmenusrh($codeProfil, $codeVue);
}
public function ajouterunsousmenurh()
{
$codeProfil = $this->requete->getParametreFormulaire("codeProfil");
$codeVue = $this->requete->getParametreFormulaire("codeVue");
$codeMenu = $this->requete->getParametreFormulaire("codeMenu");
$this->utilisateur->ajouterunsousmenurh($codeProfil, $codeVue, $codeMenu);
}
public function retirerunsousmenurh()
{
$codeProfil = $this->requete->getParametreFormulaire("codeProfil");
$codeVue = $this->requete->getParametreFormulaire("codeVue");
$codeMenu = $this->requete->getParametreFormulaire("codeMenu");
$this->utilisateur->retirerunsousmenurh($codeProfil, $codeVue, $codeMenu);
}
}

View File

@ -0,0 +1,23 @@
<?php
require_once 'Framework/Controleur.php';
require_once 'Modele/Utilisateur.php';
class ControleurAjaxmenusprofilrh extends Controleur
{
private $utilisateur;
public function __construct() {
$this->utilisateur = new Utilisateur();
}
public function index()
{
$codeProfil = $this->requete->getParametreFormulaire("codeProfil");
//
$menus = $this->utilisateur->getListeProfilRh($codeProfil);
$this->genererVueAjax(array(
'menus' => $menus
));
}
}

View File

@ -0,0 +1,45 @@
<?php
require_once 'Framework/Controleur.php';
require_once 'Modele/Client.php';
require_once 'Modele/Menuvueutilisateur.php';
require_once 'Modele/Ouinon.php';
require_once 'Modele/Langue.php';
class ControleurFicheuserrhclient extends Controleur {
private $menuvue;
private $client;
private $langue;
private $oui_non;
public function __construct()
{
$this->menuvue = new Menuvueutilisateur();
$this->menuvue->getMenuVue("Ficheuserrhclient");
$this->client = new Client();
$this->oui_non = new Ouinon();
$this->langue = new Langue();
}
public function index()
{
$idUtilisateur = $this->requete->getParametreFormulaire("id");
$user_actif = $this->oui_non->getListe();
$user_actVisible = $this->oui_non->getListe();
$langue = $this->langue->getListe();
$user_AffectionVisible = $this->oui_non->getListe();
$user_rh = $this->client->getunuserrhclient($idUtilisateur);
$user_profil = $this->client->getListeProfilRh();
$this->genererVue(array(
'user_rh' => $user_rh,
'user_actif' => $user_actif,
'user_actVisible' => $user_actVisible,
'langue' => $langue,
'user_AffectionVisible' => $user_AffectionVisible,
'user_profil' => $user_profil
));
}
}

View File

@ -0,0 +1,22 @@
<?php
require_once 'Framework/Controleur.php';
require_once 'Modele/Utilisateur.php';
require_once 'Modele/Menuvueutilisateur.php';
class ControleurRoles extends Controleur
{
private $utilisateur;
public function __construct() {
$this->menuvue = new Menuvueutilisateur();
$this->menuvue->getMenuVue('Roles');
$this->utilisateur = new Utilisateur();
}
public function index()
{
$profil = $this->utilisateur->getListeProfilCodeRh();
$this->genererVue(array('profil' => $profil));
}
}

View File

@ -43565,7 +43565,7 @@ function select_tous_carte_a_editer(p_choix)
data: donnees,
success: function(data) {
$('#div_liste_carte').html(data);
appliquerDataTable();
},
error: function(data) {
},
@ -43589,7 +43589,7 @@ function select_un_assure_a_editer(p_choix, id)
data: donnees,
success: function(data) {
//$('#div_liste_carte').html(data);
//appliquerDataTable();
//
},
error: function(data) {
},
@ -43658,7 +43658,7 @@ function tester_edition_carteassure()
v_msg="Liste vide!";
v_msgEng="Empty list!";
alert_ebene(v_msg, v_msgEng);
appliquerDataTable();
return false;
}
else
@ -43779,7 +43779,7 @@ function apercu_mouvement_assures()
data: donnees,
success: function(data) {
$("#div_mvt").html(data);
appliquerDataTable('.tabliste');
},
complete: function() {
}
@ -43880,7 +43880,7 @@ function liste_mouvemements_rh()
data: donnees,
success: function(data) {
$("#div_mvt").html(data);
appliquerDataTable('.tabliste');
},
complete: function() {
}
@ -43913,7 +43913,7 @@ function liste_mouvemements_rh_valider()
data: donnees,
success: function(data) {
$("#div_mvt").html(data);
appliquerDataTable('.tabliste');
},
complete: function() {
}
@ -44715,3 +44715,675 @@ function recapituler_reincorporer()
}
});
}
function consulter_ged_assure_mvt(idBeneficiaire){
$("#div_patienter").html(`
<div class="d-flex flex-column align-items-center justify-content-center" style="padding-top:80px;">
<div class="spinner-border text-primary" role="status" style="width:3rem; height:3rem;">
<span class="visually-hidden">Loading...</span>
</div>
<span class="mt-3 fs-5 fw-bold">
Veuillez patienter... / Please wait...
</span>
</div>
`);
donnees = 'idBeneficiaire='+idBeneficiaire;
$.ajax({
url: $("#racineWeb").val()+"Ajaxgedassuremvt/",
type : 'post',
data: donnees,
error: function(errorData){
alert("Erreur : "+errorData);
},
success: function(data) {
//alert("Success : "+data);
$("#div_patienter").html('');
$('#div_ged').html(data);
//
$('#div_ged').modal("show");
},
complete: function() {
}
});
}
function desactiver_user_rh_client(codeUtilisateur)
{
v_msg="Confirmez-vous la désactivation?";
v_msgEng="Do you confirm the deactivation?";
if(confirm_ebene(v_msg, v_msgEng))
{
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);
retour_a_users_rh_client();
}
});
}
}
function activer_user_rh_client(codeUtilisateur)
{
v_msg="Confirmez-vous l\'activation?";
v_msgEng="Do you confirm the activation?";
if(confirm_ebene(v_msg, v_msgEng))
{
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);
retour_a_users_rh_client();
}
});
}
}
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()
{
debugger;
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);
$("#nom").focus();
return;
}
if(codeLangue<=" ")
{
v_msg="Veuillez indiquer la langue!";
v_msgEng="Please select the language";
alert_ebene(v_msg, v_msgEng);
$("#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);
$("#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);
$("#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?";
if(confirm_ebene(v_msg, v_msgEng))
{
$.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();
}
});
}
}
function reinitpaswd_user_rh(codeUtilisateur)
{
v_msg="Confirmez-vous la réinitialisation?";
v_msgEng="Do you confirm the reset?";
if(confirm_ebene(v_msg, v_msgEng))
{
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);
retour_a_users_rh_client();
}
});
}
}
function afficher_menu_principal_profil_rh()
{
codeProfil=$("#codeProfil").val();
if (codeProfil<=" ")
{
v_msg="Veuillez sélectionner un profil!";
v_msgEng="Please select a user profile!";
alert_ebene(v_msg, v_msgEng);
$("#codeProfil").focus();
return;
}
donnees = 'codeProfil='+codeProfil;
var div_attente = $('#div_menu_profil');
div_attente.html(`
<div class="d-flex flex-column align-items-center justify-content-center" style="padding-top:80px;">
<div class="spinner-border text-primary" role="status" style="width:3rem; height:3rem;">
<span class="visually-hidden">Loading...</span>
</div>
<span class="mt-3 fs-5 fw-bold">
Veuillez patienter... / Please wait...
</span>
</div>
`);
$.ajax({
url: $("#racineWeb").val()+"Ajaxhabilitation/",
type : 'post',
data: donnees,
error: function(errorData) {
},
success: function(data) {
div_attente.html(data);
},
complete: function() {
}
});
}
function ajouter_tous_menus_principal_profil_rh()
{
codeProfil=$("#codeProfil").val();
if (codeProfil<=" ")
{
v_msg="Veuillez sélectionner un profil!";
v_msgEng="Please select a user profile!";
alert_ebene(v_msg, v_msgEng);
$("#codeProfil").focus();
return;
}
donnees = 'codeProfil='+codeProfil;
$.ajax({
url: $("#racineWeb").val()+"Ajaxhabilitation/ajoutertousmenusprofilrh/",
type: 'POST',
data: donnees,
success: function(data) {
},
error: function(data) {
},
complete: function() {
afficher_menu_principal_profil_rh();
}
});
}
function ajouter_un_menu_principal_profil_rh(codeMenu)
{
codeProfil=$("#codeProfil").val();
if (codeProfil<=" ")
{
v_msg="Veuillez sélectionner un profil!";
v_msgEng="Please select a user profile!";
alert_ebene(v_msg, v_msgEng);
$("#codeProfil").focus();
return;
}
donnees = 'codeProfil='+codeProfil+'&codeMenu='+codeMenu;
$.ajax({
url: $("#racineWeb").val()+"Ajaxhabilitation/ajouterunmenuprofilrh/",
type: 'POST',
data: donnees,
success: function(data) {
},
error: function(data) {
},
complete: function() {
afficher_menu_principal_profil_rh();
}
});
}
function retirer_tous_menus_principal_profil_rh()
{
codeProfil=$("#codeProfil").val();
if (codeProfil<=" ")
{
v_msg="Veuillez sélectionner un profil!";
v_msgEng="Please select a user profile!";
alert_ebene(v_msg, v_msgEng);
$("#codeProfil").focus();
return;
}
donnees = 'codeProfil='+codeProfil;
$.ajax({
url: $("#racineWeb").val()+"Ajaxhabilitation/retirertousmenuprofilrh/",
type: 'POST',
data: donnees,
success: function(data) {
},
error: function(data) {
},
complete: function() {
afficher_menu_principal_profil_rh();
}
});
}
function retirer_un_menu_principal_profil_rh(codeMenu)
{
codeProfil=$("#codeProfil").val();
if (codeProfil<=" ")
{
v_msg="Veuillez sélectionner un profil!";
v_msgEng="Please select a user profile!";
alert_ebene(v_msg, v_msgEng);
$("#codeProfil").focus();
return;
}
donnees = 'codeProfil='+codeProfil+'&codeMenu='+codeMenu;
$.ajax({
url: $("#racineWeb").val()+"Ajaxhabilitation/retirerunmenuprofilrh/",
type: 'POST',
data: donnees,
success: function(data) {
},
error: function(data) {
},
complete: function() {
afficher_menu_principal_profil_rh();
}
});
}
function ajax_menus_profil()
{
var codeProfil = $("#codeProfil").val();
if (codeProfil<=" ")
{
v_msg="Veuillez sélectionner un profil!";
v_msgEng="Please select a user profile!";
alert_ebene(v_msg, v_msgEng);
$("#codeProfil").focus();
return;
}
donnees = 'codeProfil='+codeProfil;
$.ajax({
url: $("#racineWeb").val()+"Ajaxmenusprofilrh/",
type: 'POST',
data: donnees,
success: function(data) {
$("#div_menu").html(data);
},
error: function(data) {
},
complete: function() {
}
});
}
function afficher_menu_vue_profil()
{
codeProfil=$("#codeProfil").val();
if (codeProfil<=" ")
{
v_msg="Veuillez sélectionner un profil!";
v_msgEng="Please select a user profile!";
alert_ebene(v_msg, v_msgEng);
$("#codeProfil").focus();
return;
}
codeVue = $("#codeVue").val();
if (codeVue<=" ")
{
v_msg="Veuillez sélectionner une vue!";
v_msgEng="Please select a view!";
alert_ebene(v_msg, v_msgEng);
$("#codeVue").focus();
return;
}
donnees = 'codeProfil='+codeProfil;
donnees += '&codeVue='+codeVue;
var div_attente = $('#div_menu_profil');
div_attente.html(`
<div class="d-flex flex-column align-items-center justify-content-center" style="padding-top:80px;">
<div class="spinner-border text-primary" role="status" style="width:3rem; height:3rem;">
<span class="visually-hidden">Loading...</span>
</div>
<span class="mt-3 fs-5 fw-bold">
Veuillez patienter... / Please wait...
</span>
</div>
`);
$.ajax({
url: $("#racineWeb").val()+"Ajaxhabilitation/afficheraccessousmenus/",
type : 'post',
data: donnees,
error: function(errorData) {
},
success: function(data)
{
div_attente.html(data);
},
complete: function() {
}
});
}
function ajouter_tous_menu_vue_profil()
{
codeProfil=$("#codeProfil").val();
if (codeProfil<=" ")
{
v_msg="Veuillez sélectionner un profil!";
v_msgEng="Please select a user profile!";
alert_ebene(v_msg, v_msgEng);
$("#codeProfil").focus();
return;
}
codeVue=$("#codeVue").val();
if (codeVue<=" ")
{
v_msg="Veuillez sélectionner une vue!";
v_msgEng="Please select a view!";
alert_ebene(v_msg, v_msgEng);
$("#codeVue").focus();
return;
}
donnees = 'codeProfil='+codeProfil;
donnees += '&codeVue='+codeVue;
$.ajax({
url: $("#racineWeb").val()+"Ajaxhabilitation/ajoutertoussousmenusrh/",
type: 'POST',
data: donnees,
success: function(data) {
},
error: function(data) {
},
complete: function() {
afficher_menu_vue_profil();
}
});
}
function ajouter_un_menu_vue_profil(codeMenu)
{
codeProfil=$("#codeProfil").val();
if (codeProfil<=" ")
{
v_msg="Veuillez sélectionner un profil!";
v_msgEng="Please select a user profile!";
alert_ebene(v_msg, v_msgEng);
$("#codeProfil").focus();
return;
}
codeVue=$("#codeVue").val();
if (codeVue<=" ")
{
v_msg="Veuillez sélectionner une vue!";
v_msgEng="Please select a view!";
alert_ebene(v_msg, v_msgEng);
$("#codeVue").focus();
return;
}
donnees = 'codeProfil='+codeProfil;
donnees += '&codeVue='+codeVue;
donnees += '&codeMenu='+codeMenu;
$.ajax({
url: $("#racineWeb").val()+"Ajaxhabilitation/ajouterunsousmenurh/",
type: 'POST',
data: donnees,
success: function(data) {
},
error: function(data) {
},
complete: function() {
afficher_menu_vue_profil();
}
});
}
function retirer_tous_menu_vue_profil()
{
codeProfil=$("#codeProfil").val();
if (codeProfil<=" ")
{
v_msg="Veuillez sélectionner un profil!";
v_msgEng="Please select a user profile!";
alert_ebene(v_msg, v_msgEng);
$("#codeProfil").focus();
return;
}
codeVue=$("#codeVue").val();
if (codeVue<=" ")
{
v_msg="Veuillez sélectionner une vue!";
v_msgEng="Please select a view!";
alert_ebene(v_msg, v_msgEng);
$("#codeVue").focus();
return;
}
donnees = 'codeProfil='+codeProfil;
donnees += '&codeVue='+codeVue;
$.ajax({
url: $("#racineWeb").val()+"Ajaxhabilitation/retirertoussousmenusrh/",
type: 'POST',
data: donnees,
success: function(data) {
},
error: function(data) {
},
complete: function() {
afficher_menu_vue_profil();
}
});
}
function retirer_un_menu_vue_profil(codeMenu)
{
codeProfil=$("#codeProfil").val();
if (codeProfil<=" ")
{
v_msg="Veuillez sélectionner un profil!";
v_msgEng="Please select a user profile!";
alert_ebene(v_msg, v_msgEng);
$("#codeProfil").focus();
return;
}
codeVue=$("#codeVue").val();
if (codeVue<=" ")
{
v_msg="Veuillez sélectionner une vue!";
v_msgEng="Please select a view!";
alert_ebene(v_msg, v_msgEng);
$("#codeVue").focus();
return;
}
donnees = 'codeProfil='+codeProfil;
donnees += '&codeVue='+codeVue;
donnees += '&codeMenu='+codeMenu;
$.ajax({
url: $("#racineWeb").val()+"Ajaxhabilitation/retirerunsousmenurh/",
type: 'POST',
data: donnees,
success: function(data) {
},
error: function(data) {
},
complete: function() {
afficher_menu_vue_profil();
}
});
}

View File

@ -357,7 +357,7 @@ class Client extends Modele {
$this->executerRequete($sql, array($codeUtilisateur));
}
public function desactiver($codeUtilisateur)
public function desactiver($codeUtilisateur)
{
$sql = 'call sp_c_desactiver_utilisateur_rh_client(?)';
@ -371,7 +371,7 @@ class Client extends Modele {
$this->executerRequete($sql, array($codeUtilisateur));
}
public function existelogin($codeUtilisateur) {
public function existelogin($codeUtilisateur) {
$sql = 'select id FROM c_utilisateur WHERE (codeUtilisateur=?)';
$resultat = $this->executerRequete($sql, array($codeUtilisateur));
return ($resultat->rowCount() > 0);

View File

@ -240,5 +240,16 @@ class Ged extends Modele {
return $resultat->fetchAll(PDO::FETCH_ASSOC);
}
public function getgedassuremvt($idBeneficiaire)
{
$lang = $_SESSION['lang'];
$sql = 'call sp_get_ged_assure_mvt(?, ?);';
$resultat = $this->executerRequete($sql, array($idBeneficiaire, $lang));
return $resultat->fetchAll(PDO::FETCH_ASSOC);
}
}

View File

@ -291,6 +291,8 @@ class Utilisateur extends Modele {
}
public function getMenusNonAccessiblesProfil($codeProfil)
{
$sql = "call sp_r_get_menus_non_accessibles_profil(?, ?);";
@ -662,4 +664,153 @@ class Utilisateur extends Modele {
$email, $hash, $codeLangue, $actVisible, $AffectionVisible, $user));
}
public function getListeProfilCodeRh()
{
if (est_anglophone())
{
$sql = 'SELECT codeProfil AS `code`, CONCAT(libelleEng, " ( ", codeProfil, " )") AS libelle FROM c_profil WHERE (codeSociete=?) ORDER BY libelleEng';
}
else
{
$sql = 'SELECT codeProfil AS `code`, CONCAT(libelle, " ( ", codeProfil, " )") AS libelle FROM c_profil WHERE (codeSociete=?) ORDER BY libelle';
}
$liste = $this->executerRequete($sql, array($_SESSION['codeSociete']));
return $liste->fetchAll(PDO::FETCH_ASSOC);
}
public function getMenusAccessiblesProfilRh($codeProfil)
{
$sql = "call sp_c_get_menus_accessibles_profil_rh(?, ?);";
$menu = $this->executerRequete($sql, array($_SESSION['codeSociete'], $codeProfil));
return $menu->fetchAll(PDO::FETCH_ASSOC);
}
public function getMenusNonAccessiblesProfilRh($codeProfil)
{
$sql = "call sp_c_get_menus_non_accessibles_profil_rh(?, ?);";
$menu = $this->executerRequete($sql, array($_SESSION['codeSociete'], $codeProfil));
return $menu->fetchAll(PDO::FETCH_ASSOC);
}
public function ajoutertousmenusprofilrh($codeProfil)
{
$codeSociete = $_SESSION['codeSociete'];
$user = $_SESSION['login'];
$sql = 'call sp_c_ajouter_tous_menus_accessibles_profil_rh(?, ?, ?)';
$this->executerRequete($sql, array($codeSociete, $codeProfil, $user));
}
public function ajouterunmenuprofilrh($codeProfil, $codeMenu)
{
$codeSociete = $_SESSION['codeSociete'];
$user = $_SESSION['login'];
$sql = 'call sp_c_ajouter_un_menu_accessibles_profil_rh(?, ?, ?, ?)';
$this->executerRequete($sql, array($codeSociete, $codeProfil, $codeMenu, $user));
}
public function retirertousmenuprofilrh($codeProfil)
{
$codeSociete = $_SESSION['codeSociete'];
$user = $_SESSION['login'];
$sql = 'call sp_c_retirer_tous_menus_accessibles_profil_rh(?, ?, ?)';
$this->executerRequete($sql, array($codeSociete, $codeProfil, $user));
}
public function retirerunmenuprofilrh($codeProfil, $codeMenu)
{
$codeSociete = $_SESSION['codeSociete'];
$user = $_SESSION['login'];
$sql = 'call sp_c_retirer_un_menu_accessibles_profil_rh(?, ?, ?, ?)';
$this->executerRequete($sql, array($codeSociete, $codeProfil, $codeMenu, $user));
}
public function getSousMenusAccessiblesVueRh($codeProfil, $codeVue)
{
$sql = "call sp_c_get_sous_menus_accessibles_vue_rh(?, ?, ?);";
$menu = $this->executerRequete($sql, array($_SESSION['codeSociete'], $codeProfil, $codeVue));
return $menu->fetchAll(PDO::FETCH_ASSOC);
}
public function getSousMenusNonAccessiblesVueRh($codeProfil, $vue)
{
$sql = "call sp_c_get_sous_menus_non_accessibles_vue_rh(?, ?, ?);";
$menu = $this->executerRequete($sql, array($_SESSION['codeSociete'], $codeProfil, $vue));
return $menu->fetchAll(PDO::FETCH_ASSOC);
}
public function getListeProfilRh($codeProfil)
{
if (est_anglophone())
{
$sql = "call sp_c_get_liste_menus_profil_rh_eng(?, ?);";
}
else
{
$sql = "call sp_c_get_liste_menus_profil_rh(?, ?);";
}
$menu = $this->executerRequete($sql, array($_SESSION['codeSociete'], $codeProfil));
return $menu->fetchAll(PDO::FETCH_ASSOC);
}
public function ajoutertoussousmenusrh($codeProfil, $codeVue)
{
$codeSociete = $_SESSION['codeSociete'];
$user = $_SESSION['login'];
$sql = 'call sp_c_ajouter_tous_sous_menus_profil_rh(?, ?, ?, ?)';
$this->executerRequete($sql, array($codeSociete, $codeProfil, $codeVue, $user));
}
public function ajouterunsousmenurh($codeProfil, $codeVue, $codeMenu)
{
$codeSociete = $_SESSION['codeSociete'];
$user = $_SESSION['login'];
$sql = 'call sp_c_ajouter_un_sous_menus_profil_rh(?, ?, ?, ?, ?)';
$this->executerRequete($sql, array($codeSociete, $codeProfil, $codeVue, $codeMenu, $user));
}
public function retirertoussousmenusrh($codeProfil, $codeVue)
{
$codeSociete = $_SESSION['codeSociete'];
$user = $_SESSION['login'];
$sql = 'call sp_c_retirer_tous_sous_menus_profil_rh(?, ?, ?, ?)';
$this->executerRequete($sql, array($codeSociete, $codeProfil, $codeVue, $user));
}
public function retirerunsousmenurh($codeProfil, $codeVue, $codeMenu)
{
$codeSociete = $_SESSION['codeSociete'];
$user = $_SESSION['login'];
$sql = 'call sp_c_retirer_un_sous_menus_profil_rh(?, ?, ?, ?, ?)';
$this->executerRequete($sql, array($codeSociete, $codeProfil, $codeVue, $codeMenu, $user));
}
}

View File

@ -0,0 +1,98 @@
<?php $this->titre = "INTER SANTE - Accès Sous-Menus"; ?>
<div id="div_liste" class="container-fluid" style="padding-top: 20px; padding-bottom: 20px;">
<div class="page-header" style="margin-top: 0; border-bottom: 2px solid #337ab7; padding-bottom: 15px;">
<div class="row">
<div class="col-xs-2 col-sm-1">
<div style="background-color: #337ab7; color: #fff; padding: 15px; border-radius: 6px; text-align: center;">
<span class="glyphicon glyphicon-th-list" style="font-size: 24px;"></span>
</div>
</div>
<div class="col-xs-10 col-sm-11">
<h1 style="margin: 0; color: #337ab7; font-weight: bold; font-size: 24px;">
<?= _("Gestion des Sous-Menus") ?>
</h1>
<p class="text-muted" style="margin-top: 5px;"><?= _("Définissez quels boutons et actions sont visibles pour chaque profil") ?></p>
</div>
</div>
</div>
<div class="panel panel-default" style="border-radius: 4px; box-shadow: 0 1px 3px rgba(0,0,0,0.1);">
<div class="panel-body" style="background-color: #f9f9f9; padding: 25px;">
<div class="row">
<div class="col-md-4">
<div class="form-group">
<label for="codeProfil" class="control-label" style="text-transform: uppercase; font-size: 11px; color: #666; font-weight: bold;">
<span class="glyphicon glyphicon-tags" style="margin-right: 5px;"></span> <?= _("Profil") ?>
</label>
<select class="form-control" id="codeProfil" name="codeProfil" onChange="ajax_menus_profil();" style="height: 40px;">
<?php liste_options($profil, ""); ?>
</select>
</div>
</div>
<div class="col-md-5">
<div class="form-group">
<label for="vue" class="control-label" style="text-transform: uppercase; font-size: 11px; color: #666; font-weight: bold;">
<span class="glyphicon glyphicon-folder-open" style="margin-right: 5px;"></span> <?= _("Menu Principal") ?>
</label>
<div id="div_menu">
<select class="form-control" id="codeVue" name="codeVue" style="height: 40px;">
<?php liste_options($menus, ""); ?>
</select>
</div>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label class="hidden-xs">&nbsp;</label> <button type="button" class="btn btn-primary btn-block"
onclick="afficher_menu_vue_profil();"
style="height: 40px; font-weight: bold; text-transform: uppercase;">
<span class="glyphicon glyphicon-refresh" style="margin-right: 8px;"></span> <?= _("Actualiser la vue") ?>
</button>
</div>
</div>
</div>
</div>
</div>
<div id="div_menu_profil" class="well" style="min-height: 350px; background-color: #ffffff; border: 2px dashed #ddd; text-align: center; margin-top: 20px;">
<div style="padding-top: 80px; color: #999;">
<div style="margin-bottom: 20px;">
<span class="glyphicon glyphicon-hand-up" style="font-size: 48px; opacity: 0.3;"></span>
</div>
<h4 style="font-weight: 300;"><?= _("Sélectionnez un profil et un menu pour gérer les boutons") ?></h4>
</div>
</div>
</div>
<style>
/* Simulation de l'animation d'entrée pour les anciens navigateurs */
.container-fluid {
animation: fadeIn 0.4s ease-in-out;
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
/* Style pour la zone de contenu quand elle est chargée via AJAX */
#div_menu_profil:not(:empty) {
border: none;
background-color: transparent;
padding: 0;
box-shadow: none;
}
/* Focus des champs version BS3 */
.form-control:focus {
border-color: #337ab7;
box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(51, 122, 183, 0.6);
}
</style>

View File

@ -0,0 +1,100 @@
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content" style="border-radius: 6px; box-shadow: 0 5px 15px rgba(0,0,0,.5);">
<div class="modal-header" style="background-color: #f5f5f5; border-bottom: 1px solid #ddd; border-top-left-radius: 6px; border-top-right-radius: 6px;">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" style="font-weight: bold; color: #337ab7;">
<span class="glyphicon glyphicon-ok-sign" style="margin-right: 8px;"></span><?= _('Consulter GED Assuré') ?>
</h4>
</div>
<div class="modal-body" style="padding: 20px;">
<div class="table-responsive">
<table class="table table-hover table-striped table-bordered" style="font-size: 12px; vertical-align: middle;">
<thead>
<tr >
<th class="text-center" style="padding: 10px;"><?= _("Date") ?></th>
<th class="text-center"><?= _("Src") ?></th>
<th><?= _("Souscripteur / Police") ?></th>
<th><?= _("Bénéficiaire / Adhérent") ?></th>
<th><?= _("Type du Document") ?></th>
<th><?= _("Nom du Document") ?></th>
<th class="text-center"><?= _("Action") ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($geds as $ged):
$idGed = $this->nettoyer($ged['idGed']);
$cheminFichier = $this->nettoyer($ged['cheminFichier']);
if($ged['codeNaturePiece'] == "AUT") {
$libelleType = $this->nettoyer($ged['libelleAutre']);
} else {
$libelleType = $this->nettoyer($ged['libelleType']);
}
?>
<tr>
<td class="text-center" style="vertical-align: middle; color: #777;">
<?= dateheureLang($this->nettoyer($ged['dateSysteme'])) ?>
</td>
<td class="text-center" style="vertical-align: middle;">
<span class="label label-default" style="font-weight: normal; background-color: #eee; color: #333; border: 1px solid #ccc;">
<?= $this->nettoyer($ged['source']) ?>
</span>
</td>
<td style="vertical-align: middle;">
<div style="font-weight: bold; color: #333;"><?= $this->nettoyer($ged['souscripteur']) ?></div>
<div class="text-primary" style="font-size: 10px;"> <?= $this->nettoyer($ged['numeroPolice']) ?></div>
</td>
<td style="vertical-align: middle;">
<div style="font-weight: bold;"><?= $this->nettoyer($ged['beneficiaire']) ?></div>
<div style="color: #777; font-style: italic; font-size: 10px;">
<?= $this->nettoyer($ged['adherent']) ?> (<?= $this->nettoyer($ged['numeroBeneficiaire']) ?>)
</div>
</td>
<td style="vertical-align: middle; text-transform: uppercase;"><?= $libelleType; ?></td>
<td style="vertical-align: middle;">
<span class="glyphicon glyphicon-file" style="color: #a94442; margin-right: 5px;"></span>
<span style="display: inline-block; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom;" title="<?= $this->nettoyer($ged['nomOrigine']) ?>">
<?= $this->nettoyer($ged['nomOrigine']) ?>
</span>
</td>
<td class="text-center" style="vertical-align: middle;">
<a href="<?= $cheminFichier ?>" target="_blank" class="btn btn-danger btn-xs" style="font-weight: bold; font-size: 10px; border-radius: 3px;">
<span class="glyphicon glyphicon-download-alt" style="margin-right: 5px;"></span><?= _("TELECHARGER") ?>
</a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
<div class="modal-footer" style="background-color: #f5f5f5; border-bottom-left-radius: 6px; border-bottom-right-radius: 6px;">
<button type="button" class="btn btn-default" data-dismiss="modal" style="font-weight: bold;"> <?= _("Fermer") ?> </button>
</div>
</div>
</div>
<style>
/* Correction pour l'alignement vertical des cellules */
.table > tbody > tr > td {
vertical-align: middle !important;
}
/* Animation FadeIn pour la modale */
.modal-content {
animation: modalFadeIn 0.3s ease;
}
@keyframes modalFadeIn {
from { opacity: 0; transform: translateY(-20px); }
to { opacity: 1; transform: translateY(0); }
}
</style>

View File

@ -0,0 +1,144 @@
<div id="div_menu_profil" class="container-fluid">
<div class="row">
<div id="div_utilisateur_profil_1" class="col-md-6">
<div class="panel panel-default" style="box-shadow: 0 1px 3px rgba(0,0,0,0.1); border-radius: 4px;">
<div class="panel-heading" style="background-color: #f5f5f5; padding: 12px 15px;">
<div class="row">
<div class="col-xs-9">
<strong style="color: #777; text-transform: uppercase; font-size: 11px;">
<span class="glyphicon glyphicon-eye-close" style="margin-right: 8px;"></span>
<?= _("Sous-menus non accessibles") ?>
</strong>
</div>
<div class="col-xs-3 text-right">
<span class="badge"><?= format_N(count($menus_non_accessibles)) ?></span>
</div>
</div>
</div>
<div class="panel-body" style="padding: 10px;">
<button type="button" class="btn btn-info btn-sm btn-block"
style="font-weight: bold; text-transform: uppercase; font-size: 11px;"
onclick="javascript:ajouter_tous_menu_vue_profil();">
<?= _("Tout ajouter") ?> <span class="glyphicon glyphicon-chevron-right" style="margin-left: 5px;"></span>
</button>
</div>
<div class="table-responsive" style="max-height: 450px; overflow-y: auto; border-top: 1px solid #ddd;">
<table class="table table-hover" style="margin-bottom: 0;">
<tbody>
<?php foreach ($menus_non_accessibles as $m):
$codeMenu = $m['codeMenu'];
$libeleMenu = est_anglophone() ? $m['libelleEng'] : $m['libeleMenu'];
?>
<tr>
<td style="padding-left: 15px; vertical-align: middle; color: #777; border-top: 1px solid #f9f9f9;">
<?= $libeleMenu ?>
</td>
<td class="text-right" style="padding-right: 15px; vertical-align: middle; width: 60px; border-top: 1px solid #f9f9f9;">
<button class="btn btn-default btn-xs btn-circle-action"
style="color: #5bc0de; border-color: #5bc0de;"
title="<?= _("Ajouter") ?>"
onClick="javascript:ajouter_un_menu_vue_profil('<?=$codeMenu?>');">
<span class="glyphicon glyphicon-plus"></span>
</button>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</div>
<div id="div_utilisateur_profil_2" class="col-md-6">
<div class="panel panel-info" style="box-shadow: 0 1px 3px rgba(0,0,0,0.1); border-radius: 4px; border-color: #d9edf7;">
<div class="panel-heading" style="background-color: #d9edf7; padding: 12px 15px; border-color: #d9edf7;">
<div class="row">
<div class="col-xs-9">
<strong style="color: #31708f; text-transform: uppercase; font-size: 11px;">
<span class="glyphicon glyphicon-eye-open" style="margin-right: 8px;"></span>
<?= _("Sous-menus accessibles") ?>
</strong>
</div>
<div class="col-xs-3 text-right">
<span class="badge" style="background-color: #31708f;"><?= format_N(count($menus_accessibles)) ?></span>
</div>
</div>
</div>
<div class="panel-body" style="padding: 10px;">
<button type="button" class="btn btn-default btn-sm btn-block"
style="font-weight: bold; text-transform: uppercase; font-size: 11px; color: #666;"
onclick="javascript:retirer_tous_menu_vue_profil();">
<span class="glyphicon glyphicon-chevron-left" style="margin-right: 5px;"></span> <?= _("Tout retirer") ?>
</button>
</div>
<div class="table-responsive" style="max-height: 450px; overflow-y: auto; border-top: 1px solid #d9edf7; background-color: #fff;">
<table class="table table-hover" style="margin-bottom: 0;">
<tbody>
<?php foreach ($menus_accessibles as $m):
$codeMenu = $m['codeMenu'];
$libeleMenu = est_anglophone() ? $m['libelleEng'] : $m['libeleMenu'];
?>
<tr>
<td class="text-left" style="padding-left: 15px; vertical-align: middle; width: 60px; border-top: 1px solid #f0f7fa;">
<button class="btn btn-default btn-xs btn-circle-action"
style="color: #777;"
title="<?= _("Retirer") ?>"
onClick="javascript:retirer_un_menu_vue_profil('<?=$codeMenu?>');">
<span class="glyphicon glyphicon-minus"></span>
</button>
</td>
<td style="vertical-align: middle; border-top: 1px solid #f0f7fa;">
<strong style="color: #333;"><?= $libeleMenu ?></strong>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<style>
/* Boutons d'action circulaires pour Bootstrap 3 */
.btn-circle-action {
width: 28px;
height: 28px;
padding: 0;
border-radius: 50%;
line-height: 28px;
text-align: center;
transition: all 0.2s;
}
.btn-circle-action:hover {
background-color: #5bc0de;
color: white !important;
border-color: #5bc0de;
transform: scale(1.1);
}
/* Animation de fondu */
#div_menu_profil {
animation: fadeIn 0.4s ease-in;
}
@keyframes fadeIn {
from { opacity: 0; } to { opacity: 1; }
}
/* Scrollbar pour anciens navigateurs */
.table-responsive::-webkit-scrollbar {
width: 5px;
}
.table-responsive::-webkit-scrollbar-thumb {
background: #ccc;
border-radius: 10px;
}
</style>

View File

@ -0,0 +1,131 @@
<div id="div_menu_profil" class="container-fluid">
<div class="row">
<div id="div_utilisateur_profil_1" class="col-md-6">
<div class="panel panel-danger" style="box-shadow: 0 2px 5px rgba(0,0,0,0.1);">
<div class="panel-heading" style="padding: 10px 15px;">
<div class="row">
<div class="col-xs-9">
<strong style="text-transform: uppercase; font-size: 12px;">
<span class="glyphicon glyphicon-lock" style="margin-right: 8px;"></span>
<?= _("Menus non accessibles") ?>
</strong>
</div>
<div class="col-xs-3 text-right">
<span class="badge" style="background-color: #a94442;"><?= count($menus_non_accessibles) ?></span>
</div>
</div>
</div>
<div class="panel-body" style="background-color: #fcf8f2; padding: 8px;">
<button type="button" class="btn btn-danger btn-sm btn-block"
style="font-weight: bold; text-transform: uppercase; font-size: 11px;"
onclick="javascript:ajouter_tous_menus_principal_profil_rh();">
<?= _("Tout ajouter") ?> <span class="glyphicon glyphicon-forward" style="margin-left: 5px;"></span>
</button>
</div>
<div class="table-responsive" style="max-height: 400px; overflow-y: auto; background: white;">
<table class="table table-hover table-condensed" style="margin-bottom: 0;">
<tbody style="font-size: 13px;">
<?php foreach ($menus_non_accessibles as $m):
$codeMenu = $m['codeMenu'];
$libeleMenu = est_anglophone() ? $m['libelleEng'] : $m['libeleMenu'];
?>
<tr>
<td style="padding-left: 15px; vertical-align: middle; border-top: 1px solid #f2f2f2;"><?= $libeleMenu ?></td>
<td class="text-right" style="padding-right: 15px; vertical-align: middle; width: 60px; border-top: 1px solid #f2f2f2;">
<button class="btn btn-info btn-xs"
style="border-radius: 50%; width: 26px; height: 26px; padding: 0;"
title="<?= _("Ajouter") ?>"
onClick="javascript:ajouter_un_menu_principal_profil_rh('<?=$codeMenu?>');">
<span class="glyphicon glyphicon-chevron-right"></span>
</button>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</div>
<div id="div_utilisateur_profil_2" class="col-md-6">
<div class="panel panel-success" style="box-shadow: 0 2px 5px rgba(0,0,0,0.1);">
<div class="panel-heading" style="padding: 10px 15px;">
<div class="row">
<div class="col-xs-9">
<strong style="text-transform: uppercase; font-size: 12px;">
<span class="glyphicon glyphicon-ok" style="margin-right: 8px;"></span>
<?= _("Menus accessibles") ?>
</strong>
</div>
<div class="col-xs-3 text-right">
<span class="badge" style="background-color: #3c763d;"><?= count($menus_accessibles) ?></span>
</div>
</div>
</div>
<div class="panel-body" style="background-color: #f2fcf2; padding: 8px;">
<button type="button" class="btn btn-success btn-sm btn-block"
style="font-weight: bold; text-transform: uppercase; font-size: 11px;"
onclick="javascript:retirer_tous_menus_principal_profil_rh();">
<span class="glyphicon glyphicon-backward" style="margin-right: 5px;"></span> <?= _("Tout retirer") ?>
</button>
</div>
<div class="table-responsive" style="max-height: 400px; overflow-y: auto; background: white;">
<table class="table table-hover table-condensed" style="margin-bottom: 0;">
<tbody style="font-size: 13px;">
<?php foreach ($menus_accessibles as $m):
$codeMenu = $m['codeMenu'];
$libeleMenu = est_anglophone() ? $m['libelleEng'] : $m['libeleMenu'];
?>
<tr>
<td class="text-left" style="padding-left: 15px; vertical-align: middle; width: 60px; border-top: 1px solid #f2f2f2;">
<button class="btn btn-warning btn-xs"
style="border-radius: 50%; width: 26px; height: 26px; padding: 0;"
title="<?= _("Retirer") ?>"
onClick="javascript:retirer_un_menu_principal_profil_rh('<?=$codeMenu?>');">
<span class="glyphicon glyphicon-chevron-left"></span>
</button>
</td>
<td style="vertical-align: middle; border-top: 1px solid #f2f2f2;"><?= $libeleMenu ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<style>
/* Simulation de l'animation FadeIn */
#div_menu_profil {
animation: fadeIn 0.4s ease-in;
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
/* Style du scrollbar pour les anciens navigateurs (optionnel) */
.table-responsive::-webkit-scrollbar {
width: 6px;
}
.table-responsive::-webkit-scrollbar-thumb {
background: #ccc;
border-radius: 10px;
}
/* Effet simple au survol des boutons circulaires */
.btn-xs:hover {
opacity: 0.8;
transform: scale(1.1);
transition: all 0.2s;
}
</style>

View File

@ -0,0 +1,3 @@
<select class="form-control" id="codeVue" name="codeVue" style="height: 40px;">
<?php liste_options($menus, ""); ?>
</select>

View File

@ -1,86 +1,126 @@
<div class="table-responsive shadow-sm rounded border animate__animated animate__fadeIn">
<table class="table table-hover align-middle mb-0 tabliste compact" style="font-size: 0.85rem;">
<thead class="table-light text-secondary">
<tr>
<th class="text-center border-0 py-3"><?= _("Date Effet") ?></th>
<th class="text-center border-0"><?= _("Mvt") ?></th>
<th class="border-0"><?= _("Bénéficiaire / Matricule") ?></th>
<th class="border-0"><?= _("Adhérent") ?></th>
<th class="text-center border-0"><?= _("Lien") ?></th>
<th class="text-center border-0"><?= _("Saisie / Par") ?></th>
<th class="text-center border-0"><?= _("Prime Ttc") ?></th>
<th colspan="2" class="text-center border-0"><?= _("Choix") ?></th>
<div class="table-responsive" style="border: 1px solid #ddd; border-radius: 4px; box-shadow: 0 1px 3px rgba(0,0,0,0.1);">
<div id="div_patienter"></div>
<table class="table table-hover table-striped table-bordered" style="font-size: 12px; vertical-align: middle;">
<thead>
<tr >
<th class="text-center" style="border-bottom: 0; padding: 12px;"><?= _("Date Effet") ?></th>
<th class="text-center" style="border-bottom: 0;"><?= _("Mvt") ?></th>
<th style="border-bottom: 0;"><?= _("Bénéficiaire / Matricule") ?></th>
<th style="border-bottom: 0;"><?= _("Adhérent") ?></th>
<th class="text-center" style="border-bottom: 0;"><?= _("Lien") ?></th>
<th class="text-center" style="border-bottom: 0;"><?= _("Consulter") ?></th>
<th class="text-center" style="border-bottom: 0;"><?= _("Saisie / Par") ?></th>
<th class="text-center" style="border-bottom: 0;"><?= _("Prime Ttc") ?></th>
<th colspan="2" class="text-center" style="border-bottom: 0;"><?= _("Choix") ?></th>
</tr>
<tr>
<th colspan="7" style='text-align:center'> <input class = "form-control btn btn-primary" type="button" value="<?= _("Valider la sélection") ?>" onClick="valider_mouvement_rh();"> </td>
<th style='text-align:center'> <input class = "form-control btn btn-info" type="button" value="V" onClick="selectionner_mouvement_rh_tout('1');"> </td>
<th style='text-align:center'> <input class = "form-control btn btn-danger" type="button" value="X" onClick="selectionner_mouvement_rh_tout('0');"> </td>
<tr style="background-color: #eee;">
<th colspan="8" style="text-align:center; padding: 5px;">
<input class="btn btn-primary btn-sm btn-block" type="button" value="<?= _("Valider la sélection") ?>" onClick="valider_mouvement_rh();">
</th>
<th style="text-align:center; padding: 5px;">
<input class="btn btn-info btn-sm" type="button" value="V" onClick="selectionner_mouvement_rh_tout('1');" style="width: 30px;">
</th>
<th style="text-align:center; padding: 5px;">
<input class="btn btn-danger btn-sm" type="button" value="X" onClick="selectionner_mouvement_rh_tout('0');" style="width: 30px;">
</th>
</tr>
</thead>
<tbody>
<?php foreach ($mouvementassures as $mvt):
$choix = $this->nettoyer($mvt['choix']);
$idMvtTemp = $this->nettoyer($mvt['id']);
$sensMvt = $mvt['sensMouvement']; // On suppose que '0' = Entrée, '1' = Sortie
$sensMvt = $mvt['sensMouvement'];
$libelleSensMouvement = est_anglophone() ? $mvt['libelleSensMouvementEng'] : $mvt['libelleSensMouvement'];
?>
$nombreGed = $mvt['nombreGed'];
$idBeneficiaire = $mvt['idBeneficiaire'];
?>
<tr>
<td class="text-center fw-bold text-dark">
<?= dateLang($this->nettoyer($mvt['dateEffet']), $_SESSION['lang']) ?>
<td class="text-center" style="vertical-align: middle;">
<strong><?= dateLang($this->nettoyer($mvt['dateEffet']), $_SESSION['lang']) ?></strong>
</td>
<td class="text-center">
<td class="text-center" style="vertical-align: middle;">
<?php if ($sensMvt == '1'): // Entrée ?>
<span class="badge rounded-pill bg-success-subtle text-success border border-success-subtle px-3">
<i class="fas fa-sign-in-alt me-1"></i> <?= $libelleSensMouvement ?>
<span class="label label-success" style="padding: 4px 8px; border-radius: 10px; display: inline-block;">
<span class="glyphicon glyphicon-import" style="margin-right: 3px;"></span> <?= $libelleSensMouvement ?>
</span>
<?php else: // Sortie ?>
<span class="badge rounded-pill bg-danger-subtle text-danger border border-danger-subtle px-3">
<i class="fas fa-sign-out-alt me-1"></i> <?= $libelleSensMouvement ?>
<span class="label label-danger" style="padding: 4px 8px; border-radius: 10px; display: inline-block;">
<span class="glyphicon glyphicon-export" style="margin-right: 3px;"></span> <?= $libelleSensMouvement ?>
</span>
<?php endif; ?>
</td>
<td>
<div class="fw-bold text-uppercase"><?= $this->nettoyer($mvt['beneficiaire']) ?></div>
<div class="text-muted x-small"><i class="fas fa-id-card me-1"></i><?= $this->nettoyer($mvt['numeroBeneficiaire']) ?></div>
<td style="vertical-align: middle;">
<div style="font-weight: bold; text-transform: uppercase; color: #333;"><?= $this->nettoyer($mvt['beneficiaire']) ?></div>
<div style="color: #777; font-size: 10px;">
<span class="glyphicon glyphicon-credit-card" style="margin-right: 3px;"></span><?= $this->nettoyer($mvt['numeroBeneficiaire']) ?>
</div>
</td>
<td class="small">
<i class="fas fa-user-tie text-secondary me-1"></i> <?= $this->nettoyer($mvt['adherent']) ?>
<td style="vertical-align: middle; font-size: 11px;">
<span class="glyphicon glyphicon-briefcase" style="color: #999; margin-right: 3px;"></span> <?= $this->nettoyer($mvt['adherent']) ?>
</td>
<td class="text-center">
<span class="badge bg-light text-secondary border"><?= $this->nettoyer($mvt['codeLienParente']) ?></span>
<td class="text-center" style="vertical-align: middle;">
<span class="label label-default" style="color: #555; background-color: #fff; border: 1px solid #ccc;"><?= $this->nettoyer($mvt['codeLienParente']) ?></span>
</td>
<td class="text-center">
<div class="small"><?= dateheureLang($this->nettoyer($mvt['dateSysteme'])) ?></div>
<div class="x-small text-muted fw-bold"><?= $this->nettoyer($mvt['codeUtilisateur']) ?></div>
</td>
<td class="text-center">
<span class="badge bg-light text-secondary border"><?= format_N($this->nettoyer($mvt['primeTtc'])) ?></span>
</td>
<td colspan="2" class="text-center">
<?php if($choix=='1'): ?>
<input type="checkbox" checked value="<?php echo $choix ; ?>" onClick="javascript:if(this.value=='1'){this.value='0'}else{this.value='1'};selectionner_mouvement_rh(<?= $idMvtTemp ?>, this.value);">
<td class="text-center" style="vertical-align: middle;">
<?php if ($nombreGed > '0'): ?>
<button class="btn btn-primary btn-xs" onClick="javascript:consulter_ged_assure_mvt('<?= $idBeneficiaire ?>');">
<?= _("GED") ?>
</button>
<?php else: ?>
<input type="checkbox" value="<?php echo $choix ; ?>" onClick="javascript:if(this.value=='1'){this.value='0'}else{this.value='1'};selectionner_mouvement_rh(<?= $idMvtTemp ?>, this.value);">
<span style="color: #ccc;">-</span>
<?php endif; ?>
</td>
<td class="text-center" style="vertical-align: middle;">
<div style="font-size: 10px;"><?= dateheureLang($this->nettoyer($mvt['dateSysteme'])) ?></div>
<div style="font-size: 9px; color: #777; font-weight: bold;"><?= $this->nettoyer($mvt['codeUtilisateur']) ?></div>
</td>
<td class="text-center" style="vertical-align: middle;">
<span class="label label-default" style="color: #555; background-color: #fff; border: 1px solid #ccc;"><?= format_N($this->nettoyer($mvt['primeTtc'])) ?></span>
</td>
<td colspan="2" class="text-center" style="vertical-align: middle;">
<?php //if ($nombreGed > '0'): ?>
<input type="checkbox"
<?= ($choix == '1') ? 'checked' : '' ?>
value="<?= $choix ?>"
onClick="javascript:this.value=(this.value=='1'?'0':'1');selectionner_mouvement_rh(<?= $idMvtTemp ?>, this.value);">
<?php //else: ?>
<!-- <span style="color: #ccc;">-</span>-->
<?php //endif; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<div id="div_ged" class="modal fade" tabindex="-1" role="dialog"></div>
<style>
.x-small { font-size: 0.7rem; }
.italic { font-style: italic; }
.bg-success-subtle { background-color: #d1e7dd; }
.bg-danger-subtle { background-color: #f8d7da; }
/* Simulation des comportements de la version précédente en BS3 */
.table > tbody > tr > td {
vertical-align: middle !important;
border-top: 1px solid #f2f2f2;
}
.label-default {
font-weight: normal;
font-family: sans-serif;
}
/* Animation simple */
.table-responsive {
animation: fadeIn 0.4s ease;
}
@keyframes fadeIn {
from { opacity: 0; } to { opacity: 1; }
}
</style>

View File

@ -0,0 +1,86 @@
<?php
$this->titre = "INTER SANTE - Modifier Utilisateur";
$idClient = $this->nettoyer($user_rh['idClient']);
$idUtilisateur = $user_rh['id'];
$codeUtilisateur = $user_rh['codeUtilisateur'];
$actif = $user_rh['actif'];
//var_dump($actif);
$codeProfil = $user_rh['codeProfil'];
$codeLangue = $user_rh['codeLangue'];
?>
<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="<?= $actif ?>">
<legend>
<?= _("Modifier l'utilisateur") . " : " . $codeUtilisateur ?>
<?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; ?>
</legend>
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
<tbody>
<tr>
<td width="10%" class="required"> <?= _("Nom") ?> </td>
<td width="40%" ><INPUT style='font-size:10pt;' class="form-control" TYPE="text" id="nom" NAME="nom" value="<?= $this->nettoyer($user_rh['nom']) ?>" required autofocus AUTOCOMPLETE="OFF"></td>
<td width="10%" align="center" class="required"> <?= _("Prénoms") ?> </td>
<td ><INPUT style='font-size:10pt;' class="form-control" TYPE="text" id="prenoms" NAME="prenoms" value="<?= $this->nettoyer($user_rh['prenoms']) ?>" required AUTOCOMPLETE="OFF"></td>
</tr>
<tr>
<td> <?= _("Profil") ?> </td>
<td>
<SELECT style="font-size:10pt;" class="form-control" id="codeProfil" NAME="codeProfil" autofocus >
<?php liste_options($user_profil, $codeProfil, true); ?>
</SELECT>
</td>
<td align="center" class="required"> <?= _("Langue") ?> </td>
<td>
<select class="form-control" id="codeLangueUser" name="codeLangueUser">
<?php liste_options($langue, $codeLangue, true); ?>
</select>
</td>
</tr>
<tr>
<td class="required"> <?= _("Portable") ?> </td>
<td><INPUT style='font-size:10pt;' class="form-control" TYPE="tel" id="telephone" NAME="telephone" value="<?= $this->nettoyer($user_rh['telephone']) ?>" AUTOCOMPLETE="OFF" required></td>
<td align="center" class="required"> E-mail </td>
<td ><INPUT style='font-size:10pt;' class="form-control" TYPE="email" id="email" NAME="email" value="<?= $this->nettoyer($user_rh['email']) ?>" placeholder="E-mail" AUTOCOMPLETE="OFF" required></td>
</tr>
<tr>
<td></td>
<td>
<button type="button" class="form-control btn btn-warning" onClick="retour_a_users_rh_client();">
<?= _("Annuler") ?>
</button>
</td>
<td></td>
<td>
<button type="button" id="btn_enreg" class="form-control btn btn-primary" onClick="enregistrer_modif_user_rh();">
<?= _("Enregistrer les modifications") ?>
</button>
</td>
</tr>
</tbody>
</table>
</div>

95
Vue/Roles/index.php Normal file
View File

@ -0,0 +1,95 @@
<?php $this->titre = "INTER SANTE - Configuration des Accès"; ?>
<div id="div_liste" class="container-fluid" style="padding-top: 20px; padding-bottom: 20px;">
<div class="page-header" style="margin-top: 0; border-bottom: 2px solid #337ab7; padding-bottom: 15px;">
<div class="row">
<div class="col-xs-2 col-sm-1">
<div style="background-color: #337ab7; color: #fff; padding: 15px; border-radius: 6px; text-align: center;">
<span class="glyphicon glyphicon-lock" style="font-size: 24px;"></span>
</div>
</div>
<div class="col-xs-10 col-sm-11">
<h1 style="margin-top: 0; color: #337ab7; font-weight: bold; font-size: 24px;">
<?= _("Gestion des Menus & Droits") ?>
</h1>
<p class="text-muted"><?= _("Configurez les accès au menu principal selon le profil utilisateur RH") ?></p>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-body" style="background-color: #f9f9f9;">
<div class="row">
<div class="col-md-5">
<div class="form-group">
<label for="codeProfil" class="control-label" style="text-transform: uppercase; font-size: 11px; color: #666;">
<span class="glyphicon glyphicon-user" style="margin-right: 5px;"></span>
<?= _("Profil Utilisateur cible") ?>
</label>
<div class="input-group input-group-lg">
<select class="form-control"
id="codeProfil"
name="codeProfil"
required
onChange="javascript:afficher_menu_principal_profil_rh();"
style="font-weight: bold;">
<?php liste_options($profil, ""); ?>
</select>
<span class="input-group-addon">
<span class="glyphicon glyphicon-search"></span>
</span>
</div>
</div>
</div>
<div class="col-md-7" style="margin-top: 25px;">
<div class="alert alert-info" style="margin-bottom: 0;">
<table style="width: 100%;">
<tr>
<td style="width: 40px; vertical-align: middle;">
<span class="glyphicon glyphicon-info-sign" style="font-size: 20px;"></span>
</td>
<td>
<small><?= _("La sélection d'un profil chargera automatiquement la liste des menus disponibles pour modification.") ?></small>
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
<div id="div_menu_profil" class="well" style="min-height: 400px; background-color: #ffffff; border: 2px dashed #ccc; text-align: center; margin-top: 20px;">
<div style="margin-top: 100px; color: #999;">
<span class="glyphicon glyphicon-list-alt" style="font-size: 60px; margin-bottom: 20px;"></span>
<h3><?= _("En attente de sélection") ?></h3>
<p><?= _("Veuillez choisir un profil ci-dessus pour gérer ses accès.") ?></p>
</div>
</div>
</div>
<style>
/* Ajustements manuels car Bootstrap 3 n'a pas les utilitaires de bordure modernes */
.well {
box-shadow: none;
-webkit-box-shadow: none;
}
#div_menu_profil:not(:empty) {
border: 1px solid #ddd;
border-radius: 4px;
background-color: transparent;
}
/* Simulation du comportement "animate" en CSS simple */
.animate-fade {
animation: fadeIn 0.5s;
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
</style>

View File

@ -4,30 +4,42 @@
$nomClient = $this->nettoyer($client['nom']);
?>
<input class="sr-only" type="text" id="idClient" value="<?= $idClient ?>">
<input type="hidden" id="idClient" value="<?= $idClient ?>">
<div id="div_liste">
<h1 class="text-primary"> <?= _("Utilisateurs Portail RH") ?> </h1>
<div id="div_liste" class="container-fluid">
<h1 class="text-primary" style="margin-bottom: 20px;">
<span class="glyphicon glyphicon-user" style="margin-right: 10px;"></span>
<?= _("Utilisateurs Portail RH") ?>
</h1>
<h5 >
<span ><?= $nomClient ?></span>
</h5>
<div class="panel panel-default" style="border-radius: 0; box-shadow: 0 2px 4px rgba(0,0,0,0.1);">
<div class="panel-heading" style="background-color: #fff; padding: 15px;">
<div class="row">
<div class="col-xs-8">
<h4 class="panel-title" style="font-weight: bold; font-size: 18px;">
<span style="color: #777; font-weight: normal;"><?= $nomClient ?></span>
</h4>
</div>
<div class="col-xs-4 text-right">
<span class="label label-primary" style="padding: 5px 12px; border-radius: 10px; font-size: 12px;">
<?= count($users) ?> <?= _("comptes") ?>
</span>
</div>
</div>
</div>
<div >
<span>
<?= count($users) ?> <?= _("comptes") ?>
</span>
</div>
<div >
<div class="table-responsive">
<table class="table table-hover">
<thead class="table-light">
<table class="table table-hover table-striped table-bordered" style="font-size: 12px; vertical-align: middle;">
<thead>
<tr >
<th><?= _("Identifiant") ?></th>
<th><?= _("Nom Complet") ?></th>
<th><?= _("Langue") ?></th>
<th><?= _("Profil / Rôle") ?></th>
<th style="padding-left: 20px;" width="12%"><?= _("Identifiant") ?></th>
<th width="20%"><?= _("Nom Complet") ?></th>
<th class="text-center" width="8%"><?= _("Langue") ?></th>
<th class="text-center" width="15%"><?= _("Profil / Rôle") ?></th>
<th class="text-center" width="15%"><?= _("Statut") ?></th>
<th class="text-center" style="padding-right: 20px;" width="12%"><?= _("Actions") ?></th>
</tr>
</thead>
<tbody>
@ -37,32 +49,87 @@
$actif = (int)$user_client['actif'];
$reInit = (int)$user_client['reInit'];
$codeLangue = $user_client['codeLangue'];
// Gestion multilingue du profil
$libelleProfil = est_anglophone() ? $user_client['profilEng'] : $user_client['profil'];
?>
<tr>
<td>
<?= $this->nettoyer($codeUtilisateur) ?>
<td style="padding-left: 20px; vertical-align: middle;">
<strong style="color: #337ab7; background: #eef4f9; padding: 2px 6px; border-radius: 3px; font-family: monospace;">
<?= $this->nettoyer($codeUtilisateur) ?>
</strong>
</td>
<td>
<?= $this->nettoyer($user_client['utilisateur']) ?>
<td style="vertical-align: middle;">
<div style="font-weight: bold; color: #333;"><?= $this->nettoyer($user_client['utilisateur']) ?></div>
</td>
<td >
<?= strtoupper($codeLangue) ?>
<td class="text-center" style="vertical-align: middle;">
<span class="label label-default" style="border: 1px solid #ccc; color: #333; background: #fff;">
<?= strtoupper($codeLangue) ?>
</span>
</td>
<td>
<?= $this->nettoyer($libelleProfil) ?>
<td class="text-center" style="vertical-align: middle;">
<span class="label label-info" style="font-weight: normal;">
<span class="glyphicon glyphicon-eye-open" style="font-size: 10px; margin-right: 4px;"></span>
<?= $this->nettoyer($libelleProfil) ?>
</span>
</td>
<td class="text-center" style="vertical-align: middle;">
<?php if($actif === 1): ?>
<button class="btn btn-xs btn-success"
style="border-radius: 15px; padding: 2px 10px; font-weight: bold;"
onClick="desactiver_user_rh_client('<?= $codeUtilisateur ?>');">
<span class="glyphicon glyphicon-ok-sign"></span> <?= _("Actif") ?>
</button>
<?php else: ?>
<button class="btn btn-xs btn-danger"
style="border-radius: 15px; padding: 2px 10px; font-weight: bold;"
onClick="activer_user_rh_client('<?= $codeUtilisateur ?>');">
<span class="glyphicon glyphicon-ban-circle"></span> <?= _("Bloqué") ?>
</button>
<?php endif; ?>
</td>
<td class="text-center" style="padding-right: 20px; vertical-align: middle;">
<div class="btn-group">
<button class="btn btn-default btn-sm"
title="<?= _("Modifier") ?>"
onClick="afficher_users_client_id(<?= $idUtilisateur ?>);">
<span class="glyphicon glyphicon-pencil"></span>
</button>
<button class="btn btn-default btn-sm"
style="<?= ($reInit === 1) ? 'color: #a94442; font-weight: bold;' : '' ?>"
title="<?= _("-initialiser mot de passe") ?>"
onClick="reinitpaswd_user_rh('<?= $codeUtilisateur ?>');">
<span class="glyphicon glyphicon-lock"></span>
</button>
</div>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<div class="panel-footer" style="background-color: #fff; color: #777; font-size: 12px;">
<span class="glyphicon glyphicon-info-sign"></span>
<?= _("Les comptes bloqués ne peuvent plus se connecter au portail.") ?>
</div>
</div>
</div>
<style>
/* Correction pour l'alignement vertical Bootstrap 3 */
.table > tbody > tr > td {
vertical-align: middle !important;
}
/* Animation simple car animate.css n'était pas standard à l'époque */
.animate-fade {
animation: fadeIn 0.4s ease-in;
}
@keyframes fadeIn {
from { opacity: 0; } to { opacity: 1; }
}
</style>

View File

@ -263,7 +263,7 @@ controlerPlafondBeneficiaire : <?= $_SESSION['controlerPlafondBeneficiaire'] ?>
<script src="Js/datepicker-fr.js"></script>
<?php endif; ?>
<script src="Js/fonctions.js?ver=2026.03.09.01"></script>
<script src="Js/fonctions.js?ver=2026.03.09.20"></script>
<script src="<?= $_SESSION['dossierSociete'].'/Js/societe.js' ?>" > </script>