newdesigngestionnaire/Vue/Tablesreference/index.php
2026-03-06 16:18:38 +00:00

86 lines
4.5 KiB
PHP
Executable File

<div class="page-content">
<div class="header-section mb-4">
<div class="d-flex align-items-center bg-white p-3 shadow-sm border-start border-primary border-4" style="border-radius: var(--radius-md);">
<div class="icon-shape bg-primary-ghost text-primary rounded-circle me-3" style="width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;">
<i class="fas fa-database fs-4"></i>
</div>
<div>
<h4 id="titre-page" class="mb-0 fw-bold text-uppercase"><?= _("Tables de Référence") ?></h4>
<p class="text-muted small mb-0"><?= _("Configuration des listes de données du système") ?></p>
</div>
</div>
</div>
<div class="card border-0 shadow-sm mb-4" style="border-radius: var(--radius-md);">
<div class="card-body p-4">
<div class="row align-items-center">
<div class="col-lg-3">
<h6 class="fw-bold text-muted mb-lg-0 mb-3 small text-uppercase">
<i class="fas fa-filter me-2"></i><?= _("Filtrer par Module") ?>
</h6>
</div>
<div class="col-lg-9 text-lg-end">
<div class="btn-group w-100 shadow-xs" role="group" aria-label="Filtre table">
<?php
$modules = est_anglophone() ?
[1 => 'General', 2 => 'Production', 3 => 'Medical and Claims', 5 => 'Accounting'] :
[1 => 'Générale', 2 => 'Production', 3 => 'Médical et Sinistre', 5 => 'Comptabilité'];
foreach($modules as $val => $libelle): ?>
<input type="radio" class="btn-check" name="numeroTable" id="btnTable<?= $val ?>" value="<?= $val ?>" <?= $val == 1 ? 'checked' : '' ?> autocomplete="off" onClick="filtreTableReference(this.value);">
<label class="btn btn-outline-primary py-2 fw-medium" for="btnTable<?= $val ?>"><?= $libelle ?></label>
<?php endforeach; ?>
</div>
</div>
</div>
</div>
</div>
<div class="card border-0 shadow-sm mb-4">
<div class="card-body p-3 bg-light-subtle rounded border border-primary-subtle border-dashed">
<div class="row align-items-center">
<div class="col-md-2 text-md-end text-primary fw-bold small">
<?= _("Sélectionner") ?> :
</div>
<div class="col-md-10" id="div_listetables">
<select name="listetables" id="listetables" class="form-select selectpicker show-tick w-100" data-live-search="true" data-size="8" onchange="chargerFichiersTable();">
<?= liste_options($autrestables,'',false) ?>
</select>
</div>
</div>
</div>
</div>
<div class="row g-4">
<div class="col-lg-4">
<div id="div_maj_table" class="sticky-top" style="top: 20px; z-index: 10;">
</div>
</div>
<div class="col-lg-8">
<div id="div_lister_table">
<div class="text-center p-5 bg-white rounded shadow-xs border">
<div class="icon-shape bg-light text-muted rounded-circle mx-auto mb-3" style="width: 60px; height: 60px; display: flex; align-items: center; justify-content: center;">
<i class="fas fa-table-list fa-2x"></i>
</div>
<h6 class="text-muted fw-bold"><?= _("Veuillez sélectionner une table pour afficher ses données") ?></h6>
</div>
</div>
</div>
</div>
<div id="div_fichiers_table" class="d-none"></div>
<div id="div_entete_table" class="d-none"></div>
</div>
<style>
.btn-check:checked + .btn-outline-primary { background-color: #212e53 !important; border-color: #212e53 !important; color: white; }
.btn-outline-primary { color: #212e53; border-color: #dee2e6; background-color: white; }
.btn-outline-primary:hover { background-color: #f8f9fa; color: #212e53; border-color: #212e53; }
.border-dashed { border-style: dashed !important; }
.bg-primary-ghost { background: rgba(33, 46, 83, 0.08) !important; }
/* Animation pour les listes chargées */
#div_lister_table, #div_maj_table { transition: opacity 0.3s ease; }
</style>