From 6c7d2f4be0a91a70e6c7da122bf8cfa018a5ad3d Mon Sep 17 00:00:00 2001 From: KONE SOREL Date: Tue, 17 Feb 2026 09:54:37 +0000 Subject: [PATCH] valie --- .../ControleurAjaxlisterpolicesclient.php | 24 ----------- Controleur/ControleurAjaxsessionvue.php | 18 ++++++++ Controleur/ControleurChoisirpolice.php | 24 +++++++++++ Js/fonctions.js | 41 +++++++++++++++---- .../index.php | 1 - Vue/gabarit.php | 2 +- 6 files changed, 77 insertions(+), 33 deletions(-) delete mode 100644 Controleur/ControleurAjaxlisterpolicesclient.php create mode 100644 Controleur/ControleurAjaxsessionvue.php create mode 100644 Controleur/ControleurChoisirpolice.php rename Vue/{Ajaxlisterpolicesclient => Choisirpolice}/index.php (97%) diff --git a/Controleur/ControleurAjaxlisterpolicesclient.php b/Controleur/ControleurAjaxlisterpolicesclient.php deleted file mode 100644 index 13d9403..0000000 --- a/Controleur/ControleurAjaxlisterpolicesclient.php +++ /dev/null @@ -1,24 +0,0 @@ -police = new Police(); - } - - public function index() - { - $_SESSION['idPolice_C'] = ''; - $_SESSION['numeroPolice_C'] = ''; - $_SESSION['idPoliceAjax'] = ''; - - $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/Controleur/ControleurAjaxsessionvue.php b/Controleur/ControleurAjaxsessionvue.php new file mode 100644 index 0000000..746cc82 --- /dev/null +++ b/Controleur/ControleurAjaxsessionvue.php @@ -0,0 +1,18 @@ +police = new Police(); + } + + public function index() + { + $vue = $this->requete->getParametreFormulaire("vue"); + $_SESSION['vueActive'] = $vue; + } +} \ No newline at end of file diff --git a/Controleur/ControleurChoisirpolice.php b/Controleur/ControleurChoisirpolice.php new file mode 100644 index 0000000..91ab93e --- /dev/null +++ b/Controleur/ControleurChoisirpolice.php @@ -0,0 +1,24 @@ +menuvue = new Menuvueutilisateur(); + $this->menuvue->getMenuVue("Choisirpolice"); + + $this->police = new Police(); + } + + public function index() + { + $vue = $_SESSION["vueActive"]; + $polices = $this->police->getPoliceRh(); + + $this->genererVue(array('vue' => $vue, 'polices' => $polices)); + } +} \ No newline at end of file diff --git a/Js/fonctions.js b/Js/fonctions.js index 5a5d64e..d2610f1 100755 --- a/Js/fonctions.js +++ b/Js/fonctions.js @@ -4535,6 +4535,7 @@ function consulterfactureged_pop() }); } + function lister_polices_client(id) { const vues = { 1: "Rechercherassure", @@ -4542,17 +4543,37 @@ function lister_polices_client(id) { 3: "Sppolice" }; - $("#numeroPolice_C").val(''); - vue = vues[id] || null; // null si id ne correspond à rien + + if(vue != null){ + $.ajax({ + url: racine + "Ajaxsessionvue/", + type: 'POST', + data: { vue: vue }, + success: function (data) { + + + }, + error: function (xhr, status, error) { + + }, + complete: function() + { + window.location.assign($("#racineWeb" ).val()+"Choisirpolice/"); + } + }); + } - const modalEl = document.getElementById('pop_police'); + //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) { + + /* + if (modalEl.parentElement !== document.body) { document.body.appendChild(modalEl); } + */ const racine = $("#racineWeb").val() || "/"; const divPolice = document.getElementById('div_police'); @@ -4560,21 +4581,26 @@ function lister_polices_client(id) { /* =================================================== * Préparation visuelle (Spinner) * =================================================== */ - showLoader("#div_police", { size: 3 }); + + //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/", @@ -4593,13 +4619,14 @@ function lister_polices_client(id) { } }); }); - + */ /* =================================================== * 6. Affichage final * =================================================== */ - modal.show(); + // modal.show(); } + function ajax_contexter_police(){ idPolice = $("#idPolice").val(); diff --git a/Vue/Ajaxlisterpolicesclient/index.php b/Vue/Choisirpolice/index.php similarity index 97% rename from Vue/Ajaxlisterpolicesclient/index.php rename to Vue/Choisirpolice/index.php index f6884b1..e962a5e 100644 --- a/Vue/Ajaxlisterpolicesclient/index.php +++ b/Vue/Choisirpolice/index.php @@ -1,4 +1,3 @@ -
diff --git a/Vue/gabarit.php b/Vue/gabarit.php index f4c3713..017ce75 100755 --- a/Vue/gabarit.php +++ b/Vue/gabarit.php @@ -687,7 +687,7 @@ $photoAssureCrypte = $_SESSION['photoAssureCrypte']; - +