This commit is contained in:
KONE SOREL 2026-02-26 12:04:43 +00:00
parent 0f0d158a77
commit f23d7feec5

View File

@ -3,188 +3,213 @@
<div class="page-content">
<input class="sr-only" type="text" id="idSocieteuser" name="idSocieteuser" value="<?= $this->nettoyer($societeuser['idSocieteuser']) ?>">
<div class="d-flex align-items-center mb-4">
<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-cogs fs-4"></i>
<div class="d-flex align-items-center justify-content-between mb-4 bg-white p-3 shadow-sm" style="border-radius: var(--radius-md); border-left: 4px solid var(--color-primary);">
<div class="d-flex align-items-center">
<div class="icon-shape bg-primary-ghost text-primary rounded-circle me-3" style="width: 50px; height: 50px; display: flex; align-items: center; justify-content: center;">
<i class="fas fa-sliders-h fs-4"></i>
</div>
<div>
<h4 class="mb-0 fw-bold" style="color: var(--color-primary); letter-spacing: -0.5px;"><?= _("Paramètres Système") ?></h4>
<nav aria-label="breadcrumb">
<ol class="breadcrumb mb-0 small">
<li class="breadcrumb-item text-muted"><?= $this->nettoyer($societeuser['nomSociete']) ?></li>
<li class="breadcrumb-item active text-primary fw-medium" aria-current="page"><?= _("Configuration Globale") ?></li>
</ol>
</nav>
</div>
</div>
<div>
<h4 class="mb-0 fw-bold" style="color: var(--color-primary);"><?= _("Paramètres système") ?></h4>
<p class="text-muted small mb-0"><?= _("Configuration du centre de gestion et seuils d'alertes") ?></p>
<div class="text-end d-none d-md-block">
<span class="badge bg-light text-dark border px-3 py-2" style="border-radius: var(--radius-sm);">
<i class="fas fa-globe me-2 text-primary"></i><?= $this->nettoyer($_SESSION['libelleLang']) ?>
</span>
</div>
</div>
<div class="row g-4">
<div class="col-xl-6">
<div class="card h-100 shadow-sm border-0" style="border-radius: var(--radius-md);">
<div class="card-header bg-white py-3 border-bottom-0">
<h6 class="mb-0 fw-bold"><i class="fas fa-building me-2 text-muted"></i><?= _("Identité du Centre") ?></h6>
<div class="col-xl-7">
<div class="card border-0 shadow-sm h-100" style="border-radius: var(--radius-md);">
<div class="card-header bg-transparent border-0 pt-4 px-4">
<h6 class="fw-bold mb-0 text-uppercase small text-muted" style="letter-spacing: 1px;">
<i class="fas fa-id-badge me-2 text-primary"></i><?= _("Profil Institutionnel") ?>
</h6>
</div>
<div class="card-body pt-0">
<div class="card-body p-4">
<div class="row g-3">
<div class="col-md-4">
<label class="form-label small text-muted"><?= _("Code") ?></label>
<input class="form-control bg-light fw-bold" type="text" value="<?=$this->nettoyer($societeuser['codeSociete'])?>" readonly>
</div>
<div class="col-md-8">
<label class="form-label small text-muted"><?= _("Nom de la Société") ?></label>
<input class="form-control bg-light" type="text" value="<?=$this->nettoyer($societeuser['nomSociete'])?>" readonly>
</div>
<div class="col-md-6">
<label class="form-label small text-muted"><?= _("Sigle") ?></label>
<input class="form-control bg-light" type="text" value="<?=$this->nettoyer($societeuser['sigleSociete'])?>" readonly>
</div>
<div class="col-md-6">
<label class="form-label small text-muted"><?= _("Responsable") ?></label>
<input class="form-control bg-light" type="text" value="<?=$this->nettoyer($societeuser['nomResponsable'])?>" readonly>
</div>
<div class="col-md-6">
<label class="form-label small text-muted"><?= _("Ville") ?></label>
<select class="form-select bg-light" disabled>
<?php liste_options($villes, $this->nettoyer($societeuser['ville'])); ?>
</select>
</div>
<div class="col-md-6">
<label class="form-label small text-muted"><?= _("Pays") ?></label>
<input class="form-control bg-light" type="text" value="<?=$societeuser['pays']?>" readonly>
</div>
<div class="col-md-6">
<label class="form-label small text-muted"><?= _("Adresse Géo") ?></label>
<textarea class="form-control bg-light" rows="2" readonly><?=$this->nettoyer($societeuser['adresseGeoSociete'])?></textarea>
</div>
<div class="col-md-6">
<label class="form-label small text-muted"><?= _("Adresse Postale") ?></label>
<textarea class="form-control bg-light" rows="2" readonly><?=$this->nettoyer($societeuser['adressePostSociete'])?></textarea>
</div>
</div>
</div>
</div>
</div>
<div class="col-xl-6">
<div class="card h-100 shadow-sm border-0" style="border-radius: var(--radius-md);">
<div class="card-header bg-white py-3 border-bottom-0">
<h6 class="mb-0 fw-bold"><i class="fas fa-address-book me-2 text-muted"></i><?= _("Contacts & Canaux") ?></h6>
</div>
<div class="card-body pt-0">
<div class="row g-3">
<div class="col-md-6">
<label class="form-label small text-muted"><?= _("Téléphone Fixe") ?></label>
<div class="input-group">
<span class="input-group-text bg-light border-end-0"><i class="fas fa-phone-alt fa-xs"></i></span>
<input class="form-control bg-light border-start-0" type="text" value="<?=$this->nettoyer($societeuser['telephoneSociete'])?>" readonly>
</div>
</div>
<div class="col-md-6">
<label class="form-label small text-muted"><?= _("Tél Portable") ?></label>
<div class="input-group">
<span class="input-group-text bg-light border-end-0"><i class="fas fa-mobile-alt fa-xs"></i></span>
<input class="form-control bg-light border-start-0" type="text" value="<?=$this->nettoyer($societeuser['portable'])?>" readonly>
</div>
</div>
<div class="col-md-6">
<label class="form-label small text-muted">Fax</label>
<input class="form-control bg-light" type="text" value="<?=$this->nettoyer($societeuser['faxSociete'])?>" readonly>
</div>
<div class="col-md-6">
<label class="form-label small text-muted">E-mail Principal</label>
<input class="form-control bg-light" type="text" value="<?=$this->nettoyer($societeuser['emailSociete'])?>" readonly>
</div>
<div class="col-12 mt-4">
<h6 class="small fw-bold text-uppercase text-primary border-bottom pb-2 mb-3"><?= _("Canaux de notification") ?></h6>
</div>
<div class="col-md-6">
<label class="form-label small text-muted"><?= _("Indicatif Pays") ?></label>
<input class="form-control bg-light" type="text" value="<?=$this->nettoyer($societeuser['indicatifTelephone'])?>" readonly>
</div>
<div class="col-md-6">
<label class="form-label small text-muted"><?= _("Langue Système") ?></label>
<input class="form-control bg-light" type="text" value="<?=$this->nettoyer($_SESSION['libelleLang'])?>" readonly>
</div>
</div>
</div>
</div>
</div>
<div class="col-12">
<div class="card shadow-sm border-0" style="border-radius: var(--radius-md);">
<div class="card-header bg-white py-3 border-bottom-0">
<h6 class="mb-0 fw-bold"><i class="fas fa-at me-2 text-muted"></i><?= _("Configuration des Emails par Service") ?></h6>
</div>
<div class="card-body pt-0">
<div class="row g-3">
<?php
$emails = [
['label' => 'Médecin Conseil', 'val' => 'emailMedecinConseil', 'icon' => 'fa-user-md'],
['label' => 'Bons / Prises en charge', 'val' => 'emailGestionBon', 'icon' => 'fa-ticket-alt'],
['label' => 'Comptabilité', 'val' => 'emailCcomptabilite', 'icon' => 'fa-calculator'],
['label' => 'Dérogation', 'val' => 'emailDerogation', 'icon' => 'fa-exclamation-circle'],
['label' => 'Accord Préalable', 'val' => 'emailAccordPrealable', 'icon' => 'fa-check-double'],
['label' => 'Fraude (Biométrie)', 'val' => 'emailFraudeFinger', 'icon' => 'fa-fingerprint'],
['label' => 'Remboursement (RD)', 'val' => 'emailRd', 'icon' => 'fa-hand-holding-usd'],
];
foreach($emails as $e): ?>
<div class="col-md-6 col-lg-4">
<label class="form-label small text-muted"><?= _($e['label']) ?></label>
<div class="input-group input-group-sm">
<span class="input-group-text bg-white border-end-0"><i class="fas <?= $e['icon'] ?> fa-fw text-muted opacity-50"></i></span>
<input class="form-control bg-light border-start-0" type="text" value="<?=$this->nettoyer($societeuser[$e['val']])?>" readonly>
</div>
</div>
<?php endforeach; ?>
</div>
</div>
</div>
</div>
<div class="col-12">
<div class="card shadow-sm border-0 mb-4" style="border-radius: var(--radius-md);">
<div class="card-header bg-white py-3 border-bottom-0">
<h6 class="mb-0 fw-bold"><i class="fas fa-bell me-2 text-muted"></i><?= _("SMS, Seuils & Alertes") ?></h6>
</div>
<div class="card-body pt-0">
<div class="row g-3 align-items-end">
<div class="col-md-3">
<label class="form-label small text-muted"><?= _("Alerte Conso (%)") ?></label>
<div class="input-group">
<input class="form-control bg-light" type="number" value="<?=$this->nettoyer($societeuser['alertLimiteConsommation'])?>" disabled>
<span class="input-group-text bg-light">%</span>
<label class="form-label small text-muted fw-bold"><?= _("Code") ?></label>
<div class="p-2 bg-light border rounded text-center fw-bold text-primary"><?= $this->nettoyer($societeuser['codeSociete']) ?></div>
</div>
<div class="col-md-6">
<label class="form-label small text-muted fw-bold"><?= _("Dénomination") ?></label>
<input class="form-control border-0 bg-light" type="text" value="<?=$this->nettoyer($societeuser['nomSociete'])?>" readonly>
</div>
<div class="col-md-3">
<label class="form-label small text-muted fw-bold"><?= _("Sigle") ?></label>
<input class="form-control border-0 bg-light" type="text" value="<?=$this->nettoyer($societeuser['sigleSociete'])?>" readonly>
</div>
<div class="col-12 mt-4">
<div class="row g-3 p-3 rounded" style="background-color: #f8f9fa;">
<div class="col-md-6">
<label class="form-label small text-muted"><i class="fas fa-map-marker-alt me-1"></i> <?= _("Siège Social") ?></label>
<textarea class="form-control form-control-sm border-0 bg-white" rows="2" readonly><?=$this->nettoyer($societeuser['adresseGeoSociete'])?></textarea>
</div>
<div class="col-md-6">
<label class="form-label small text-muted"><i class="fas fa-box me-1"></i> <?= _("Boite Postale") ?></label>
<textarea class="form-control form-control-sm border-0 bg-white" rows="2" readonly><?=$this->nettoyer($societeuser['adressePostSociete'])?></textarea>
</div>
<div class="col-md-6">
<label class="form-label small text-muted"><?= _("Ville") ?></label>
<input class="form-control form-control-sm border-0 bg-white" type="text" value="<?=$this->nettoyer($societeuser['ville'])?>" readonly>
</div>
<div class="col-md-6">
<label class="form-label small text-muted"><?= _("Pays") ?></label>
<input class="form-control form-control-sm border-0 bg-white fw-bold" type="text" value="<?=$societeuser['pays']?>" readonly>
</div>
</div>
</div>
<div class="col-md-5">
<label class="form-label small text-muted"><?= _("Email Alerte Conso") ?></label>
<input class="form-control bg-light" type="text" value="<?=$this->nettoyer($societeuser['emailAlertLimiteConsommation'])?>" disabled>
</div>
<div class="col-md-2">
<label class="form-label small text-muted"><?= _("Alerte S/P (%)") ?></label>
<input class="form-control bg-light fw-bold text-danger" type="number" value="<?=$this->nettoyer($societeuser['spMax'])?>" readonly>
</div>
<div class="col-md-2">
<label class="form-label small text-muted"><?= _("Frais Carte") ?></label>
<input class="form-control bg-light" type="text" value="<?=format_N($this->nettoyer($societeuser['fraisCarteAN']))?>" readonly>
</div>
</div>
</div>
</div>
</div>
<div class="col-12 mt-4"><hr class="opacity-10"></div>
<div class="col-xl-5">
<div class="card border-0 shadow-sm h-100" style="border-radius: var(--radius-md);">
<div class="card-header bg-transparent border-0 pt-4 px-4 text-center">
<div class="avatar-md mx-auto mb-3">
<div class="rounded-circle bg-primary-ghost text-primary d-flex align-items-center justify-content-center mx-auto" style="width: 60px; height: 60px;">
<i class="fas fa-user-tie fs-3"></i>
</div>
</div>
<h6 class="fw-bold mb-1"><?= $this->nettoyer($societeuser['nomResponsable']) ?></h6>
<p class="text-muted small"><?= _("Responsable du Centre") ?></p>
</div>
<div class="card-body px-4 pt-0">
<ul class="list-group list-group-flush border-top border-light">
<li class="list-group-item d-flex justify-content-between align-items-center px-0 py-3 bg-transparent">
<span class="small text-muted"><i class="fas fa-phone-alt me-2 text-primary opacity-50"></i><?= _("Standard Fixe") ?></span>
<span class="fw-medium"><?= $this->nettoyer($societeuser['telephoneSociete']) ?></span>
</li>
<li class="list-group-item d-flex justify-content-between align-items-center px-0 py-3 bg-transparent">
<span class="small text-muted"><i class="fas fa-mobile-alt me-2 text-primary opacity-50"></i><?= _("Ligne Directe") ?></span>
<span class="fw-medium"><?= $this->nettoyer($societeuser['portable']) ?></span>
</li>
<li class="list-group-item d-flex justify-content-between align-items-center px-0 py-3 bg-transparent">
<span class="small text-muted"><i class="fas fa-envelope me-2 text-primary opacity-50"></i><?= _("Email Officiel") ?></span>
<span class="fw-medium"><?= $this->nettoyer($societeuser['emailSociete']) ?></span>
</li>
<li class="list-group-item d-flex justify-content-between align-items-center px-0 py-3 bg-transparent border-bottom-0">
<span class="small text-muted"><i class="fas fa-fax me-2 text-primary opacity-50"></i><?= _("Fax") ?></span>
<span class="fw-medium"><?= $this->nettoyer($societeuser['faxSociete']) ?></span>
</li>
</ul>
</div>
</div>
</div>
<div class="col-12">
<div class="card border-0 shadow-sm" style="border-radius: var(--radius-md);">
<div class="card-header bg-white py-3 px-4 border-bottom border-light d-flex align-items-center">
<i class="fas fa-envelope-open-text me-3 text-primary fs-5"></i>
<div>
<h6 class="mb-0 fw-bold"><?= _("Points de Contact par Service") ?></h6>
<p class="mb-0 text-muted small"><?= _("Configuration des passerelles emails pour la gestion automatisée") ?></p>
</div>
</div>
<div class="card-body p-4">
<div class="row g-4">
<?php
$smsFields = [
['l' => 'Téléphone SMS RD', 'v' => 'smsRd'],
['l' => 'Téléphone SMS Médecin Conseil', 'v' => 'smsMedecinConseil'],
['l' => 'Téléphone SMS Bons', 'v' => 'smsGestionBon'],
['l' => 'Téléphone SMS Dérogation', 'v' => 'smsDerogation'],
['l' => 'Téléphone SMS Accord', 'v' => 'smsAccordPrealable'],
$services = [
['l' => 'Médecin Conseil', 'v' => 'emailMedecinConseil', 'i' => 'fa-user-md', 'sms' => 'smsMedecinConseil'],
['l' => 'Gestion des Bons', 'v' => 'emailGestionBon', 'i' => 'fa-ticket-alt', 'sms' => 'smsGestionBon'],
['l' => 'Comptabilité', 'v' => 'emailCcomptabilite', 'i' => 'fa-calculator', 'sms' => null],
['l' => 'Dérogation', 'v' => 'emailDerogation', 'i' => 'fa-exclamation-circle', 'sms' => 'smsDerogation'],
['l' => 'Accord Préalable', 'v' => 'emailAccordPrealable', 'i' => 'fa-check-double', 'sms' => 'smsAccordPrealable'],
['l' => 'Lutte Fraude', 'v' => 'emailFraudeFinger', 'i' => 'fa-fingerprint', 'sms' => null],
['l' => 'Remboursements', 'v' => 'emailRd', 'i' => 'fa-hand-holding-usd', 'sms' => 'smsRd'],
];
foreach($smsFields as $s): ?>
<div class="col-md-4 col-lg-2">
<label class="form-label small text-muted"><?= _($s['l']) ?></label>
<input class="form-control bg-light" type="text" value="<?=$this->nettoyer($societeuser[$s['v']])?>" readonly>
foreach($services as $s): ?>
<div class="col-md-6 col-lg-4 col-xl-3">
<div class="p-3 border rounded shadow-xs h-100 transition-base hover-shadow-sm">
<div class="d-flex align-items-center mb-2">
<i class="fas <?= $s['i'] ?> text-primary opacity-50 me-2"></i>
<span class="small fw-bold text-dark"><?= _($s['l']) ?></span>
</div>
<div class="mb-2">
<label class="text-muted" style="font-size: 0.65rem; text-uppercase; font-weight: 700;"><?= _("Email Service") ?></label>
<div class="small text-truncate text-primary"><?= $this->nettoyer($societeuser[$s['v']]) ?></div>
</div>
<?php if($s['sms']): ?>
<div>
<label class="text-muted" style="font-size: 0.65rem; text-uppercase; font-weight: 700;"><?= _("SMS Alertes") ?></label>
<div class="small text-dark fw-medium"><?= $this->nettoyer($societeuser[$s['sms']]) ?></div>
</div>
<?php endif; ?>
</div>
</div>
<?php endforeach; ?>
</div>
</div>
</div>
</div>
<div class="col-md-4 col-lg-2">
<label class="form-label small text-muted"><?= _("Activer Log Visite Page ?") ?></label>
<select class="form-select bg-light" disabled>
<?php liste_options($visitePage, $this->nettoyer($societeuser['activerLogVisitePages']), true); ?>
</select>
<div class="col-12 mb-5">
<div class="card border-0 shadow-sm" style="border-radius: var(--radius-md); background: linear-gradient(to right, #ffffff, #fdfdfd);">
<div class="card-body p-4">
<div class="row g-4 align-items-center">
<div class="col-md-4 border-end border-light">
<div class="d-flex align-items-center">
<div class="icon-shape bg-warning-ghost text-warning rounded-circle me-3" style="width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;">
<i class="fas fa-chart-line"></i>
</div>
<div class="flex-grow-1">
<label class="form-label small text-muted mb-0"><?= _("Alerte Consommation") ?></label>
<div class="d-flex align-items-center mt-1">
<span class="h4 mb-0 fw-bold text-dark"><?= $this->nettoyer($societeuser['alertLimiteConsommation']) ?></span>
<span class="ms-1 text-muted fw-bold">%</span>
<div class="ms-3 small text-muted text-truncate" style="max-width: 150px;" title="<?= $this->nettoyer($societeuser['emailAlertLimiteConsommation']) ?>">
<i class="fas fa-paper-plane me-1"></i><?= $this->nettoyer($societeuser['emailAlertLimiteConsommation']) ?>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-3 border-end border-light">
<div class="d-flex align-items-center">
<div class="icon-shape bg-danger-ghost text-danger rounded-circle me-3" style="width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;">
<i class="fas fa-shield-alt"></i>
</div>
<div>
<label class="form-label small text-muted mb-0"><?= _("Taux Alerte S/P Max") ?></label>
<div class="h4 mb-0 fw-bold text-danger"><?= $this->nettoyer($societeuser['spMax']) ?> <small class="fs-6">%</small></div>
</div>
</div>
</div>
<div class="col-md-3 border-end border-light">
<div class="d-flex align-items-center">
<div class="icon-shape bg-success-ghost text-success rounded-circle me-3" style="width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;">
<i class="fas fa-credit-card"></i>
</div>
<div>
<label class="form-label small text-muted mb-0"><?= _("Tarif Carte AFN") ?></label>
<div class="h4 mb-0 fw-bold text-dark"><?= format_N($this->nettoyer($societeuser['fraisCarteAN'])) ?> <small class="fs-6 fw-normal text-muted">FCFA</small></div>
</div>
</div>
</div>
<div class="col-md-2">
<label class="form-label small text-muted mb-1"><?= _("Logs Visites") ?></label>
<?php
$logStatus = $this->nettoyer($societeuser['activerLogVisitePages']);
$badgeClass = ($logStatus == 'OUI' || $logStatus == '1') ? 'bg-success' : 'bg-secondary';
?>
<div class="badge <?= $badgeClass ?> d-block py-2 rounded-pill">
<i class="fas fa-history me-1"></i> <?= $logStatus ?>
</div>
</div>
</div>
</div>
@ -194,20 +219,42 @@
</div>
<style>
/* Ajustements spécifiques pour compacité professionnelle */
.form-control, .form-select, .input-group-text {
font-size: 0.85rem !important;
padding: 0.5rem 0.75rem;
/* --- Optimisations spécifiques Thème Modern --- */
.page-content {
font-family: 'DM Sans', sans-serif;
color: var(--text-secondary);
}
.card-header h6 {
color: var(--color-primary);
letter-spacing: 0.02em;
.card {
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hover-shadow-sm:hover {
box-shadow: 0 10px 20px rgba(0,0,0,0.05) !important;
border-color: var(--color-primary-light) !important;
}
.input-group-text {
color: var(--text-muted);
background-color: #f8f9fa;
border-color: #e9ecef;
}
/* Style pour les champs en lecture seule afin qu'ils ne paraissent pas "désactivés" mais "informatifs" */
.form-control[readonly] {
border-color: var(--border-light);
cursor: default;
font-weight: 500;
}
</style>
.bg-primary-ghost { background: rgba(33, 46, 83, 0.08); }
.bg-warning-ghost { background: rgba(243, 156, 18, 0.08); }
.bg-danger-ghost { background: rgba(192, 57, 43, 0.08); }
.bg-success-ghost { background: rgba(39, 174, 96, 0.08); }
.icon-shape {
flex-shrink: 0;
}
/* Scroll intelligent pour la page riche */
body {
scroll-behavior: smooth;
}
</style>