This commit is contained in:
KONE SOREL 2026-03-11 15:24:37 +00:00
parent aee4eb9a91
commit aa81215c50
16 changed files with 27 additions and 36 deletions

View File

@ -47471,40 +47471,31 @@ function chargerFichiersTable() {
const racineWeb = $("#racineWeb").val();
const codeLangue = $("#codeLangue").val();
// 1. Si aucune table n'est sélectionnée, on nettoie tout
if (!idTable || idTable === "") {
$('#div_fichiers_table, #div_entete_table, #div_lister_table, #div_maj_table').empty();
return;
}
// 2. Feedback visuel global
const loadingHtml = `
<div class="text-center p-5">
<div class="spinner-border text-primary" role="status"></div>
<p class="mt-2 text-muted italic">${(codeLangue === "en_US") ? "Loading table data..." : "Chargement des données..."}</p>
</div>`;
// Feedback visuel
const loadingHtml = `...`;
$('#div_lister_table').html(loadingHtml);
$('#div_maj_table').html(""); // On vide la zone de saisie pour le nouveau contexte
$('#div_maj_table').html("");
// 3. Appel AJAX pour récupérer les fichiers/paramètres de la table
$.ajax({
url: racineWeb + "Ajaxaccesfichiersautrestables/",
type: 'post',
data: { id: idTable },
success: function(data) {
// 1. On ferme le formulaire précédent (ce qui affiche le bouton AJOUTER)
fermeFormulaire();
// 2. On injecte les fichiers de configuration (hidden inputs)
$('#div_fichiers_table').html(data);
// 3. On affiche les données
afficheDonneesTableChoisie($('#fichier_lister').val());
},
fermeFormulaire();
$('#div_fichiers_table').html(data);
afficheDonneesTableChoisie($('#fichier_lister').val());
// --- CORRECTION ICI ---
// On force le SelectPicker à se rafraîchir pour ne pas perdre le design
$('#listetables').selectpicker('refresh');
},
error: function(xhr) {
toastr.error((codeLangue === "en_US") ? "Error accessing table files" : "Erreur d'accès aux fichiers de la table");
console.error(xhr.responseText);
toastr.error((codeLangue === "en_US") ? "Error..." : "Erreur...");
}
});
}

View File

@ -7,7 +7,7 @@
<div class="card-header bg-white py-3 border-bottom d-flex justify-content-between align-items-center">
<div class="d-flex align-items-center">
<h6 class="mb-0 fw-bold text-uppercase text-primary small">
<i class="fas fa-briefcase me-2"></i><?= _("Liste des activités de soins") ?>
<i class="fas fa-briefcase me-2"></i><?= _("Référentiel des activités de soins") ?>
</h6>
<span class="badge bg-primary-ghost text-primary ms-3 px-3 py-2 rounded-pill fw-bold" id="badge-total">
<?= $nbreTotal ?> <?= _("Lignes") ?>

View File

@ -7,7 +7,7 @@
<div class="card-header bg-white py-3 border-bottom d-flex justify-content-between align-items-center">
<div class="d-flex align-items-center">
<h6 class="mb-0 fw-bold text-uppercase text-primary small">
<i class="fas fa-hand-holding-medical me-2"></i><?= _("Liste des Affections") ?>
<i class="fas fa-hand-holding-medical me-2"></i><?= _("Référentiel des Affections") ?>
</h6>
<span class="badge bg-primary-ghost text-primary ms-3 px-3 py-2 rounded-pill fw-bold" id="badge-total">
<?= $nbreTotal ?> <?= _("Lignes") ?>

View File

@ -7,7 +7,7 @@
<div class="card-header bg-white py-3 border-bottom d-flex justify-content-between align-items-center">
<div class="d-flex align-items-center">
<h6 class="mb-0 fw-bold text-uppercase text-primary small">
<i class="fas fa-building me-2"></i><?= _("Liste des Bureaux") ?>
<i class="fas fa-building me-2"></i><?= _("Référentiel des Bureaux") ?>
</h6>
<span class="badge bg-primary-ghost text-primary ms-3 px-3 py-2 rounded-pill fw-bold" id="badge-total">
<?= $nbreTotal ?> <?= _("Lignes") ?>

