diff --git a/Controleur/ControleurAjaxlisterpolicesclient.php b/Controleur/ControleurAjaxlisterpolicesclient.php new file mode 100644 index 0000000..f39af48 --- /dev/null +++ b/Controleur/ControleurAjaxlisterpolicesclient.php @@ -0,0 +1,20 @@ +police = new Police(); + } + + public function index() + { + $vue = $this->requete->getParametreFormulaire("vue"); + $polices = $this->police->getPoliceRh(); + + $this->genererVueAjax(array('vue' => $vue, 'polices' => $polices)); + } +} \ No newline at end of file diff --git a/Js/fonctions.js b/Js/fonctions.js index fa4af42..31b1231 100755 --- a/Js/fonctions.js +++ b/Js/fonctions.js @@ -4129,4 +4129,89 @@ function consulterfactureged_pop() complete: function() { } }); +} + +function lister_polices_client(id) { + const vues = { + 1: "Rechercherassure", + 2: "Syntheseconsopolice", + 3: "Sppolice" + }; + + vue = vues[id] || null; // null si id ne correspond à rien + + const modalEl = document.getElementById('pop_police'); + + // On déplace le modal directement sous s'il n'y est pas déjà. + // Cela permet de passer outre les z-index des conteneurs parents (Sidebar, Header). + if (modalEl.parentElement !== document.body) { + document.body.appendChild(modalEl); + } + + const racine = $("#racineWeb").val() || "/"; + const divPolice = document.getElementById('div_police'); + + /* =================================================== + * Préparation visuelle (Spinner) + * =================================================== */ + showLoader("#div_police", { size: 3 }); + + + /* =================================================== + * Initialisation de l'instance Bootstrap + * =================================================== */ + const modal = bootstrap.Modal.getOrCreateInstance(modalEl, { + backdrop: 'static', + keyboard: false + }); + + /* =================================================== + * Gestion de l'événement d'affichage et AJAX + * =================================================== */ + // On utilise 'shown.bs.modal' pour lancer l'AJAX une fois le modal visible + $(modalEl).one('shown.bs.modal', function () { + $.ajax({ + url: racine + "Ajaxlisterpolicesclient/", + type: 'POST', + data: { vue: vue }, + success: function (data) { + divPolice.innerHTML = data; + }, + error: function (xhr, status, error) { + divPolice.innerHTML = ` +
+ Erreur : Impossible de générer la liste des polices. + ${error} +
+ `; + } + }); + }); + + /* =================================================== + * 6. Affichage final + * =================================================== */ + modal.show(); +} + +function ajax_contexter_police(){ + idPolice = $("#idPolice").val(); + + donnees = 'idPolice='+idPolice; + $.ajax({ + url: $("#racineWeb").val()+"Ajaxcontextpolice/", + type : 'post', + data: donnees, + error: function(errorData) { + }, + complete: function() { + + } + }); + +} + +function ouvrir_vue(vue) +{ + window.location.assign($("#racineWeb" ).val()+vue+"/"); } \ No newline at end of file diff --git a/Vue/Ajaxlisterpolicesclient/index.php b/Vue/Ajaxlisterpolicesclient/index.php new file mode 100644 index 0000000..f6884b1 --- /dev/null +++ b/Vue/Ajaxlisterpolicesclient/index.php @@ -0,0 +1,63 @@ + +
+
+
+ +
+ + + + +
+
+ +
+ +
+
+
+ + + + \ No newline at end of file diff --git a/Vue/Mouvementassureclient/index.php b/Vue/Mouvementassureclient/index.php index 67dde7c..198d44c 100644 --- a/Vue/Mouvementassureclient/index.php +++ b/Vue/Mouvementassureclient/index.php @@ -11,12 +11,11 @@
-
-
diff --git a/Vue/gabarit.php b/Vue/gabarit.php index 91d0e7e..10a8b16 100755 --- a/Vue/gabarit.php +++ b/Vue/gabarit.php @@ -594,6 +594,29 @@ $photoAssureCrypte = $_SESSION['photoAssureCrypte'];
+ + + +
@@ -639,7 +662,7 @@ $photoAssureCrypte = $_SESSION['photoAssureCrypte']; - +