diff --git a/Js/fonctions.js b/Js/fonctions.js
index 39e371d6..0ad462b5 100755
--- a/Js/fonctions.js
+++ b/Js/fonctions.js
@@ -44988,4 +44988,128 @@ function afficher_menu_principal_profil_rh()
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();
+ }
+ });
}
\ No newline at end of file
diff --git a/Modele/Utilisateur.php b/Modele/Utilisateur.php
index 78ee2bed..e5026b4a 100644
--- a/Modele/Utilisateur.php
+++ b/Modele/Utilisateur.php
@@ -291,15 +291,7 @@ class Utilisateur extends Modele {
}
- 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 getMenusNonAccessiblesProfil($codeProfil)
{
@@ -311,16 +303,6 @@ class Utilisateur extends Modele {
}
- 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 ajouterunmenuprincipalprofilassureur($codeProfil, $codeMenu)
{
$codeSociete = $_SESSION['codeSociete'];
@@ -696,4 +678,64 @@ class Utilisateur extends Modele {
$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));
+ }
}
\ No newline at end of file
diff --git a/Vue/gabarit.php b/Vue/gabarit.php
index d8b48f6e..1b8d50d3 100644
--- a/Vue/gabarit.php
+++ b/Vue/gabarit.php
@@ -263,7 +263,7 @@ controlerPlafondBeneficiaire : = $_SESSION['controlerPlafondBeneficiaire'] ?>
-
+