diff --git a/Js/fonctions.js b/Js/fonctions.js index 5873c1d..be14563 100755 --- a/Js/fonctions.js +++ b/Js/fonctions.js @@ -376,67 +376,62 @@ function connexion_cookie() // Applique la librairie DataBase sur les tableaux function appliquerDataTable() { - const $table = $('.tabliste'); const codeLangue = $("#codeLangue").val(); - // Dictionnaire des traductions const translations = { - en_US: { - lengthMenu: "Display _MENU_ records per page", - zeroRecords: "Nothing found - sorry", - info: "Showing page _PAGE_ of _PAGES_", - infoEmpty: "No records available", - search: "Search:", - paginate: { - next: "►", - previous: "◄", - first: "|◄", - last: "►|" - }, - infoFiltered: "(filtered from _MAX_ total records)" - }, fr_FR: { lengthMenu: "Affiche _MENU_ par page", zeroRecords: "Désolé - Aucune donnée trouvée", info: "_PAGE_ sur _PAGES_ pages", infoEmpty: "Pas d'enregistrement", search: "Recherche:", - paginate: { - next: "►", - previous: "◄", - first: "|◄", - last: "►|" - }, + paginate: { next: "►", previous: "◄", first: "|◄", last: "►|" }, infoFiltered: "(filtré de _MAX_ total enregistrements)" + }, + en_US: { + lengthMenu: "Display _MENU_ records per page", + zeroRecords: "Nothing found - sorry", + info: "Showing page _PAGE_ of _PAGES_", + infoEmpty: "No records available", + search: "Search:", + paginate: { next: "►", previous: "◄", first: "|◄", last: "►|" }, + infoFiltered: "(filtered from _MAX_ total records)" } }; - // Options DataTable - const options = { - destroy: true, - responsive: true, - order: [[0, "desc"]], - lengthMenu: [50, 100, 150], - pagingType: "full_numbers", - autoWidth: false, - language: translations[codeLangue] || translations.fr_FR - }; + $('.tabliste').each(function() { + const $table = $(this); + + // Détecter les colonnes avec data-hidden="true" + const hiddenTargets = []; + $table.find('thead th').each(function(index) { + if ($(this).data('hidden')) { + hiddenTargets.push(index); + } + }); + + const options = { + destroy: true, + responsive: true, + order: [[0, "desc"]], + lengthMenu: [50, 100, 150], + pagingType: "full_numbers", + autoWidth: false, + language: translations[codeLangue] || translations.fr_FR, + columnDefs: [ + { targets: hiddenTargets, visible: false, searchable: true } + ] + }; - try { - // Initialisation const instance = $table.DataTable(options); - // Correction d'alignement après le rendu setTimeout(() => { instance.columns.adjust().responsive.recalc(); }, 100); - - } catch (err) { - console.error("Erreur lors de l'application du DataTable :", err); - return false; - } + }); } + function raffraichier_gabarit() { diff --git a/Vue/Accueil/index.php b/Vue/Accueil/index.php index ee7eb34..04703fe 100644 --- a/Vue/Accueil/index.php +++ b/Vue/Accueil/index.php @@ -78,48 +78,61 @@
| = _("No Police") ?> | -= _("ID Police") ?> | -Type | -= _("Effet") ?> | -= _("Échéance") ?> | -= _("Type Avenant") ?> | -= _("État") ?> | -= _("Prime") ?> | -= _("Sinistres") ?> | -= _("R S/P") ?> | -||
|---|---|---|---|---|---|---|---|---|---|---|---|
| = _("No Police") ?> | += _("ID Police") ?> | +Type | += _("Effet") ?> | += _("Échéance") ?> | += _("Type Avenant") ?> | += _("État") ?> | += _("Prime") ?> | += _("Sinistres") ?> | += _("R S/P") ?> | + + +NoPoliceHidden | +IdPoliceHidden | +
| - | - - | = $this->nettoyer($police['typeContrat']) ?> | -= dateLang($this->nettoyer($police['dateEffet']), $_SESSION['lang'])?> | -= dateLang($this->nettoyer($police['dateEcheance']), $_SESSION['lang']) ?> | - -= $this->nettoyer($police['typeAvenant']) ?> | -= $this->nettoyer($police['etatPolice']) ?> | -= format_N($this->nettoyer($police['primeNetteStat'])) ?> | -= format_N($this->nettoyer($police['montantApayer'])) ?> | + nettoyer($police['idPolice']); + $nopol = $this->nettoyer($police['numeroPolice']); + ?> +|||
| + + | ++ + | - 65 && $police["rapportSp"] <= 80):?> -= $police["rapportSp"].'%' ?> | - 80):?> -= $police["rapportSp"].'%' ?> | - -= $police["rapportSp"].'%' ?> | - -= $this->nettoyer($police['typeContrat']) ?> | += dateLang($this->nettoyer($police['dateEffet']), $_SESSION['lang'])?> | += dateLang($this->nettoyer($police['dateEcheance']), $_SESSION['lang']) ?> | += $this->nettoyer($police['typeAvenant']) ?> | += $this->nettoyer($police['etatPolice']) ?> | += format_N($this->nettoyer($police['primeNetteStat'])) ?> | += format_N($this->nettoyer($police['montantApayer'])) ?> | + + 65 && $police["rapportSp"] <= 80):?> += $police["rapportSp"].'%' ?> | + 80):?> += $police["rapportSp"].'%' ?> | + += $police["rapportSp"].'%' ?> | + + + += $nopol ?> | += $id ?> | + +