From 5714bca00ea9065c979cb1441c19f0cca06d1c8f Mon Sep 17 00:00:00 2001 From: KONE SOREL Date: Tue, 31 Mar 2026 11:21:27 +0000 Subject: [PATCH] qse --- Js/fonctions.js | 190 +++++++++++++++--------------------------------- Vue/gabarit.php | 2 +- 2 files changed, 61 insertions(+), 131 deletions(-) diff --git a/Js/fonctions.js b/Js/fonctions.js index eeb20ee1..ac2ec900 100755 --- a/Js/fonctions.js +++ b/Js/fonctions.js @@ -44757,43 +44757,29 @@ function desactiver_user_rh_client(codeUtilisateur) v_msg="Confirmez-vous la désactivation?"; v_msgEng="Do you confirm the deactivation?"; - confirm_ebene(v_msg, v_msgEng) - .then((isConfirmed) => { - if (isConfirmed) { - // L'utilisateur a confirmé - donnees = "codeUtilisateur="+codeUtilisateur; + 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"; + $.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).then(() => { - // Ce code ne s’exécute qu’après clic sur OK - users_rh_client(); - }); - } - }); - return; - } else { - // L'utilisateur a annulé - v_msg="Opération annulée!"; - v_msgEng="Operation canceled!"; + alert_ebene(v_msg, v_msgEng); + + users_rh_client(); + } + }); + } - alert_ebene(v_msg, v_msgEng).then(() => { - // Ce code ne s’exécute qu’après clic sur OK - return; - }); - } - }); - } function activer_user_rh_client(codeUtilisateur) @@ -44801,43 +44787,28 @@ function activer_user_rh_client(codeUtilisateur) v_msg="Confirmez-vous l\'activation?"; v_msgEng="Do you confirm the activation?"; - confirm_ebene(v_msg, v_msgEng) - .then((isConfirmed) => { - if (isConfirmed) { - // L'utilisateur a confirmé - donnees = "codeUtilisateur="+codeUtilisateur; + 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"; + $.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).then(() => { - // Ce code ne s’exécute qu’après clic sur OK - users_rh_client(); - }); - } - }); - return; - } else { - // L'utilisateur a annulé - v_msg="Opération annulée!"; - v_msgEng="Operation canceled!"; + alert_ebene(v_msg, v_msgEng); - alert_ebene(v_msg, v_msgEng).then(() => { - // Ce code ne s’exécute qu’après clic sur OK - return; - }); - } - }); - + users_rh_client(); + } + }); + } } function afficher_users_client_id(idUtilisateur) @@ -44865,48 +44836,23 @@ function enregistrer_modif_user_rh() codeProfil = $("#codeProfil").val(); - if (nom<=" ") { v_msg="Veuillez saisir le nom!"; v_msgEng="Please enter the name!"; - alert_ebene(v_msg, v_msgEng).then(() => { - // Ce code ne s’exécute qu’après clic sur OK - - return; - }); - - + alert_ebene(v_msg, v_msgEng); $("#nom").focus(); return; } - if (actif<=" ") - { - v_msg="Utilisateur actif oui ou non?"; - v_msgEng="Is the user active yes or no?"; - - alert_ebene(v_msg, v_msgEng).then(() => { - // Ce code ne s’exécute qu’après clic sur OK - - return; - }); - - $("#actif").focus(); - return; - } - + if(codeLangue<=" ") { v_msg="Veuillez indiquer la langue!"; v_msgEng="Please select the language"; - alert_ebene(v_msg, v_msgEng).then(() => { - // Ce code ne s’exécute qu’après clic sur OK - - return; - }); + alert_ebene(v_msg, v_msgEng); $("#codeLangueUser").focus(); return; @@ -44918,11 +44864,7 @@ function enregistrer_modif_user_rh() v_msg="Le profil utilisateur est obligatoire!"; v_msgEng="The user profile is required!"; - alert_ebene(v_msg, v_msgEng).then(() => { - // Ce code ne s’exécute qu’après clic sur OK - - return; - }); + alert_ebene(v_msg, v_msgEng); $("#codeProfil").focus(); return; @@ -44934,11 +44876,7 @@ function enregistrer_modif_user_rh() v_msg="Veuillez revoir l'adresse mail!"; v_msgEng="Please review the email address!"; - alert_ebene(v_msg, v_msgEng).then(() => { - // Ce code ne s’exécute qu’après clic sur OK - - return; - }); + alert_ebene(v_msg, v_msgEng); $("#email").focus(); return; @@ -44957,28 +44895,20 @@ function enregistrer_modif_user_rh() v_msg="Confirmez-vous ces modifications?"; v_msgEng="Do you confirm these modifications?"; - - confirm_ebene(v_msg, v_msgEng) - .then((isConfirmed) => { - if (isConfirmed) { - // L'utilisateur a confirmé - $.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(); - } - }); - } else { - // L'utilisateur a annulé - console.log("Confirmation refusée"); - } - }); - + 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(); + } + }); + } } \ No newline at end of file diff --git a/Vue/gabarit.php b/Vue/gabarit.php index 607f153f..0324cb1c 100644 --- a/Vue/gabarit.php +++ b/Vue/gabarit.php @@ -263,7 +263,7 @@ controlerPlafondBeneficiaire : - +