View File

@ -7,7 +7,7 @@
<div class="card-header bg-white py-3 border-bottom d-flex justify-content-between align-items-center">
<div class="d-flex align-items-center">
<h6 class="mb-0 fw-bold text-uppercase text-primary small">
<i class="fas fa-users me-2"></i><?= _("Liste des Commerciaux") ?>
<i class="fas fa-users me-2"></i><?= _("Référentiel des Commerciaux") ?>
</h6>
<span class="badge bg-primary-ghost text-primary ms-3 px-3 py-2 rounded-pill fw-bold" id="badge-total">
<?= $nbreTotal ?> <?= _("Lignes") ?>

View File

@ -7,7 +7,7 @@
<div class="card-header bg-white py-3 border-bottom d-flex justify-content-between align-items-center">
<div class="d-flex align-items-center">
<h6 class="mb-0 fw-bold text-uppercase text-primary small">
<i class="fas fa-hourglass-half me-2"></i><?= _("Configuration des Tranches d'Âge") ?>
<i class="fas fa-hourglass-half me-2"></i><?= _("Référentiel des entêtes de Tranches d'Âge") ?>
</h6>
<span class="badge bg-primary-ghost text-primary ms-3 px-3 py-2 rounded-pill fw-bold" id="badge-total">
<?= $nbreTotal ?> <?= _("Lignes") ?>

View File

@ -7,7 +7,7 @@
<div class="card-header bg-white py-3 border-bottom d-flex justify-content-between align-items-center">
<div class="d-flex align-items-center">
<h6 class="mb-0 fw-bold text-uppercase text-primary small">
<i class="fas fa-map-marked-alt me-2"></i><?= _("Liste des étendues de Territoire") ?>
<i class="fas fa-map-marked-alt me-2"></i><?= _("Référentiel des étendues de Territoire") ?>
</h6>
<span class="badge bg-primary-ghost text-primary ms-3 px-3 py-2 rounded-pill fw-bold" id="badge-total">
<?= $nbreTotal ?> <?= _("Lignes") ?>

View File

@ -2,7 +2,7 @@
<div class="card-header bg-white py-3 border-bottom d-flex justify-content-between align-items-center">
<div class="d-flex align-items-center">
<h6 class="mb-0 fw-bold text-uppercase text-primary small">
<i class="fas fa-handshake me-2"></i><?= _("Liste des Courtiers & Intermédiaires") ?>
<i class="fas fa-handshake me-2"></i><?= _("Référentiel des Courtiers & Intermédiaires") ?>
</h6>
<span class="badge bg-primary-ghost text-primary ms-3 px-3 py-2 rounded-pill fw-bold" id="badge-total">
0 <?= _("Lignes") ?>

View File

@ -2,7 +2,7 @@
<div class="card-header bg-white py-3 border-bottom d-flex justify-content-between align-items-center">
<div class="d-flex align-items-center">
<h6 class="mb-0 fw-bold text-uppercase text-primary small">
<i class="fas fa-map-marker-alt me-2"></i><?= _("Liste des Localités") ?>
<i class="fas fa-map-marker-alt me-2"></i><?= _("Référentiel des Localités") ?>
</h6>
<span class="badge bg-primary-ghost text-primary ms-3 px-3 py-2 rounded-pill fw-bold" id="badge-total">
0 <?= _("Lignes") ?>

View File

@ -7,7 +7,7 @@
<div class="card-header bg-white py-3 border-bottom d-flex justify-content-between align-items-center">
<div class="d-flex align-items-center">
<h6 class="mb-0 fw-bold text-uppercase text-primary small">
<i class="fas fa-wallet me-2"></i><?= _("Liste des Moyens de Paiement") ?>
<i class="fas fa-wallet me-2"></i><?= _("Référentiel des Moyens de Paiement") ?>
</h6>
<span class="badge bg-primary-ghost text-primary ms-3 px-3 py-2 rounded-pill fw-bold" id="badge-total">
<?= $nbreTotal ?> <?= _("Lignes") ?>

