newdesigngestionnaire/Vue/Parametresgeneraux/index.php
2026-03-13 16:15:19 +00:00

255 lines
16 KiB
PHP
Executable File

<div class="page-content">
<input class="sr-only" type="text" id="idSocieteuser" name="idSocieteuser" value="<?= $this->nettoyer($societeuser['idSocieteuser']) ?>">
<div class="header-section mb-1">
<div class="d-flex align-items-center justify-content-between bg-white p-3 shadow-sm border-start border-primary border-4" style="border-radius: var(--radius-md);">
<div class="d-flex align-items-center">
<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-sliders-h fs-4"></i>
</div>
<div>
<h4 id="titre-page" class="mb-0 fw-bold text-uppercase"><?= _("Configuration Globale") ?></h4>
<p class="text-muted small mb-0"><?= _("Profil institutionnel et passerelles de communication du centre") ?></p>
</div>
</div>
<div class="text-end d-none d-md-block">
<span class="badge bg-light text-dark border px-3 py-2 fw-bold" style="border-radius: var(--radius-sm);">
<i class="fas fa-globe me-2 text-primary"></i><?= $this->nettoyer($_SESSION['libelleLang']) ?>
</span>
</div>
</div>
</div>
<div class="row g-1">
<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-primary" style="letter-spacing: 1px;">
<i class="fas fa-id-badge me-2 text-primary"></i><?= _("Profil Institutionnel") ?>
</h6>
</div>
<div class="card-body p-4">
<div class="row g-3">
<div class="col-md-3">
<label class="form-label small text-dark 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-dark 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-dark 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 bg-primary-ghost">
<div class="col-md-6">
<label class="form-label small text-dark fw-bold"><i class="fas fa-map-marker-alt me-1 text-primary"></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-dark fw-bold"><i class="fas fa-box me-1 text-primary"></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-dark fw-bold"><?= _("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-dark fw-bold"><?= _("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>
</div>
</div>
</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 text-primary"><?= $this->nettoyer($societeuser['nomResponsable']) ?></h6>
<p class="text-primary 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-dark fw-bold"><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-dark fw-bold"><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-dark fw-bold"><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-dark fw-bold"><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 text-primary"><?= _("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
$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($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-dark" 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-dark" 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-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-dark 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-dark fw-bold">%</span>
<div class="ms-3 small text-dark 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-dark 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-dark 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-dark">FCFA</small></div>
</div>
</div>
</div>
<div class="col-md-2">
<label class="form-label small text-dark 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>
</div>
</div>
</div>
</div>
<style>
/* --- Optimisations spécifiques Thème Modern --- */
.page-content {
font-family: 'DM Sans', sans-serif;
color: var(--text-secondary);
}
.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 {
background-color: #f8f9fa;
border-color: #e9ecef;
}
.form-control[readonly] {
cursor: default;
font-weight: 500;
}
.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>