Merge branch 'main' of git.ebene.ovh:ebene/radiantrh
This commit is contained in:
commit
b5eed88c88
28
Controleur/ControleurAccessubmenus.php
Executable file
28
Controleur/ControleurAccessubmenus.php
Executable 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->getListeProfilCode();
|
||||
$menus = array();
|
||||
|
||||
$this->genererVue(array(
|
||||
'profil' => $profil,
|
||||
'menus' => $menus
|
||||
));
|
||||
}
|
||||
}
|
||||
21
Controleur/ControleurAjaxchangerlangue.php
Executable file
21
Controleur/ControleurAjaxchangerlangue.php
Executable file
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
require_once 'Framework/Controleur.php';
|
||||
require_once 'Modele/Utilisateur.php';
|
||||
|
||||
class ControleurAjaxchangerlangue extends Controleur {
|
||||
private $utilisateur;
|
||||
|
||||
public function __construct() {
|
||||
$this->utilisateur = new Utilisateur();
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
}
|
||||
|
||||
public function changerlangue()
|
||||
{
|
||||
$this->utilisateur->changerlangueutilisateur();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -57,94 +57,52 @@ class ControleurAjaxhabilitation extends Controleur
|
|||
}
|
||||
|
||||
|
||||
public function afficheraccessousmenusass()
|
||||
public function afficheraccessousmenus()
|
||||
{
|
||||
$codeProfil = $this->requete->getParametreFormulaire("codeProfil");
|
||||
$codeModule = $this->requete->getParametreFormulaire("codeModule");
|
||||
$vue = $this->requete->getParametreFormulaire("vue");
|
||||
$codeVue = $this->requete->getParametreFormulaire("codeVue");
|
||||
|
||||
$menus_accessibles = $this->utilisateur->getSousMenusAccessiblesVue($codeProfil, $vue);
|
||||
$menus_non_accessibles = $this->utilisateur->getSousMenusNonAccessiblesVue($codeProfil,$vue);
|
||||
$menus_accessibles = $this->utilisateur->getSousMenusAccessiblesVue($codeProfil, $codeVue);
|
||||
$menus_non_accessibles = $this->utilisateur->getSousMenusNonAccessiblesVue($codeProfil,$codeVue);
|
||||
|
||||
$this->genererVueAjax(array('menus_accessibles' => $menus_accessibles, 'menus_non_accessibles' => $menus_non_accessibles,
|
||||
'codeModule' => $codeModule));
|
||||
$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 ajoutertoussousmenusass()
|
||||
public function retirertoussousmenusrh()
|
||||
{
|
||||
$codeProfil = $this->requete->getParametreFormulaire("codeProfil");
|
||||
$vue = $this->requete->getParametreFormulaire("vue");
|
||||
$codeVue = $this->requete->getParametreFormulaire("codeVue");
|
||||
|
||||
$this->utilisateur->ajoutertoussousmenusass($codeProfil, $vue);
|
||||
}
|
||||
|
||||
public function retirertoussousmenusass()
|
||||
{
|
||||
$codeProfil = $this->requete->getParametreFormulaire("codeProfil");
|
||||
$vue = $this->requete->getParametreFormulaire("vue");
|
||||
|
||||
$this->utilisateur->retirertoussousmenusass($codeProfil, $vue);
|
||||
$this->utilisateur->retirertoussousmenusrh($codeProfil, $codeVue);
|
||||
}
|
||||
|
||||
public function ajouterunsousmenusass()
|
||||
public function ajouterunsousmenurh()
|
||||
{
|
||||
$codeProfil = $this->requete->getParametreFormulaire("codeProfil");
|
||||
$vue = $this->requete->getParametreFormulaire("vue");
|
||||
$codeVue = $this->requete->getParametreFormulaire("codeVue");
|
||||
$codeMenu = $this->requete->getParametreFormulaire("codeMenu");
|
||||
|
||||
$this->utilisateur->ajouterunsousmenusass($codeProfil, $vue, $codeMenu);
|
||||
$this->utilisateur->ajouterunsousmenurh($codeProfil, $codeVue, $codeMenu);
|
||||
}
|
||||
|
||||
public function retirerunsousmenusass()
|
||||
public function retirerunsousmenurh()
|
||||
{
|
||||
$codeProfil = $this->requete->getParametreFormulaire("codeProfil");
|
||||
$vue = $this->requete->getParametreFormulaire("vue");
|
||||
$codeVue = $this->requete->getParametreFormulaire("codeVue");
|
||||
$codeMenu = $this->requete->getParametreFormulaire("codeMenu");
|
||||
|
||||
$this->utilisateur->retirerunsousmenusass($codeProfil, $vue, $codeMenu);
|
||||
}
|
||||
|
||||
public function creerprofilass()
|
||||
{
|
||||
$libelle = $this->requete->getParametreFormulaire("libelle");
|
||||
$libelleEng = $this->requete->getParametreFormulaire("libelleEng");
|
||||
|
||||
$this->utilisateur->creerprofilass($libelle, $libelleEng);
|
||||
}
|
||||
|
||||
public function transfererdroitsprofilassureur()
|
||||
{
|
||||
$codeProfilSource = $this->requete->getParametreFormulaire("codeProfilSource");
|
||||
$codeProfilDest = $this->requete->getParametreFormulaire("codeProfilDest");
|
||||
|
||||
$this->utilisateur->transfererdroitsprofilassureur($codeProfilSource, $codeProfilDest);
|
||||
|
||||
// $this->genererVueAjax();
|
||||
}
|
||||
|
||||
public function batchviderprofilass()
|
||||
{
|
||||
$codeProfil = $this->requete->getParametreFormulaire("codeProfil");
|
||||
|
||||
$this->utilisateur->batchviderprofilass($codeProfil);
|
||||
}
|
||||
|
||||
public function batchattribuerdroitsreferenceass()
|
||||
{
|
||||
$codeProfil = $this->requete->getParametreFormulaire("codeProfil");
|
||||
|
||||
$this->utilisateur->batchattribuerdroitsreferenceass($codeProfil);
|
||||
}
|
||||
|
||||
public function ajaxlisteusersass()
|
||||
{
|
||||
$codeProfil = $this->requete->getParametreFormulaire("codeProfil");
|
||||
$nom = $this->requete->getParametreFormulaire("nom");
|
||||
$prenoms = $this->requete->getParametreFormulaire("prenoms");
|
||||
$codePointVente = $this->requete->getParametreFormulaire("codePointVente");
|
||||
|
||||
$users = $this->utilisateur->getusersassueurfiltre($codeProfil, $nom, $prenoms, $codePointVente);
|
||||
|
||||
$this->genererVueAjax(array('users' => $users));
|
||||
$this->utilisateur->retirerunsousmenurh($codeProfil, $codeVue, $codeMenu);
|
||||
}
|
||||
}
|
||||
22
Controleur/ControleurAjaxmenusprofil.php
Executable file
22
Controleur/ControleurAjaxmenusprofil.php
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
require_once 'Framework/Controleur.php';
|
||||
require_once 'Modele/Utilisateur.php';
|
||||
|
||||
class ControleurAjaxmenusprofil extends Controleur
|
||||
{
|
||||
private $utilisateur;
|
||||
|
||||
public function __construct() {
|
||||
$this->utilisateur = new Utilisateur();
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
$codeProfil = $this->requete->getParametreFormulaire("codeProfil");
|
||||
$menus = $this->utilisateur->getListeProfil($codeProfil);
|
||||
|
||||
$this->genererVueAjax(array(
|
||||
'menus' => $menus
|
||||
));
|
||||
}
|
||||
}
|
||||
302
Js/fonctions.js
302
Js/fonctions.js
|
|
@ -4928,3 +4928,305 @@ function retirer_un_menu_principal_profil_rh(codeMenu)
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
function changer_langue()
|
||||
{
|
||||
codeLangue = $("#codeLangue").val();
|
||||
|
||||
v_msg="Attention, vous serez déconnecté! Confirmez-vous le changement de langue?";
|
||||
v_msgEng="Attention, you will be logged out! Do you confirm the language change?";
|
||||
|
||||
|
||||
confirm_ebene(v_msg, v_msgEng)
|
||||
.then((isConfirmed) => {
|
||||
if (isConfirmed) {
|
||||
// L'utilisateur a confirmé
|
||||
$.ajax({
|
||||
url: $("#racineWeb").val()+"Ajaxchangerlangue/changerlangue/",
|
||||
type : 'post',
|
||||
// data: donnees,
|
||||
error: function(errorData)
|
||||
{
|
||||
},
|
||||
success: function(data)
|
||||
{
|
||||
// $("#div_test_gabarit").html(data);
|
||||
},
|
||||
complete: function()
|
||||
{
|
||||
window.location.assign($("#racineWeb" ).val()+"Connexion/deconnecter/");
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// L'utilisateur a annulé
|
||||
console.log("Confirmation refusée");
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
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()+"Ajaxmenusprofil/",
|
||||
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();
|
||||
$('#div_menu_profil').html(data);
|
||||
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)
|
||||
{
|
||||
debugger;
|
||||
|
||||
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();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -203,4 +203,111 @@ class Utilisateur extends Modele {
|
|||
|
||||
$this->executerRequete($sql, array($codeSociete, $codeProfil, $codeMenu, $user));
|
||||
}
|
||||
|
||||
public function getListeVueModule($codeModule)
|
||||
{
|
||||
if (est_anglophone())
|
||||
{
|
||||
$sql = 'call sp_c_get_vues_module_rh_eng(?);';
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = 'call sp_c_get_vues_module_rh(?);';
|
||||
}
|
||||
|
||||
$liste = $this->executerRequete($sql, array($codeModule));
|
||||
return $liste->fetchAll(PDO::FETCH_ASSOC);
|
||||
}
|
||||
|
||||
public function getListeModule()
|
||||
{
|
||||
if (est_anglophone())
|
||||
{
|
||||
$sql = 'SELECT vue AS `code`, libelleEng AS libelle FROM c_menu WHERE enVigueur = "1" ORDER BY ordre;';
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = 'SELECT vue AS `code`, libeleMenu AS libelle FROM c_menu WHERE enVigueur = "1" ORDER BY ordre;';
|
||||
}
|
||||
|
||||
$liste = $this->executerRequete($sql);
|
||||
|
||||
return $liste->fetchAll(PDO::FETCH_ASSOC);
|
||||
}
|
||||
|
||||
public function getListeProfil($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 getSousMenusAccessiblesVue($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 getSousMenusNonAccessiblesVue($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 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));
|
||||
}
|
||||
}
|
||||
95
Vue/Accessubmenus/index.php
Executable file
95
Vue/Accessubmenus/index.php
Executable file
|
|
@ -0,0 +1,95 @@
|
|||
<?php $this->titre = "INTER SANTE - Accès Sous-Menus"; ?>
|
||||
|
||||
<div id="div_liste" class="container-fluid py-4 animate__animated animate__fadeIn">
|
||||
|
||||
<div class="d-flex align-items-center mb-4">
|
||||
<div class="bg-primary text-white p-3 rounded-3 shadow-sm me-3">
|
||||
<i class="fas fa-list-ul fa-2x"></i>
|
||||
</div>
|
||||
<div>
|
||||
<h1 class="mb-0 fw-bold text-primary"><?= _("Gestion des Sous-Menus") ?></h1>
|
||||
<p class="text-muted small mb-0"><?= _("Définissez quels boutons et actions sont visibles pour chaque profil") ?></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card shadow-sm border-0 mb-4">
|
||||
<div class="card-body p-4 bg-light rounded-3 border">
|
||||
<div class="row g-3 align-items-end">
|
||||
|
||||
<div class="col-md-4">
|
||||
<label for="codeProfil" class="form-label small fw-bold text-uppercase">
|
||||
<i class="fas fa-user-tag me-1"></i> <?= _("Profil") ?>
|
||||
</label>
|
||||
<select class="form-select shadow-xs border-info-subtle" id="codeProfil" name="codeProfil" onChange="ajax_menus_profil();">
|
||||
<?php liste_options($profil, ""); ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-md-5">
|
||||
<label for="vue" class="form-label small fw-bold text-uppercase">
|
||||
<i class="fas fa-folder-open me-1"></i> <?= _("Menu Principal") ?>
|
||||
</label>
|
||||
<div id="div_menu">
|
||||
<select class="form-select shadow-xs" id="codeVue" name="codeVue">
|
||||
<?php liste_options($menus, ""); ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<button type="button" class="btn btn-primary w-100 fw-bold shadow-sm d-flex align-items-center justify-content-center"
|
||||
onclick="afficher_menu_vue_profil();" style="height: 38px;">
|
||||
<i class="fas fa-sync-alt me-2"></i> <?= _("Actualiser la vue") ?>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="div_menu_profil" class="min-vh-50 rounded-4 border-dashed d-flex align-items-center justify-content-center bg-white">
|
||||
<div class="text-center py-5">
|
||||
<div class="mb-3">
|
||||
<i class="fas fa-mouse-pointer fa-3x text-muted opacity-25"></i>
|
||||
</div>
|
||||
<h5 class="text-muted fw-light"><?= _("Sélectionnez un profil et un menu pour gérer les boutons") ?></h5>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<style>
|
||||
/* Styles spécifiques pour cette interface */
|
||||
.shadow-xs { box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
|
||||
|
||||
.border-dashed {
|
||||
border: 2px dashed #e9ecef !important;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.form-select {
|
||||
border-radius: 8px;
|
||||
font-size: 10pt;
|
||||
}
|
||||
|
||||
.form-select:focus {
|
||||
border-color: #0dcaf0;
|
||||
box-shadow: 0 0 0 0.25rem rgba(13, 202, 240, 0.1);
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
border-radius: 8px;
|
||||
transition: transform 0.1s ease;
|
||||
}
|
||||
|
||||
.btn-primary:active {
|
||||
transform: scale(0.98);
|
||||
}
|
||||
|
||||
/* Ajustement de la zone de contenu quand elle est remplie */
|
||||
#div_menu_profil:not(:has(.text-center)) {
|
||||
border: none !important;
|
||||
background: transparent;
|
||||
display: block !important;
|
||||
}
|
||||
</style>
|
||||
118
Vue/Ajaxhabilitation/afficheraccessousmenus.php
Executable file
118
Vue/Ajaxhabilitation/afficheraccessousmenus.php
Executable file
|
|
@ -0,0 +1,118 @@
|
|||
<div id="div_menu_profil" class="animate__animated animate__fadeIn">
|
||||
<div class="row g-4">
|
||||
|
||||
<div id="div_utilisateur_profil_1" class="col-md-6">
|
||||
<div class="card h-100 shadow-sm border-0 bg-white">
|
||||
<div class="card-header bg-light border-bottom-0 py-3 d-flex justify-content-between align-items-center">
|
||||
<h6 class="mb-0 fw-bold text-secondary">
|
||||
<i class="fas fa-eye-slash me-2"></i><?= _("Sous-menus non accessibles") ?>
|
||||
</h6>
|
||||
<span class="badge bg-secondary rounded-pill"><?= format_N(count($menus_non_accessibles)) ?></span>
|
||||
</div>
|
||||
|
||||
<div class="px-3 pb-2">
|
||||
<button type="button" class="btn btn-sm btn-info text-white w-100 fw-bold shadow-xs transition-btn"
|
||||
onclick="javascript:ajouter_tous_menu_vue_profil();">
|
||||
<?= _("Tout ajouter") ?> <i class="fas fa-chevron-right ms-1"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive" style="max-height: 450px;">
|
||||
<table class="table table-hover align-middle mb-0">
|
||||
<tbody class="border-top-0">
|
||||
<?php foreach ($menus_non_accessibles as $m):
|
||||
$codeMenu = $m['codeMenu'];
|
||||
$libeleMenu = est_anglophone() ? $m['libelleEng'] : $m['libeleMenu'];
|
||||
?>
|
||||
<tr>
|
||||
<td class="ps-3 text-muted"><?= $libeleMenu ?></td>
|
||||
<td class="text-end pe-3" width="60">
|
||||
<button class="btn btn-sm btn-outline-info rounded-circle btn-action"
|
||||
title="<?= _("Ajouter") ?>"
|
||||
onClick="javascript:ajouter_un_menu_vue_profil('<?=$codeMenu?>');">
|
||||
<i class="fas fa-plus"></i>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="div_utilisateur_profil_2" class="col-md-6">
|
||||
<div class="card h-100 shadow-sm border-0 bg-white">
|
||||
<div class="card-header bg-info bg-opacity-10 border-bottom-0 py-3 d-flex justify-content-between align-items-center">
|
||||
<h6 class="mb-0 fw-bold text-info">
|
||||
<i class="fas fa-eye me-2"></i><?= _("Sous-menus accessibles") ?>
|
||||
</h6>
|
||||
<span class="badge bg-info rounded-pill"><?= format_N(count($menus_accessibles)) ?></span>
|
||||
</div>
|
||||
|
||||
<div class="px-3 pb-2">
|
||||
<button type="button" class="btn btn-sm btn-outline-secondary w-100 fw-bold shadow-xs transition-btn"
|
||||
onclick="javascript:retirer_tous_menu_vue_profil();">
|
||||
<i class="fas fa-chevron-left me-1"></i> <?= _("Tout retirer") ?>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive" style="max-height: 450px;">
|
||||
<table class="table table-hover align-middle mb-0">
|
||||
<tbody class="border-top-0">
|
||||
<?php foreach ($menus_accessibles as $m):
|
||||
$codeMenu = $m['codeMenu'];
|
||||
$libeleMenu = est_anglophone() ? $m['libelleEng'] : $m['libeleMenu'];
|
||||
?>
|
||||
<tr>
|
||||
<td class="ps-3" width="60">
|
||||
<button class="btn btn-sm btn-outline-secondary rounded-circle btn-action"
|
||||
title="<?= _("Retirer") ?>"
|
||||
onClick="javascript:retirer_un_menu_vue_profil('<?=$codeMenu?>');">
|
||||
<i class="fas fa-minus"></i>
|
||||
</button>
|
||||
</td>
|
||||
<td class="text-start fw-bold text-dark"><?= $libeleMenu ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
/* Design des boutons d'action circulaires */
|
||||
.btn-action {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
padding: 0;
|
||||
line-height: 32px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
.btn-action:hover {
|
||||
transform: scale(1.15);
|
||||
background-color: var(--bs-info);
|
||||
color: white;
|
||||
border-color: var(--bs-info);
|
||||
}
|
||||
|
||||
/* Animation au survol des lignes */
|
||||
.table-hover tbody tr:hover td {
|
||||
background-color: rgba(13, 202, 240, 0.03);
|
||||
}
|
||||
|
||||
/* Utilitaires */
|
||||
.shadow-xs { box-shadow: 0 1px 2px rgba(0,0,0,0.075); }
|
||||
.transition-btn:active { transform: translateY(1px); }
|
||||
|
||||
/* Scrollbar discrète */
|
||||
.table-responsive::-webkit-scrollbar { width: 5px; }
|
||||
.table-responsive::-webkit-scrollbar-thumb { background: #e0e0e0; border-radius: 10px; }
|
||||
</style>
|
||||
|
|
@ -1,80 +0,0 @@
|
|||
<div id="div_menu_profil">
|
||||
|
||||
<div class="row">
|
||||
<div id="div_utilisateur_profil_1" class="col-6" >
|
||||
|
||||
<legend> <?= _("Boutons invisibles")." (".format_N(count($menus_non_accessibles)).")" ?> </legend>
|
||||
|
||||
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:10pt;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style='text-align:center'> <?= _("Désignation")?> </th>
|
||||
<th style='text-align:center'> => </th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th colspan="2"> <button type="button" style="font-size:10pt;" class="form-control btn btn-primary" onclick="javascript:ajouter_tous_menu_vue_module_assureur();" > <?= _("Ajouter tous") . " ==>" ?> </button> </th>
|
||||
</tr>
|
||||
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<?php foreach ($menus_non_accessibles as $menus_non_accessible):
|
||||
$codeMenu = $menus_non_accessible['codeMenu'];
|
||||
if (est_anglophone())
|
||||
{
|
||||
$libeleMenu = $menus_non_accessible['libelleEng'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$libeleMenu = $menus_non_accessible['libeleMenu'];
|
||||
}
|
||||
?>
|
||||
<tr valign="top">
|
||||
<td align='center'><?= $libeleMenu ?></td>
|
||||
<td align='center'> <input type="button" value="=>" onClick="javascript:ajouter_un_menu_vue_module_assureur('<?=$codeMenu?>');" ></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="div_utilisateur_profil_2" class="col-6" >
|
||||
|
||||
<legend> <?= _("Boutons visibles")." (".format_N(count($menus_accessibles)).")" ?> </legend>
|
||||
|
||||
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:10pt;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style='text-align:center'> <= </th>
|
||||
<th style='text-align:center'> <?= _("Désignation")?> </th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th colspan="2"> <button type="button" style="font-size:10pt;" class="form-control btn btn-primary" onclick="javascript:retirer_tous_menu_vue_module_assureur();" > <?= "<== " . _("Retirer tous") ?> </button> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<?php foreach ($menus_accessibles as $menus_accessible):
|
||||
$codeMenu = $menus_accessible['codeMenu'];
|
||||
if (est_anglophone())
|
||||
{
|
||||
$libeleMenu = $menus_accessible['libelleEng'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$libeleMenu = $menus_accessible['libeleMenu'];
|
||||
}
|
||||
?>
|
||||
<tr valign="top">
|
||||
<td align='center'> <input type="button" value="<=" onClick="javascript:retirer_un_menu_vue_module_assureur('<?=$codeMenu?>');" ></td>
|
||||
<td align='center'><?= $libeleMenu ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
3
Vue/Ajaxmenusprofil/index.php
Normal file
3
Vue/Ajaxmenusprofil/index.php
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<SELECT style="font-size:10pt;" class="form-select" id="codeVue" NAME="codeVue">
|
||||
<?php liste_options($menus,""); ?>
|
||||
</SELECT>
|
||||
|
|
@ -14,8 +14,8 @@
|
|||
<div class="card shadow-sm border-0 mb-4">
|
||||
<div class="card-body bg-light p-4 rounded-3 border">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-md-4">
|
||||
<label for="codeProfil" class="form-label small fw-bold text-uppercase text-primary mb-2">
|
||||
<div class="col-md-5">
|
||||
<label for="codeProfil" class="form-label small fw-bold text-uppercase mb-2">
|
||||
<i class="fas fa-user-tag me-2"></i><?= _("Profil Utilisateur cible") ?>
|
||||
</label>
|
||||
<div class="input-group input-group-lg shadow-sm">
|
||||
|
|
@ -30,7 +30,7 @@
|
|||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-8 pt-4">
|
||||
<div class="col-md-7 pt-4">
|
||||
<div class="alert alert-info border-0 shadow-xs mb-0 py-2 px-3 d-flex align-items-center">
|
||||
<i class="fas fa-info-circle me-3 fa-lg"></i>
|
||||
<span class="small">
|
||||
|
|
|
|||
|
|
@ -249,7 +249,7 @@ $photoAssureCrypte = $_SESSION['photoAssureCrypte'];
|
|||
</div>
|
||||
|
||||
<!-- Language Selector -->
|
||||
<div class="language-selector" onclick="appLanguage().changeLanguage()"
|
||||
<div class="language-selector" onclick="javascript:changer_langue();"
|
||||
role="button" tabindex="0"
|
||||
aria-label="<?= _('Changer de langue') ?>">
|
||||
<?php
|
||||
|
|
@ -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.15.05"></script>
|
||||
<script src="/Js/fonctions.js?ver=2026.01.16.12"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
raffraichier_gabarit();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user