fert
This commit is contained in:
parent
1e1d7da6cb
commit
1a668669da
339
Js/fonctions.js
339
Js/fonctions.js
|
|
@ -46878,169 +46878,225 @@ function afficher_prestataires_reseau()
|
|||
}
|
||||
|
||||
|
||||
function ajouter_tous_prestataires_reseau()
|
||||
{
|
||||
codeReseau=$("#codeReseau").val();
|
||||
function ajouter_tous_prestataires_reseau() {
|
||||
const codeReseau = $("#codeReseau").val();
|
||||
const lang = $("#codeLangue").val();
|
||||
|
||||
if (codeReseau<=" ")
|
||||
{
|
||||
v_msg="Veuillez sélectionner un réseau de soins!";
|
||||
v_msgEng="Please select a care network!";
|
||||
alert_ebene(v_msg, v_msgEng);
|
||||
// 1. Vérification de la sélection du réseau
|
||||
if (!codeReseau || codeReseau.trim() === "") {
|
||||
const v_msg = "Veuillez sélectionner un réseau de soins !";
|
||||
const v_msgEng = "Please select a care network !";
|
||||
alert_ebene(v_msg, v_msgEng);
|
||||
return;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
const donnees = { codeReseau: codeReseau };
|
||||
|
||||
donnees = 'codeReseau='+codeReseau;
|
||||
// 2. Messages de confirmation
|
||||
const c_msg = "Attention, cela va ajouter tous les prestataires disponibles à ce réseau de soins ! Confirmez-vous ?";
|
||||
const c_msgEng = "Be careful, this will add all available providers to this healthcare network! Do you confirm?";
|
||||
|
||||
v_msg="Attention, cela va ajouter tous les prestataires disponibles à ce réseau de soins! Confirmez-vous?";
|
||||
v_msgEng="Be careful, this will add all the providers available to this healthcare network! Do you confirm?";
|
||||
|
||||
|
||||
confirm_ebene(v_msg, v_msgEng)
|
||||
.then((isConfirmed) => {
|
||||
if (isConfirmed) {
|
||||
// L'utilisateur a confirmé
|
||||
$("#div_prestataires_reseau").html('<div style="padding-top:80px; text-align:center; font-size:14px; color: #0088cf; "><span><i class="fa fa-spinner fa-spin fa-5x" >' + '</span></div>');
|
||||
confirm_ebene(c_msg, c_msgEng).then((isConfirmed) => {
|
||||
if (isConfirmed) {
|
||||
// Loader Standard INTER-SANTE
|
||||
const loader = `
|
||||
<div class="d-flex justify-content-center align-items-center" style="min-height:300px; width:100%;">
|
||||
<div class="text-center">
|
||||
<div class="spinner-border text-primary" role="status" style="width: 3.5rem; height: 3.5rem;"></div>
|
||||
<div class="mt-3 text-primary fw-bold text-uppercase small animate__animated animate__pulse animate__infinite">
|
||||
${(lang === 'en_US') ? 'Adding all providers...' : 'Ajout de tous les prestataires...'}
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
$.ajax({
|
||||
url: $("#racineWeb").val()+"Ajaxprestatairesreseau/ajoutertousprestatairesreseausoins/",
|
||||
type: 'POST',
|
||||
data: donnees,
|
||||
success: function(data) {
|
||||
$('#div_prestataires_reseau').html(data);
|
||||
appliquerDataTable();
|
||||
},
|
||||
error: function(data) {
|
||||
},
|
||||
complete: function() {
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// L'utilisateur a annulé
|
||||
console.log("Confirmation refusée");
|
||||
}
|
||||
});
|
||||
|
||||
$("#div_prestataires_reseau").html(loader);
|
||||
|
||||
$.ajax({
|
||||
url: $("#racineWeb").val() + "Ajaxprestatairesreseau/ajoutertousprestatairesreseausoins/",
|
||||
type: 'POST',
|
||||
data: donnees,
|
||||
success: function(data) {
|
||||
// Injection du nouveau contenu
|
||||
$('#div_prestataires_reseau').html(data);
|
||||
|
||||
// Réactivation des composants Bootstrap-Select
|
||||
actualiserSelectPicker('.selectpicker');
|
||||
|
||||
// Application de la DataTable si nécessaire
|
||||
if (typeof appliquerDataTable === 'function') {
|
||||
appliquerDataTable();
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error("Erreur INTER-SANTE (Ajout Global):", error);
|
||||
alert_ebene("Erreur lors de l'ajout global.", "Error during global addition.");
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function ajouter_un_prestataire_reseau(codePrestataire)
|
||||
{
|
||||
codeReseau=$("#codeReseau").val();
|
||||
function ajouter_un_prestataire_reseau(codePrestataire) {
|
||||
const codeReseau = $("#codeReseau").val();
|
||||
|
||||
if (codeReseau<=" ")
|
||||
{
|
||||
v_msg="Veuillez sélectionner un réseau de soins!";
|
||||
v_msgEng="Please select a care network!";
|
||||
alert_ebene(v_msg, v_msgEng);
|
||||
// Vérification de sécurité
|
||||
if (!codeReseau || codeReseau.trim() === "") {
|
||||
const v_msg = "Veuillez sélectionner un réseau de soins !";
|
||||
const v_msgEng = "Please select a care network !";
|
||||
alert_ebene(v_msg, v_msgEng);
|
||||
return;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
const donnees = {
|
||||
codeReseau: codeReseau,
|
||||
codePrestataire: codePrestataire
|
||||
};
|
||||
|
||||
// Loader Standard Neutral Pro
|
||||
const loader = `
|
||||
<div class="d-flex justify-content-center align-items-center" style="min-height:300px; width:100%;">
|
||||
<div class="text-center">
|
||||
<div class="spinner-border text-primary" role="status" style="width: 3rem; height: 3rem;"></div>
|
||||
<div class="mt-2 text-primary fw-bold text-uppercase small animate__animated animate__pulse animate__infinite">
|
||||
${($("#codeLangue").val() === 'en_US') ? 'Updating network...' : 'Mise à jour du réseau...'}
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
donnees = 'codeReseau='+codeReseau+'&codePrestataire='+codePrestataire;
|
||||
$("#div_prestataires_reseau").html(loader);
|
||||
|
||||
$("#div_prestataires_reseau").html('<div style="padding-top:80px; text-align:center; font-size:14px; color: #0088cf; "><span><i class="fa fa-spinner fa-spin fa-5x" >' + '</span></div>');
|
||||
|
||||
$.ajax({
|
||||
url: $("#racineWeb").val()+"Ajaxprestatairesreseau/ajouterunprestataireaureseau/",
|
||||
type: 'POST',
|
||||
data: donnees,
|
||||
success: function(data) {
|
||||
$('#div_prestataires_reseau').html(data);
|
||||
appliquerDataTable();
|
||||
},
|
||||
error: function(data) {
|
||||
},
|
||||
complete: function()
|
||||
{
|
||||
}
|
||||
});
|
||||
$.ajax({
|
||||
url: $("#racineWeb").val() + "Ajaxprestatairesreseau/ajouterunprestataireaureseau/",
|
||||
type: 'POST',
|
||||
data: donnees,
|
||||
success: function(data) {
|
||||
// 1. Injection du nouveau contenu (Tableaux + Filtres)
|
||||
$('#div_prestataires_reseau').html(data);
|
||||
|
||||
// 2. Réactivation des composants Bootstrap-Select (Important !)
|
||||
actualiserSelectPicker('.selectpicker');
|
||||
|
||||
// 3. Application de la DataTable si nécessaire
|
||||
if (typeof appliquerDataTable === 'function') {
|
||||
appliquerDataTable();
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error("Erreur INTER-SANTE:", error);
|
||||
alert_ebene("Une erreur est survenue lors de l'ajout.", "An error occurred during addition.");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function retirer_tous_prestataires_reseau()
|
||||
{
|
||||
codeReseau=$("#codeReseau").val();
|
||||
function retirer_tous_prestataires_reseau() {
|
||||
const codeReseau = $("#codeReseau").val();
|
||||
const lang = $("#codeLangue").val();
|
||||
|
||||
if (codeReseau<=" ")
|
||||
{
|
||||
v_msg="Veuillez sélectionner un réseau de soins!";
|
||||
v_msgEng="Please select a care network!";
|
||||
alert_ebene(v_msg, v_msgEng);
|
||||
// 1. Vérification de la sélection
|
||||
if (!codeReseau || codeReseau.trim() === "") {
|
||||
const v_msg = "Veuillez sélectionner un réseau de soins !";
|
||||
const v_msgEng = "Please select a care network !";
|
||||
alert_ebene(v_msg, v_msgEng);
|
||||
return;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
const donnees = { codeReseau: codeReseau };
|
||||
|
||||
donnees = 'codeReseau='+codeReseau;
|
||||
// 2. Message de confirmation (Action critique)
|
||||
const c_msg = "Attention, cela va vider ce réseau de soins de tous ses prestataires ! Confirmez-vous ?";
|
||||
const c_msgEng = "Be careful, this will empty this healthcare network of all its providers! Do you confirm?";
|
||||
|
||||
v_msg="Attention, cela va vider ce réseau de soins de tous ses prestataires! Confirmez-vous?";
|
||||
v_msgEng="Be careful, this will empty this healthcare network of all its providers! Do you confirm?";
|
||||
|
||||
|
||||
confirm_ebene(v_msg, v_msgEng)
|
||||
.then((isConfirmed) => {
|
||||
if (isConfirmed) {
|
||||
// L'utilisateur a confirmé
|
||||
$("#div_prestataires_reseau").html('<div style="padding-top:80px; text-align:center; font-size:14px; color: #0088cf; "><span><i class="fa fa-spinner fa-spin fa-5x" >' + '</span></div>');
|
||||
confirm_ebene(c_msg, c_msgEng).then((isConfirmed) => {
|
||||
if (isConfirmed) {
|
||||
// Loader Standard INTER-SANTE (Style Danger/Alerte discret)
|
||||
const loader = `
|
||||
<div class="d-flex justify-content-center align-items-center" style="min-height:300px; width:100%;">
|
||||
<div class="text-center">
|
||||
<div class="spinner-border text-danger" role="status" style="width: 3.5rem; height: 3.5rem;"></div>
|
||||
<div class="mt-3 text-danger fw-bold text-uppercase small animate__animated animate__pulse animate__infinite">
|
||||
${(lang === 'en_US') ? 'Emptying network...' : 'Vidage du réseau en cours...'}
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
$.ajax({
|
||||
url: $("#racineWeb").val()+"Ajaxprestatairesreseau/retirertousprestatairesreseausoins/",
|
||||
type: 'POST',
|
||||
data: donnees,
|
||||
success: function(data)
|
||||
{
|
||||
$('#div_prestataires_reseau').html(data);
|
||||
appliquerDataTable();
|
||||
},
|
||||
error: function(data)
|
||||
{
|
||||
},
|
||||
complete: function()
|
||||
{
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// L'utilisateur a annulé
|
||||
console.log("Confirmation refusée");
|
||||
}
|
||||
});
|
||||
|
||||
$("#div_prestataires_reseau").html(loader);
|
||||
|
||||
$.ajax({
|
||||
url: $("#racineWeb").val() + "Ajaxprestatairesreseau/retirertousprestatairesreseausoins/",
|
||||
type: 'POST',
|
||||
data: donnees,
|
||||
success: function(data) {
|
||||
// Injection du nouveau contenu (tableaux vides + filtres réinitialisés)
|
||||
$('#div_prestataires_reseau').html(data);
|
||||
|
||||
// Réactivation des composants Bootstrap-Select
|
||||
actualiserSelectPicker('.selectpicker');
|
||||
|
||||
// Application de la DataTable si nécessaire
|
||||
if (typeof appliquerDataTable === 'function') {
|
||||
appliquerDataTable();
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error("Erreur INTER-SANTE (Vidage Global):", error);
|
||||
alert_ebene("Erreur lors du retrait global.", "Error during global removal.");
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function retirer_un_prestataire_reseau(codePrestataire)
|
||||
{
|
||||
|
||||
codeReseau=$("#codeReseau").val();
|
||||
|
||||
function retirer_un_prestataire_reseau(codePrestataire) {
|
||||
const codeReseau = $("#codeReseau").val();
|
||||
const lang = $("#codeLangue").val();
|
||||
|
||||
if (codeReseau<=" ")
|
||||
{
|
||||
v_msg="Veuillez sélectionner un réseau de soins!";
|
||||
v_msgEng="Please select a care network!";
|
||||
alert_ebene(v_msg, v_msgEng);
|
||||
// 1. Vérification de la sélection du réseau
|
||||
if (!codeReseau || codeReseau.trim() === "") {
|
||||
const v_msg = "Veuillez sélectionner un réseau de soins !";
|
||||
const v_msgEng = "Please select a care network !";
|
||||
alert_ebene(v_msg, v_msgEng);
|
||||
return;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
const donnees = {
|
||||
codeReseau: codeReseau,
|
||||
codePrestataire: codePrestataire
|
||||
};
|
||||
|
||||
donnees = 'codeReseau='+codeReseau+'&codePrestataire='+codePrestataire;
|
||||
|
||||
|
||||
$("#div_prestataires_reseau").html('<div style="padding-top:80px; text-align:center; font-size:14px; color: #0088cf; "><span><i class="fa fa-spinner fa-spin fa-5x" >' + '</span></div>');
|
||||
// 2. Loader Standard INTER-SANTE
|
||||
const loader = `
|
||||
<div class="d-flex justify-content-center align-items-center" style="min-height:300px; width:100%;">
|
||||
<div class="text-center">
|
||||
<div class="spinner-border text-primary" role="status" style="width: 3rem; height: 3rem;"></div>
|
||||
<div class="mt-2 text-primary fw-bold text-uppercase small animate__animated animate__pulse animate__infinite">
|
||||
${(lang === 'en_US') ? 'Updating network...' : 'Mise à jour du réseau...'}
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
$.ajax({
|
||||
url: $("#racineWeb").val()+"Ajaxprestatairesreseau/retirerunprestatairereseausoins/",
|
||||
type: 'POST',
|
||||
data: donnees,
|
||||
success: function(data) {
|
||||
$('#div_prestataires_reseau').html(data);
|
||||
appliquerDataTable();
|
||||
},
|
||||
error: function(data) {
|
||||
},
|
||||
complete: function()
|
||||
{
|
||||
}
|
||||
});
|
||||
$("#div_prestataires_reseau").html(loader);
|
||||
|
||||
$.ajax({
|
||||
url: $("#racineWeb").val() + "Ajaxprestatairesreseau/retirerunprestatairereseausoins/",
|
||||
type: 'POST',
|
||||
data: donnees,
|
||||
success: function(data) {
|
||||
// 1. Injection du nouveau HTML (Les tableaux mis à jour)
|
||||
$('#div_prestataires_reseau').html(data);
|
||||
|
||||
// 2. Réactivation cruciale des SelectPickers pour les zones de recherche
|
||||
actualiserSelectPicker('.selectpicker');
|
||||
|
||||
// 3. Application de la DataTable si nécessaire
|
||||
if (typeof appliquerDataTable === 'function') {
|
||||
appliquerDataTable();
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error("Erreur INTER-SANTE (Retrait):", error);
|
||||
alert_ebene("Une erreur est survenue lors du retrait.", "An error occurred during removal.");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -92360,7 +92416,6 @@ function actualiser_garantie_produit() {
|
|||
}
|
||||
|
||||
let timerDispo, timerAffect;
|
||||
|
||||
/**
|
||||
* Recherche Serveur Multi-critères
|
||||
* @param {string} target - 'dispo' ou 'affect'
|
||||
|
|
@ -92390,8 +92445,12 @@ function rechercheServeur(target) {
|
|||
$("#count_" + target).html('<i class="fas fa-spinner fa-spin"></i>');
|
||||
},
|
||||
success: function(data) {
|
||||
// On remplace le corps du tableau
|
||||
$("#tab_" + target + " tbody").html(data);
|
||||
$("#count_" + target).text($("#tab_" + target + " tbody tr").length);
|
||||
|
||||
// Mise à jour du compteur de lignes
|
||||
let nbre = $("#tab_" + target + " tbody tr").length;
|
||||
$("#count_" + target).text(nbre);
|
||||
}
|
||||
});
|
||||
}, 400);
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
<input type="text" id="search_ville_dispo" class="form-control form-control-sm border-2 shadow-none" placeholder="<?= _("Ville...") ?>" onkeyup="rechercheServeur('dispo')">
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<select id="search_type_dispo" class="form-select form-select-sm border-2 shadow-none" onchange="rechercheServeur('dispo')">
|
||||
<select id="search_type_dispo" class="form-control selectpicker border-2" data-live-search="true" data-style="btn-white btn-sm" onchange="rechercheServeur('dispo')">
|
||||
<option value=""><?= _("Tous les types") ?></option>
|
||||
<?php foreach($typesDispo as $t): ?> <option value="<?= $t ?>"><?= $t ?></option> <?php endforeach; ?>
|
||||
</select>
|
||||
|
|
@ -106,7 +106,7 @@
|
|||
<input type="text" id="search_ville_affect" class="form-control form-control-sm border-2 shadow-none" placeholder="<?= _("Filtrer par ville...") ?>" onkeyup="rechercheServeur('affect');">
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<select id="search_type_affect" class="form-select form-select-sm border-2 shadow-none" onchange="rechercheServeur('affect');">
|
||||
<select id="search_type_affect" class="form-control selectpicker border-2" data-live-search="true" data-style="btn-white btn-sm" onchange="rechercheServeur('affect')">
|
||||
<option value=""><?= _("Tous les types") ?></option>
|
||||
<?php foreach($typesAffect as $t): ?> <option value="<?= $t ?>"><?= $t ?></option> <?php endforeach; ?>
|
||||
</select>
|
||||
|
|
|
|||
|
|
@ -66,10 +66,16 @@
|
|||
<input type="text" id="search_ville_dispo" class="form-control form-control-sm border-2 shadow-none" placeholder="<?= _("Ville...") ?>" onkeyup="rechercheServeur('dispo')">
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<select id="search_type_dispo" class="form-select form-select-sm border-2 shadow-none" onchange="rechercheServeur('dispo')">
|
||||
<select id="search_type_dispo"
|
||||
class="form-control selectpicker border-2 shadow-none"
|
||||
data-live-search="true"
|
||||
data-style="btn-white btn-sm"
|
||||
onchange="rechercheServeur('dispo')">
|
||||
<option value=""><?= _("Tous les types") ?></option>
|
||||
<?php foreach($typesDispo as $t): ?> <option value="<?= $t ?>"><?= $t ?></option> <?php endforeach; ?>
|
||||
</select>
|
||||
<?php foreach($typesDispo as $t): ?>
|
||||
<option value="<?= $t ?>"><?= $t ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -133,9 +139,15 @@
|
|||
<input type="text" id="search_ville_affect" class="form-control form-control-sm border-2 shadow-none" placeholder="<?= _("Filtrer par ville...") ?>" onkeyup="rechercheServeur('affect');">
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<select id="search_type_affect" class="form-control selectpicker border-2 shadow-none" data-live-search="true" onchange="rechercheServeur('affect');">
|
||||
<select id="search_type_affect"
|
||||
class="form-control selectpicker border-2 shadow-none"
|
||||
data-live-search="true"
|
||||
data-style="btn-white btn-sm"
|
||||
onchange="rechercheServeur('affect');">
|
||||
<option value=""><?= _("Tous les types") ?></option>
|
||||
<?php foreach($typesAffect as $t): ?> <option value="<?= $t ?>"><?= $t ?></option> <?php endforeach; ?>
|
||||
<?php foreach($typesAffect as $t): ?>
|
||||
<option value="<?= $t ?>"><?= $t ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user