View File

@ -2,7 +2,7 @@
<div class="card-header bg-white py-3 border-bottom d-flex justify-content-between align-items-center">
<div class="d-flex align-items-center">
<h6 class="mb-0 fw-bold text-uppercase text-primary small">
<i class="fas fa-table me-2"></i><?= _("Pays de référence") ?>
<i class="fas fa-table me-2"></i><?= _("Référentiel des Pays") ?>
</h6>
<span class="badge bg-primary-ghost text-primary ms-3 px-3 py-2 rounded-pill fw-bold" id="badge-total">
0 <?= _("Lignes") ?>

View File

@ -7,7 +7,7 @@
<div class="card-header bg-white py-3 border-bottom d-flex justify-content-between align-items-center">
<div class="d-flex align-items-center">
<h6 class="mb-0 fw-bold text-uppercase text-primary small">
<i class="fas fa-store me-2"></i><?= _("Liste des Points de Vente") ?>
<i class="fas fa-store me-2"></i><?= _("Référentiel des Points de Vente") ?>
</h6>
<span class="badge bg-primary-ghost text-primary ms-3 px-3 py-2 rounded-pill fw-bold" id="badge-total">
<?= $nbreTotal ?> <?= _("Lignes") ?>

View File

@ -2,7 +2,7 @@
<div class="card-header bg-white py-3 border-bottom d-flex justify-content-between align-items-center">
<div class="d-flex align-items-center">
<h6 class="mb-0 fw-bold text-uppercase text-primary small">
<i class="fas fa-briefcase me-2"></i><?= _("Liste des Secteurs d'Activité") ?>
<i class="fas fa-briefcase me-2"></i><?= _("Référentiel des Secteurs d'Activité") ?>
</h6>
<span class="badge bg-primary-ghost text-primary ms-3 px-3 py-2 rounded-pill fw-bold" id="badge-total">
0 <?= _("Lignes") ?>

View File

@ -2,7 +2,7 @@
<div class="card-header bg-white py-3 border-bottom d-flex justify-content-between align-items-center">
<div class="d-flex align-items-center">
<h6 class="mb-0 fw-bold text-uppercase text-primary small">
<i class="fas fa-concierge-bell me-2"></i><?= _("Liste des Services") ?>
<i class="fas fa-concierge-bell me-2"></i><?= _("Référentiel des Services") ?>
</h6>
<span class="badge bg-primary-ghost text-primary ms-3 px-3 py-2 rounded-pill fw-bold" id="badge-total">
0 <?= _("Lignes") ?>

View File

@ -2,7 +2,7 @@
<div class="card-header bg-white py-3 border-bottom d-flex justify-content-between align-items-center">
<div class="d-flex align-items-center">
<h6 class="mb-0 fw-bold text-uppercase text-primary small">
<i class="fas fa-user-tag me-2"></i><?= _("Liste des Titres / Civilités") ?>
<i class="fas fa-user-tag me-2"></i><?= _("Référentiel des Titres / Civilités") ?>
</h6>
<span class="badge bg-primary-ghost text-primary ms-3 px-3 py-2 rounded-pill fw-bold" id="badge-total">
0 <?= _("Lignes") ?>

View File

@ -2,7 +2,7 @@
<div class="card-header bg-white py-3 border-bottom d-flex justify-content-between align-items-center">
<div class="d-flex align-items-center">
<h6 class="mb-0 fw-bold text-uppercase text-primary small">
<i class="fas fa-city me-2"></i><?= _("Liste des Districts / Régions") ?>
<i class="fas fa-city me-2"></i><?= _("Référentiel des Districts / Régions") ?>
</h6>
<span class="badge bg-primary-ghost text-primary ms-3 px-3 py-2 rounded-pill fw-bold" id="badge-total">
0 <?= _("Lignes") ?>