Merge branch 'main' of https://git.ebene.ovh/ebene/newdesigngestionnaire
This commit is contained in:
commit
e0c0239452
1184
Bootstrap_new/css/theme-modern.css
Normal file
1184
Bootstrap_new/css/theme-modern.css
Normal file
File diff suppressed because it is too large
Load Diff
1374
Js/fonctions.js
1374
Js/fonctions.js
File diff suppressed because it is too large
Load Diff
|
|
@ -1,107 +1,125 @@
|
|||
<div class="container-fluid py-4">
|
||||
<div class="card border-0 shadow-sm mb-4">
|
||||
<form id="frmrecherche" method="post" action="Recherche/index/">
|
||||
<div class="card shadow-sm mb-4">
|
||||
<div class="card-header bg-white py-3">
|
||||
<h5 class="mb-0 text-primary fw-bold">
|
||||
<i class="fas fa-search me-2"></i><?= _("Critères de recherche de l'assuré") ?>
|
||||
<h5 class="card-title mb-0">
|
||||
<i class="fas fa-search me-2" style="color: var(--primary-color);"></i>
|
||||
<?= _("Critères de recherche de l'assuré") ?>
|
||||
</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form id="frmrecherche" name="frmrecherche" method="post" action="Recherche/index/">
|
||||
<div class="row g-3">
|
||||
<div class="col-md-3">
|
||||
<label class="form-label small fw-bold"><?= _("Numéro Bénéficiaire") ?></label>
|
||||
<input class="form-control" type="text" id="numeroBeneficiaire" name="numeroBeneficiaire" autofocus>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label class="form-label small fw-bold"><?= _("Numéro Famille") ?></label>
|
||||
<input class="form-control" type="text" id="numeroAdherent" name="numeroAdherent">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label class="form-label small fw-bold"><?= _("Nom") ?></label>
|
||||
<input class="form-control" type="text" id="nomBeneficiaire" name="nomBeneficiaire">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label class="form-label small fw-bold"><?= _("Prénoms") ?></label>
|
||||
<input class="form-control" type="text" id="prenomsBeneficiaire" name="prenomsBeneficiaire">
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label class="form-label small fw-bold">Tel</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-text bg-light"><i class="fa fa-phone fa-xs"></i></span>
|
||||
<input class="form-control" type="text" id="telephonePortable" name="telephonePortable">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label class="form-label small fw-bold">E-mail</label>
|
||||
<input class="form-control" type="email" id="email" name="email">
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 d-flex align-items-end justify-content-end">
|
||||
<button type="submit" class="btn btn-primary px-4 shadow-sm">
|
||||
<i class="fa fa-search me-2"></i> <?= _("Rechercher") ?>
|
||||
</button>
|
||||
</div>
|
||||
<div class="row g-3">
|
||||
<div class="col-md-3">
|
||||
<label class="form-label"><?= _("Numéro Bénéficiaire") ?></label>
|
||||
<input type="text" class="form-control" id="numeroBeneficiaire" name="numeroBeneficiaire" autofocus>
|
||||
</div>
|
||||
</form>
|
||||
<div class="col-md-3">
|
||||
<label class="form-label"><?= _("Numéro Famille") ?></label>
|
||||
<input type="text" class="form-control" id="numeroAdherent" name="numeroAdherent">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label class="form-label"><?= _("Nom") ?></label>
|
||||
<input type="text" class="form-control" id="nomBeneficiaire" name="nomBeneficiaire">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label class="form-label"><?= _("Prénoms") ?></label>
|
||||
<input type="text" class="form-control" id="prenomsBeneficiaire" name="prenomsBeneficiaire">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label class="form-label"><?= _("Tél.") ?></label>
|
||||
<input type="text" class="form-control" id="telephonePortable" name="telephonePortable">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label class="form-label">E-mail</label>
|
||||
<input type="email" class="form-control" id="email" name="email">
|
||||
</div>
|
||||
<div class="col-md-12 text-end">
|
||||
<button type="submit" class="btn btn-primary px-5">
|
||||
<i class="fas fa-search me-2"></i><?= _("Rechercher") ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if (is_array($derniernumerobeneficiaires) && $derniernumerobeneficiaires['nouveau'] > 0): ?>
|
||||
<div class="alert alert-warning border-0 shadow-sm d-flex align-items-center" role="alert">
|
||||
<i class="fa-solid fa-triangle-exclamation fs-4 me-3 text-danger"></i>
|
||||
<div>
|
||||
<strong><?= _("Alerte de remplacement") ?> :</strong>
|
||||
<?= _("Carte") ?> <span class="badge bg-danger"><?= $derniernumerobeneficiaires['ancien'] ?></span>
|
||||
<?= _("remplacée par") ?> <span class="badge bg-success"><?= $derniernumerobeneficiaires['nouveau'] ?></span>.
|
||||
</div>
|
||||
<?php
|
||||
// CORRECTION : Vérifier que $derniernumerobeneficiaires est un tableau ET qu'il contient 'nouveau'
|
||||
if (isset($derniernumerobeneficiaires) && is_array($derniernumerobeneficiaires) && isset($derniernumerobeneficiaires['nouveau']) && $derniernumerobeneficiaires['nouveau'] > 0):
|
||||
?>
|
||||
<div class="alert alert-warning alert-dismissible fade show" role="alert">
|
||||
<i class="fas fa-exclamation-triangle me-2"></i>
|
||||
<?= _("Cette carte") ?> => <?= $derniernumerobeneficiaires['ancien'] ?? '' ?>
|
||||
<?= _("a été déclarée perdue et remplacée par") ?> => <?= $derniernumerobeneficiaires['nouveau'] ?? '' ?>.
|
||||
<?= _("Veuillez ne pas le communiquer sans autorisation.") ?>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="card border-0 shadow-sm">
|
||||
<div class="card-header bg-white d-flex justify-content-between align-items-center py-3">
|
||||
<h5 class="mb-0 fw-bold"><?= _("Résultats de la recherche") ?></h5>
|
||||
<span class="badge bg-info"><?= count($beneficiaires) ?> <?= _("trouvés") ?></span>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||
<h5 class="mb-0"><?= _("Résultats de la recherche") ?></h5>
|
||||
<?php if (isset($beneficiaires) && is_array($beneficiaires) && count($beneficiaires) > 0): ?>
|
||||
<span class="badge bg-primary"><?= count($beneficiaires) ?> <?= _("résultat(s)") ?></span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php if (isset($beneficiaires) && is_array($beneficiaires) && count($beneficiaires) > 0): ?>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover align-middle mb-0">
|
||||
<thead class="table-light">
|
||||
<tr class="small text-uppercase text-muted">
|
||||
<th><?= _("Bénéficiaire") ?></th>
|
||||
<th><?= _("Identité") ?></th>
|
||||
<th><?= _("Parenté") ?></th>
|
||||
<th class="text-center"><?= _("Infos") ?></th>
|
||||
<table class="table table-hover align-middle datatable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?= _("Numéro Bénéficiaire") ?></th>
|
||||
<th><?= _("Numéro Famille") ?></th>
|
||||
<th><?= _("Nom") ?></th>
|
||||
<th><?= _("Prénoms") ?></th>
|
||||
<th><?= _("Lien") ?></th>
|
||||
<th><?= _("Naissance") ?></th>
|
||||
<th><?= _("Genre") ?></th>
|
||||
<th><?= _("Tél") ?></th>
|
||||
<th><?= _("Souscripteur") ?></th>
|
||||
<th class="text-center"><?= _("État") ?></th>
|
||||
<th><?= _("Etat") ?></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($beneficiaires as $beneficiaire): ?>
|
||||
<tr class="cursor-pointer" onclick="..." style="cursor: pointer;">
|
||||
<?php foreach ($beneficiaires as $beneficiaire):
|
||||
$idBeneficiaire = $this->nettoyer($beneficiaire['id'] ?? '');
|
||||
$numeroBeneficiaire = $this->nettoyer($beneficiaire['numeroBeneficiaire'] ?? '');
|
||||
?>
|
||||
<tr onclick="selectionner_beneficiaire(<?= $idBeneficiaire ?>,'<?= $numeroBeneficiaire ?>');afficher_beneficiaire_id();" style="cursor: pointer;">
|
||||
<td><span class="badge bg-light text-dark"><?= $numeroBeneficiaire ?></span></td>
|
||||
<td><?= $this->nettoyer($beneficiaire['numeroAdherent'] ?? '') ?></td>
|
||||
<td><strong><?= $this->nettoyer($beneficiaire['nomBeneficiaire'] ?? '') ?></strong></td>
|
||||
<td><?= $this->nettoyer($beneficiaire['prenomsBeneficiaire'] ?? '') ?></td>
|
||||
<td><?= $this->nettoyer($beneficiaire['codeLienParente'] ?? '') ?></td>
|
||||
<td><?= isset($beneficiaire['dateNaissance']) ? dateLang($this->nettoyer($beneficiaire['dateNaissance'])) : '' ?></td>
|
||||
<td><?= $this->nettoyer($beneficiaire['sexe'] ?? '') ?></td>
|
||||
<td><?= $this->nettoyer($beneficiaire['telephonePortable'] ?? '') ?></td>
|
||||
<td><?= $this->nettoyer($beneficiaire['nomClient'] ?? '') ?></td>
|
||||
<td>
|
||||
<span class="fw-bold text-primary">#<?= $beneficiaire['numeroBeneficiaire'] ?></span><br>
|
||||
<small class="text-muted">Fam: <?= $beneficiaire['numeroAdherent'] ?></small>
|
||||
</td>
|
||||
<td>
|
||||
<div class="fw-bold"><?= strtoupper($beneficiaire['nomBeneficiaire']) ?></div>
|
||||
<div class="small"><?= $beneficiaire['prenomsBeneficiaire'] ?></div>
|
||||
</td>
|
||||
<td><span class="badge bg-light text-dark border"><?= $beneficiaire['codeLienParente'] ?></span></td>
|
||||
<td class="small text-center">
|
||||
<?= $beneficiaire['sexe'] ?> | <?= dateLang($beneficiaire['dateNaissance']) ?><br>
|
||||
<i class="fa fa-phone text-muted me-1"></i><?= $beneficiaire['telephonePortable'] ?>
|
||||
</td>
|
||||
<td class="small fw-bold"><?= $beneficiaire['nomClient'] ?></td>
|
||||
<td class="text-center">
|
||||
<?php
|
||||
$statusClass = ($beneficiaire['codeEtatBeneficiaire'] == 'ACTIF') ? 'bg-success' : 'bg-secondary';
|
||||
$etat = $this->nettoyer($beneficiaire['codeEtatBeneficiaire'] ?? '');
|
||||
$badgeClass = match($etat) {
|
||||
'ACT' => 'bg-success',
|
||||
'SUS' => 'bg-warning',
|
||||
'RAD' => 'bg-danger',
|
||||
default => 'bg-secondary'
|
||||
};
|
||||
?>
|
||||
<span class="badge rounded-pill <?= $statusClass ?>"><?= $beneficiaire['codeEtatBeneficiaire'] ?></span>
|
||||
<span class="badge <?= $badgeClass ?>"><?= $etat ?></span>
|
||||
</td>
|
||||
<td>
|
||||
<button class="btn btn-sm btn-outline-primary" onclick="event.stopPropagation();afficher_beneficiaire(<?= $idBeneficiaire ?>)">
|
||||
<i class="fas fa-eye"></i>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="text-center py-5 text-muted">
|
||||
<i class="fas fa-search fa-3x mb-3"></i>
|
||||
<p><?= _("Aucun résultat trouvé") ?></p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</form>
|
||||
267
Vue/contexte.php
267
Vue/contexte.php
|
|
@ -1,267 +0,0 @@
|
|||
<!-- ======= Context Bar ======= -->
|
||||
<input type="hidden" id="numeroClient_C" name="numeroClient_C" value="<?= $this->nettoyer($_SESSION['numeroClient_C']) ?>">
|
||||
<input type="hidden" id="codeGcAssureur_C" name="codeGcAssureur_C" value="<?= $this->nettoyer($_SESSION['codeGcAssureur_C']) ?>">
|
||||
|
||||
<!-- Context Panel -->
|
||||
<div id="barre_laterale_d" class="context-panel shadow-lg">
|
||||
<div class="context-header bg-primary text-white py-3 px-4 d-flex justify-content-between align-items-center">
|
||||
<div class="d-flex align-items-center">
|
||||
<i class="fas fa-cog fa-spin me-2"></i>
|
||||
<h6 class="mb-0 fw-bold"><?= _("Panneau contexte") ?></h6>
|
||||
</div>
|
||||
<button class="btn btn-sm btn-light" id="hideSideNav" title="<?= _("Cacher le contexte") ?>">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="context-body p-3 context-scrollable">
|
||||
|
||||
<!-- Garant -->
|
||||
<div class="context-card card border-0 shadow-sm mb-3">
|
||||
<div class="card-header bg-light py-2 px-3">
|
||||
<h6 class="mb-0">
|
||||
<i class="fas fa-user-shield me-2 text-primary"></i>
|
||||
<?= _("Garant") ?>
|
||||
</h6>
|
||||
</div>
|
||||
<div class="card-body p-3">
|
||||
<div class="d-flex align-items-center mb-2">
|
||||
<div class="badge bg-primary bg-opacity-10 text-primary rounded-pill me-2 py-1 px-2">
|
||||
<?= $this->nettoyer($_SESSION['codeGcAssureur_C']) ?>
|
||||
</div>
|
||||
<a href="javascript:afficher_garant('<?= $this->nettoyer($_SESSION['codeGcAssureur_C']) ?>');"
|
||||
class="ms-auto small text-primary text-decoration-none">
|
||||
<i class="fas fa-external-link-alt"></i>
|
||||
</a>
|
||||
</div>
|
||||
<button class="btn btn-outline-primary btn-sm w-100 text-start py-2 context-button"
|
||||
onclick="javascript:afficher_garant('<?= $this->nettoyer($_SESSION['codeGcAssureur_C']) ?>');"
|
||||
title="<?= _("Afficher le Garant") ?>">
|
||||
<div class="d-flex align-items-center">
|
||||
<i class="fas fa-building me-2"></i>
|
||||
<span class="text-truncate"><?= $_SESSION['nomGcAssureur_C'] ?? '' ?></span>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Souscripteur -->
|
||||
<div class="context-card card border-0 shadow-sm mb-3">
|
||||
<div class="card-header bg-light py-2 px-3">
|
||||
<h6 class="mb-0">
|
||||
<i class="fas fa-user-tie me-2 text-primary"></i>
|
||||
<?= _("Souscripteur") ?>
|
||||
</h6>
|
||||
</div>
|
||||
<div class="card-body p-3">
|
||||
<div class="d-flex align-items-center mb-2">
|
||||
<div class="badge bg-primary bg-opacity-10 text-primary rounded-pill me-2 py-1 px-2">
|
||||
<?= $this->nettoyer($_SESSION['numeroClient_C']) ?>
|
||||
</div>
|
||||
<a href="javascript:afficher_client_id();"
|
||||
class="ms-auto small text-primary text-decoration-none">
|
||||
<i class="fas fa-external-link-alt"></i>
|
||||
</a>
|
||||
</div>
|
||||
<button class="btn btn-outline-primary btn-sm w-100 text-start py-2 context-button"
|
||||
onclick="javascript:afficher_client_id();">
|
||||
<div class="d-flex align-items-center">
|
||||
<i class="fas fa-user me-2"></i>
|
||||
<span class="text-truncate"><?= $this->nettoyer($_SESSION['nomClient_C']) ?></span>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Police en cours -->
|
||||
<div class="context-card card border-0 shadow-sm mb-3">
|
||||
<div class="card-body p-3">
|
||||
<button class="btn btn-primary btn-sm w-100 text-start py-2 mb-2 context-button"
|
||||
onclick="javascript:afficher_police_id();"
|
||||
title="<?= _("Couverture") . ": " . dateLang($_SESSION['dateEffet_C'], $_SESSION['lang']) . ' - ' . dateLang($_SESSION['dateEcheance_C'], $_SESSION['lang']) ?>">
|
||||
<div class="d-flex align-items-center">
|
||||
<i class="fas fa-file-contract me-2"></i>
|
||||
<div class="flex-grow-1">
|
||||
<div class="fw-bold small"><?= _("Police en cours") ?></div>
|
||||
<div class="x-small"><?= $this->nettoyer($_SESSION['numeroPolice_C']) ?></div>
|
||||
</div>
|
||||
<i class="fas fa-chevron-right"></i>
|
||||
</div>
|
||||
</button>
|
||||
|
||||
<!-- Statistiques -->
|
||||
<div class="stats-container bg-light rounded p-2 mb-3">
|
||||
<div class="row text-center g-2">
|
||||
<div class="col-4">
|
||||
<div class="bg-white rounded p-2 context-stats-item">
|
||||
<div class="fw-bold text-primary"><?= format_N($_SESSION['ndAdh_C']) ?></div>
|
||||
<div class="x-small text-muted"><?= _("Fam.") ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="bg-white rounded p-2 context-stats-item">
|
||||
<div class="fw-bold text-success"><?= format_N($_SESSION['ndDep_C']) ?></div>
|
||||
<div class="x-small text-muted"><?= _("Dép.") ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="bg-white rounded p-2 context-stats-item">
|
||||
<div class="fw-bold text-info"><?= format_N($_SESSION['ndActif_C']) ?></div>
|
||||
<div class="x-small text-muted"><?= _("Bén.") ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Famille en cours -->
|
||||
<button class="btn btn-outline-primary btn-sm w-100 text-start py-2 mb-2 context-button"
|
||||
onclick="javascript:afficher_adherent_id();"
|
||||
title="<?= _("Voir les membres de famille") ?>">
|
||||
<div class="d-flex align-items-center">
|
||||
<i class="fas fa-users me-2"></i>
|
||||
<div class="flex-grow-1">
|
||||
<div class="fw-bold small"><?= _("Famille") ?> <?= $this->nettoyer($_SESSION['numeroAdherent_C']) ?></div>
|
||||
<div class="x-small text-truncate context-text-truncate"><?= substr($this->nettoyer($_SESSION['adherent_C']), 0, 25) ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
|
||||
<!-- Bénéficiaire en cours -->
|
||||
<button class="btn btn-outline-primary btn-sm w-100 text-start py-2 context-button"
|
||||
onclick="javascript:afficher_beneficiaire_id();"
|
||||
title="<?= _("Couverture") . ": " . dateLang($_SESSION['dateEntreeBeneficiaire_C'], $_SESSION['lang']) . ' - ' . dateLang($_SESSION['dateEcheancePolice_C'], $_SESSION['lang']) ?>">
|
||||
<div class="d-flex align-items-center">
|
||||
<i class="fas fa-user me-2"></i>
|
||||
<div class="flex-grow-1">
|
||||
<div class="fw-bold small"><?= _("Bénéficiaire") ?> <?= $this->nettoyer($_SESSION['numeroBeneficiaire_C']) ?></div>
|
||||
<div class="x-small text-truncate context-text-truncate"><?= substr($this->nettoyer($_SESSION['beneficiaire_C']), 0, 25) ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Photo du bénéficiaire -->
|
||||
<?php if ($_SESSION['faceRegistered_C'] == "1" && $_SESSION['idBeneficiaire_C'] > "0"): ?>
|
||||
<div class="context-card card border-0 shadow-sm mb-3">
|
||||
<div class="card-body p-3 text-center">
|
||||
<div class="photo-wrapper mb-2">
|
||||
<img src="data:image/jpg;base64,<?= $imgData ?>"
|
||||
class="img-fluid rounded-circle shadow-sm border border-3 border-primary context-photo"
|
||||
data-bs-toggle="modal"
|
||||
data-bs-target="#pop_photo"
|
||||
alt="<?= _("Photo du bénéficiaire") ?>"
|
||||
title="<?= _("Cliquer pour agrandir") ?>">
|
||||
</div>
|
||||
<div class="small text-muted"><?= _("Photo du bénéficiaire") ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- Dernières polices ouvertes -->
|
||||
<div class="context-card card border-0 shadow-sm mb-3">
|
||||
<div class="card-header bg-light py-2 px-3">
|
||||
<h6 class="mb-0">
|
||||
<i class="fas fa-history me-2 text-primary"></i>
|
||||
<?= _("Dernières polices") ?>
|
||||
</h6>
|
||||
</div>
|
||||
<div class="card-body p-3">
|
||||
<div class="list-group list-group-flush context-list">
|
||||
<?php foreach ($_SESSION['contextPolice'] as $index => $contextPolice): ?>
|
||||
<?php if ($index < 5): ?>
|
||||
<a href="javascript:selectionner_police(<?= $contextPolice['idPolice'] ?>,'<?= $contextPolice['numeroPolice'] ?>');afficher_police_id();"
|
||||
class="list-group-item list-group-item-action border-0 py-2 px-0 context-list-item">
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="badge bg-primary bg-opacity-10 text-primary rounded-circle me-2 d-flex align-items-center justify-content-center context-badge-index">
|
||||
<?= $index + 1 ?>
|
||||
</div>
|
||||
<div class="flex-grow-1">
|
||||
<div class="small fw-medium"><?= htmlspecialchars($contextPolice['libellePolice']) ?></div>
|
||||
<div class="x-small text-muted"><?= $contextPolice['numeroPolice'] ?></div>
|
||||
</div>
|
||||
<i class="fas fa-chevron-right text-muted"></i>
|
||||
</div>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Actions rapides -->
|
||||
<div class="context-card card border-0 shadow-sm mb-3">
|
||||
<div class="card-body p-3">
|
||||
<div class="row g-2">
|
||||
<div class="col-6">
|
||||
<button class="btn btn-outline-primary btn-sm w-100 py-2 context-action-button"
|
||||
onclick="javascript:gerer_messagerie();">
|
||||
<i class="fas fa-comments me-1"></i>
|
||||
<span class="d-none d-md-inline"><?= _("Messages") ?></span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<button class="btn btn-outline-primary btn-sm w-100 py-2 context-action-button"
|
||||
onclick="javascript:change_password();">
|
||||
<i class="fas fa-key me-1"></i>
|
||||
<span class="d-none d-md-inline"><?= est_anglophone() ? 'Password' : 'MDP' ?></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Mode cotation -->
|
||||
<?php if ($_SESSION['modeDevis'] == "1"): ?>
|
||||
<div class="context-card card border-0 shadow-sm mb-3 border-warning">
|
||||
<div class="card-header bg-warning bg-opacity-10 py-2 px-3">
|
||||
<h6 class="mb-0 text-warning">
|
||||
<i class="fas fa-file-invoice me-2"></i>
|
||||
<?= _("GESTION DES COTATIONS") ?>
|
||||
</h6>
|
||||
</div>
|
||||
<div class="card-body p-3">
|
||||
<!-- Prospect -->
|
||||
<button class="btn btn-outline-warning btn-sm w-100 text-start py-2 mb-2 context-button"
|
||||
onclick="javascript:afficher_client_d_id();">
|
||||
<div class="d-flex align-items-center">
|
||||
<i class="fas fa-user-clock me-2"></i>
|
||||
<div class="flex-grow-1">
|
||||
<div class="fw-bold small"><?= _("Prospect") ?></div>
|
||||
<div class="x-small"><?= $this->nettoyer($_SESSION['numeroClient_d_C']) ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
<div class="small text-muted mb-3 text-truncate context-text-truncate-long">
|
||||
<?= substr($this->nettoyer($_SESSION['nomClient_d_C']), 0, 30) ?>
|
||||
</div>
|
||||
|
||||
<!-- Police devis -->
|
||||
<button class="btn btn-warning btn-sm w-100 text-start py-2 context-button"
|
||||
onclick="javascript:afficher_police_d_id_init();">
|
||||
<div class="d-flex align-items-center">
|
||||
<i class="fas fa-file-invoice-dollar me-2"></i>
|
||||
<div class="flex-grow-1">
|
||||
<div class="fw-bold small"><?= _("Devis") ?></div>
|
||||
<div class="x-small"><?= $this->nettoyer($_SESSION['numeroPolice_d_C']) ?></div>
|
||||
</div>
|
||||
<i class="fas fa-chevron-right"></i>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="context-footer bg-light py-2 px-3 border-top">
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<small class="text-muted">© <?= date('Y') ?> INTER SANTE</small>
|
||||
<div id="nbMessagesNonLus" class="badge bg-danger rounded-pill">
|
||||
<i class="fas fa-envelope me-1"></i>
|
||||
<span id="msgNonLus">0</span>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" id="timer" name="timer" value="0">
|
||||
</div>
|
||||
</div>
|
||||
<!-- End Context Bar -->
|
||||
1154
Vue/gabarit.php
1154
Vue/gabarit.php
File diff suppressed because it is too large
Load Diff
182
Vue/head.php
182
Vue/head.php
|
|
@ -1,182 +0,0 @@
|
|||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no, viewport-fit=cover">
|
||||
<meta name="description" content="INTER SANTÉ - Gestionnaire de santé">
|
||||
<meta name="author" content="INTER SANTÉ">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<meta name="theme-color" content="#0088cf">
|
||||
|
||||
<!-- Pour PWA/iOS - Version corrigée -->
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
||||
<meta name="apple-mobile-web-app-title" content="INTER SANTÉ">
|
||||
|
||||
<base href="<?= $racineWeb ?>">
|
||||
|
||||
<!-- Favicon -->
|
||||
<link rel="icon" href="Bootstrap_new/images/favicon.ico" type="image/x-icon">
|
||||
<link rel="icon" href="Bootstrap_new/images/favicon-32x32.png" type="image/png" sizes="32x32">
|
||||
<link rel="icon" href="Bootstrap_new/images/favicon-16x16.png" type="image/png" sizes="16x16">
|
||||
<link rel="apple-touch-icon" href="Bootstrap_new/images/apple-touch-icon.png">
|
||||
|
||||
<!-- Preconnect pour améliorer les performances -->
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net">
|
||||
<link rel="dns-prefetch" href="https://cdnjs.cloudflare.com">
|
||||
|
||||
<!-- Google Fonts -->
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@400;500;600&display=swap"
|
||||
rel="stylesheet"
|
||||
crossorigin="anonymous">
|
||||
|
||||
<!-- Bootstrap 5 CSS -->
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css"
|
||||
rel="stylesheet"
|
||||
integrity="sha384-9ndCyUaIbzAi2FUVXJi0CjmCapSmO7SnpJef0486qhLnuZ2cdeRhO02iuK6FUUVM"
|
||||
crossorigin="anonymous">
|
||||
|
||||
<!-- Font Awesome -->
|
||||
<link rel="stylesheet"
|
||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css"
|
||||
integrity="sha512-Avb2QiuDEEvB4bZJYdft2mNjVShBftLdPG8FJ0V7irTLQ8Uo0qcPxh4Plq7G5tGm0rU+1SPhVotteLpBERwTkw=="
|
||||
crossorigin="anonymous"
|
||||
referrerpolicy="no-referrer">
|
||||
|
||||
<!-- Bootstrap Icons -->
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.0/font/bootstrap-icons.css">
|
||||
|
||||
<!-- Vendor CSS -->
|
||||
<link href="Bootstrap/vendor/boxicons/css/boxicons.min.css" rel="stylesheet">
|
||||
|
||||
<!-- Toastr CSS -->
|
||||
<link rel="stylesheet"
|
||||
href="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.css"
|
||||
integrity="sha512-vKMx8UnXk60zUwyUnUPM3HbQo8QfmNx7+ltw8Pm5zLusl1XIfwcxo8DbWCqMGKaWeNxWA8yrx5v3SaVpMvR3CA=="
|
||||
crossorigin="anonymous"
|
||||
referrerpolicy="no-referrer">
|
||||
|
||||
<!-- SweetAlert2 -->
|
||||
<link href="https://cdn.jsdelivr.net/npm/sweetalert2@11.14.1/dist/sweetalert2.min.css"
|
||||
rel="stylesheet">
|
||||
|
||||
<!-- Animate.css -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css">
|
||||
|
||||
<!-- Bootstrap Select CSS (si vous l'utilisez) -->
|
||||
<?php if (isset($needBootstrapSelect) && $needBootstrapSelect): ?>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-select@1.14.0-beta3/dist/css/bootstrap-select.min.css">
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- Vendor CSS spécifiques (chargement conditionnel) -->
|
||||
<?php
|
||||
$current_page = $_SERVER['REQUEST_URI'] ?? '';
|
||||
$needQuill = strpos($current_page, 'quill') !== false;
|
||||
$needDatatables = isset($needDatatables) ? $needDatatables : false;
|
||||
$needSelect2 = isset($needSelect2) ? $needSelect2 : false;
|
||||
$needBootstrapSelect = isset($needBootstrapSelect) ? $needBootstrapSelect : false;
|
||||
?>
|
||||
|
||||
<?php if ($needQuill): ?>
|
||||
<link href="Bootstrap/vendor/quill/quill.snow.css" rel="stylesheet">
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($needDatatables): ?>
|
||||
<link href="Bootstrap_new/css/datatables.min.css" rel="stylesheet">
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($needSelect2): ?>
|
||||
<link href="Bootstrap_new/css/select2.min.css" rel="stylesheet">
|
||||
<link href="Bootstrap_new/css/select2-bootstrap-5-theme.min.css" rel="stylesheet">
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- Styles personnalisés -->
|
||||
<link href="Bootstrap_new/css/style_moderne.css?ver=<?= date('Y.m.d.H') ?>" rel="stylesheet">
|
||||
|
||||
<title><?= htmlspecialchars($_SESSION['vue'] ?? 'Dashboard') ?> - INTER SANTÉ</title>
|
||||
|
||||
<!-- Scripts de prévention de clic droit - Version optimisée -->
|
||||
<script type="text/javascript">
|
||||
// Fonction safe pour toastr
|
||||
window.safeToastr = function() {
|
||||
if (typeof toastr !== 'undefined') {
|
||||
return toastr;
|
||||
}
|
||||
return {
|
||||
warning: function(msg) { console.warn('TOASTR:', msg); },
|
||||
error: function(msg) { console.error('TOASTR:', msg); },
|
||||
success: function(msg) { console.log('TOASTR:', msg); },
|
||||
info: function(msg) { console.info('TOASTR:', msg); }
|
||||
};
|
||||
};
|
||||
|
||||
var modeDev = <?= json_encode($modeDev ?? '0') ?>;
|
||||
|
||||
// Protection en mode production seulement
|
||||
if (modeDev != "1") {
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
var toastr = window.safeToastr();
|
||||
|
||||
// Prévention clic droit
|
||||
document.addEventListener('contextmenu', function(e) {
|
||||
e.preventDefault();
|
||||
toastr.warning('<?= _("Le clic droit est désactivé en mode production") ?>');
|
||||
}, { passive: false });
|
||||
|
||||
// Prévention des raccourcis clavier
|
||||
var blockedKeys = {
|
||||
85: 'Ctrl+U (code source)',
|
||||
123: 'F12 (outils de développement)',
|
||||
73: 'Ctrl+Shift+I',
|
||||
74: 'Ctrl+Shift+J',
|
||||
67: 'Ctrl+Shift+C'
|
||||
};
|
||||
|
||||
document.addEventListener('keydown', function(e) {
|
||||
// Ctrl+U, Ctrl+Shift+I, etc.
|
||||
if (e.ctrlKey && blockedKeys[e.keyCode]) {
|
||||
e.preventDefault();
|
||||
toastr.warning('<?= _("Cette fonctionnalité est désactivée") ?>: ' + blockedKeys[e.keyCode]);
|
||||
return false;
|
||||
}
|
||||
|
||||
// F12 seul
|
||||
if (e.keyCode === 123) {
|
||||
e.preventDefault();
|
||||
toastr.warning('<?= _("Les outils de développement sont désactivés") ?>');
|
||||
return false;
|
||||
}
|
||||
|
||||
// Ctrl+Shift avec I, J, C
|
||||
if (e.ctrlKey && e.shiftKey && [73, 74, 67].includes(e.keyCode)) {
|
||||
e.preventDefault();
|
||||
toastr.warning('<?= _("Cette fonctionnalité est désactivée") ?>');
|
||||
return false;
|
||||
}
|
||||
}, { passive: false });
|
||||
});
|
||||
}
|
||||
|
||||
// Initialiser le panneau de contexte
|
||||
window.initializeContextPanel = function() {
|
||||
// Cette fonction sera appelée après le chargement de jQuery
|
||||
if (typeof $ !== 'undefined') {
|
||||
$(document).on('click', '#showSideNav', function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
$('#barre_laterale_d').addClass('active');
|
||||
$(this).hide();
|
||||
});
|
||||
|
||||
$(document).on('click', '#hideSideNav', function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
$('#barre_laterale_d').removeClass('active');
|
||||
$('#showSideNav').show();
|
||||
});
|
||||
}
|
||||
};
|
||||
</script>
|
||||
</head>
|
||||
206
Vue/header.php
206
Vue/header.php
|
|
@ -1,206 +0,0 @@
|
|||
<body class="bg-light">
|
||||
<?php
|
||||
$style = "";
|
||||
$test = "";
|
||||
$colorTests = "";
|
||||
|
||||
$flag = est_anglophone() ? 'england.png' : 'france.png';
|
||||
$alt = est_anglophone() ? 'English' : 'Français';
|
||||
$lib = est_anglophone() ? 'En' : 'Fr';
|
||||
|
||||
if ($_SESSION['bdTests_C'] == "1") {
|
||||
$colorTests = $_SESSION['colorTests'];
|
||||
$style = "background: linear-gradient(90deg, $colorTests, lighten($colorTests, 10%)) !important;";
|
||||
$test = "MODE TEST";
|
||||
}
|
||||
?>
|
||||
|
||||
<!-- ======= Header ======= -->
|
||||
<header id="header" class="header fixed-top d-flex align-items-center shadow-sm" style="<?= $style ?>">
|
||||
<div class="container-fluid d-flex align-items-center justify-content-between">
|
||||
|
||||
<!-- Logo et bouton menu -->
|
||||
<div class="d-flex align-items-center">
|
||||
<a class="logo d-flex align-items-center text-decoration-none me-4">
|
||||
<img src="Bootstrap_new/images/new/favicon.png" alt="Logo INTER SANTÉ" class="img-fluid">
|
||||
<span class="ms-2">INTER SANTE</span>
|
||||
</a>
|
||||
|
||||
<i class="fas fa-bars toggle-sidebar-btn" onclick="toggleSidebar()" style="cursor: pointer;"></i>
|
||||
</div>
|
||||
|
||||
<!-- Breadcrumb intégré dans le header -->
|
||||
<div class="header-breadcrumb mx-4 flex-grow-1">
|
||||
<nav aria-label="breadcrumb" class="mb-0">
|
||||
<ol class="breadcrumb mb-0 bg-transparent p-0">
|
||||
<li class="breadcrumb-item">
|
||||
<a href="<?= $_SESSION['retourVue'] ?? '#' ?>"
|
||||
class="text-decoration-none text-muted small d-flex align-items-center text-uppercase">
|
||||
<?= $_SESSION['titreRetour'] ?? '' ?>
|
||||
</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active text-primary fw-bold small text-uppercase"
|
||||
aria-current="page">
|
||||
<i class="fas fa-chevron-right mx-2 text-muted"></i>
|
||||
<?= $_SESSION['descriptionVue'] ?? '' ?>
|
||||
</li>
|
||||
</ol>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<!-- Navigation droite -->
|
||||
<nav class="header-nav ms-auto">
|
||||
<ul class="d-flex align-items-center list-unstyled mb-0">
|
||||
<!-- Mode Test -->
|
||||
<?php if ($test): ?>
|
||||
<li class="nav-item me-3">
|
||||
<a class="nav-link p-2 badge bg-warning text-dark fw-bold"
|
||||
href="javascript:void(0);"
|
||||
data-bs-toggle="tooltip"
|
||||
title="<?= _("Mode test activé") ?>">
|
||||
<i class="fas fa-vial me-1"></i> <?= $test ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- Notifications -->
|
||||
<li class="nav-item dropdown me-3">
|
||||
<a class="nav-link position-relative p-2"
|
||||
href="#"
|
||||
data-bs-toggle="dropdown"
|
||||
aria-expanded="false"
|
||||
data-bs-toggle="tooltip"
|
||||
title="<?= _("Notifications") ?>">
|
||||
<i class="fas fa-bell fs-5 text-secondary"></i>
|
||||
<span id="span_notification"
|
||||
class="badge bg-danger badge-number">0</span>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-end border-0 shadow-lg p-0" style="width: 320px;">
|
||||
<div class="dropdown-header bg-primary text-white py-3 px-4 rounded-top">
|
||||
<h6 class="mb-0">
|
||||
<i class="fas fa-bell me-2"></i>
|
||||
<?= _("Notifications") ?>
|
||||
<span id="notification-count" class="badge bg-light text-dark ms-2">0</span>
|
||||
</h6>
|
||||
</div>
|
||||
<div class="dropdown-body p-0" style="max-height: 300px; overflow-y: auto;">
|
||||
<div id="notification-list" class="list-group list-group-flush">
|
||||
<div class="text-center py-4 text-muted">
|
||||
<i class="fas fa-bell-slash fa-2x mb-2"></i>
|
||||
<p class="mb-0"><?= _("Aucune notification") ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dropdown-footer bg-light py-2 px-3 text-center border-top">
|
||||
<a href="javascript:pop_messagerie();" class="btn btn-sm btn-outline-primary">
|
||||
<i class="fas fa-envelope me-1"></i> <?= _("Voir toutes les notifications") ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<!-- Société -->
|
||||
<li class="nav-item me-3">
|
||||
<a class="nav-link p-2 d-flex align-items-center"
|
||||
href="javascript:infos_entite();"
|
||||
data-bs-toggle="tooltip"
|
||||
title="<?= _("Gestionnaire d'assurance santé") ?>">
|
||||
<div class="me-2">
|
||||
<img src="<?= $_SESSION['lienLogo'] ?>"
|
||||
alt="<?= htmlspecialchars($companyDisplayName) ?>"
|
||||
class="img-fluid rounded"
|
||||
style="max-height: 36px;">
|
||||
</div>
|
||||
<div class="d-none d-md-block">
|
||||
<span class="fw-bold text-dark"><?= $companyDisplayName ?></span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<!-- Langue -->
|
||||
<li class="nav-item dropdown me-3">
|
||||
<a class="nav-link p-2 d-flex align-items-center"
|
||||
href="#"
|
||||
data-bs-toggle="dropdown"
|
||||
data-bs-toggle="tooltip"
|
||||
title="<?= _("Changer la langue") ?>">
|
||||
<img src="Bootstrap_new/images/<?= $flag ?>"
|
||||
alt="<?= $alt ?>"
|
||||
width="24"
|
||||
class="rounded-circle border">
|
||||
<span class="d-none d-md-block ms-2 fw-medium"><?= $lib ?></span>
|
||||
<i class="fas fa-chevron-down ms-1 small"></i>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-end border-0 shadow-sm">
|
||||
<a class="dropdown-item d-flex align-items-center py-2"
|
||||
href="javascript:changer_langue();">
|
||||
<i class="fas fa-exchange-alt me-2 text-primary"></i>
|
||||
<span><?= _("Changer de langue") ?></span>
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<!-- Aide -->
|
||||
<li class="nav-item me-3">
|
||||
<a class="nav-link p-2"
|
||||
href="Guideutilisation/"
|
||||
data-bs-toggle="tooltip"
|
||||
title="<?= _("Guide d'utilisation") ?>">
|
||||
<i class="fas fa-question-circle fs-5 text-primary"></i>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<!-- Profil utilisateur -->
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link p-2 d-flex align-items-center"
|
||||
href="#"
|
||||
data-bs-toggle="dropdown"
|
||||
data-bs-toggle="tooltip"
|
||||
title="<?= _("Profil utilisateur") ?>">
|
||||
<div class="initials-circle bg-primary text-white d-flex align-items-center justify-content-center me-2"
|
||||
style="width: 36px; height: 36px; border-radius: 50%; font-weight: 600;">
|
||||
<?= $_SESSION['userInitials_C'] ?>
|
||||
</div>
|
||||
<div class="d-none d-lg-block">
|
||||
<div class="fw-medium text-dark small"><?= $_SESSION['utilisateur_C'] ?></div>
|
||||
<div class="text-muted x-small"><?= $_SESSION['profil_C'] ?? '' ?></div>
|
||||
</div>
|
||||
<i class="fas fa-chevron-down ms-2 small"></i>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-end border-0 shadow-lg" style="min-width: 220px;">
|
||||
<div class="dropdown-header bg-light py-3 px-4">
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="initials-circle bg-primary text-white d-flex align-items-center justify-content-center me-3"
|
||||
style="width: 40px; height: 40px; border-radius: 50%; font-size: 1rem; font-weight: 600;">
|
||||
<?= $_SESSION['userInitials_C'] ?>
|
||||
</div>
|
||||
<div>
|
||||
<div class="fw-bold"><?= $_SESSION['utilisateur_C'] ?></div>
|
||||
<div class="text-muted small"><?= $_SESSION['profil_C'] ?? '' ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item d-flex align-items-center py-2"
|
||||
href="javascript:change_password();">
|
||||
<i class="fas fa-user-circle me-3 text-primary"></i>
|
||||
<span><?= $_SESSION['utilisateur_C'] ?></span>
|
||||
</a>
|
||||
<a class="dropdown-item d-flex align-items-center py-2"
|
||||
href="javascript:void(0);">
|
||||
<i class="fas fa-cog me-3 text-primary"></i>
|
||||
<span><?= _("Paramètres") ?></span>
|
||||
</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item d-flex align-items-center py-2 text-danger"
|
||||
href="javascript:deconnexion();">
|
||||
<i class="fas fa-sign-out-alt me-3"></i>
|
||||
<span><?= _("Déconnexion") ?></span>
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
<!-- End Header -->
|
||||
239
Vue/includes/barre-contexte.php
Normal file
239
Vue/includes/barre-contexte.php
Normal file
|
|
@ -0,0 +1,239 @@
|
|||
<?php
|
||||
/*
|
||||
* INTER SANTÉ — includes/barre-contexte.php
|
||||
* Panneau contextuel coulissant (Drawer) — style SaaS Premium
|
||||
* Contient : Garant, Souscripteur, Police, Adhérent, Bénéficiaire, Photo
|
||||
*/
|
||||
?>
|
||||
|
||||
<!-- Inputs techniques (cachés mais disponibles pour JS/AJAX) -->
|
||||
<input type="hidden" id="numeroClient_C" name="numeroClient_C" value="<?= $this->nettoyer($_SESSION['numeroClient_C']) ?>">
|
||||
<input type="hidden" id="codeGcAssureur_C" name="codeGcAssureur_C" value="<?= $this->nettoyer($_SESSION['codeGcAssureur_C']) ?>">
|
||||
|
||||
<!-- ======= Bouton Ouvrir le Panneau ======= -->
|
||||
<button class="btn-info-context" id="showSideNav"
|
||||
title="<?= _('Afficher le contexte') ?>"
|
||||
aria-label="<?= _('Afficher le panneau de contexte') ?>">
|
||||
<i class="fas fa-angle-double-left"></i>
|
||||
<i class="fas fa-id-card" style="font-size:14px; opacity:0.8;"></i>
|
||||
</button>
|
||||
|
||||
<!-- ======= Panneau de Contexte (Drawer) ======= -->
|
||||
<div id="barre_laterale_d" role="complementary" aria-label="<?= _('Panneau de contexte') ?>">
|
||||
<div class="drawer-inner">
|
||||
|
||||
<!-- Header du panneau -->
|
||||
<button class="btn-cacher-contexte" id="hideSideNav"
|
||||
title="<?= _('Fermer le panneau') ?>"
|
||||
aria-label="<?= _('Fermer le panneau de contexte') ?>">
|
||||
<i class="fas fa-times-circle me-2"></i>
|
||||
<?= _('Fermer le contexte') ?>
|
||||
<i class="fas fa-angle-double-right ms-auto"></i>
|
||||
</button>
|
||||
|
||||
<!-- ── GARANT ── -->
|
||||
<div class="context-card">
|
||||
<div class="context-card-label">
|
||||
<i class="fas fa-user-shield"></i>
|
||||
<?= _('Garant') ?>
|
||||
<a href="javascript:afficher_garant('<?= $this->nettoyer($_SESSION['codeGcAssureur_C']) ?>');"
|
||||
title="<?= _('Afficher le Garant') ?>">
|
||||
#<?= $this->nettoyer($_SESSION['codeGcAssureur_C']) ?>
|
||||
</a>
|
||||
</div>
|
||||
<button class="context-btn btn-primary-context"
|
||||
onclick="javascript:afficher_garant('<?= $this->nettoyer($_SESSION['codeGcAssureur_C']) ?>');"
|
||||
title="<?= _('Afficher le Garant') ?>">
|
||||
<i class="fas fa-user-shield"></i>
|
||||
<?= isset($_SESSION['nomGcAssureur_C']) ? htmlspecialchars($_SESSION['nomGcAssureur_C'], ENT_QUOTES) : '' ?>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- ── SOUSCRIPTEUR ── -->
|
||||
<div class="context-card">
|
||||
<div class="context-card-label">
|
||||
<i class="fas fa-user-tie"></i>
|
||||
<?= _('Souscripteur') ?>
|
||||
<a href="javascript:afficher_client_id();"
|
||||
title="<?= _('Afficher le Souscripteur') ?>">
|
||||
#<?= $this->nettoyer($_SESSION['numeroClient_C']) ?>
|
||||
</a>
|
||||
</div>
|
||||
<button class="context-btn btn-primary-context"
|
||||
onclick="javascript:afficher_client_id();">
|
||||
<i class="fas fa-user-tie"></i>
|
||||
<?= $this->nettoyer($_SESSION['nomClient_C']) ?>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- ── POLICE ── -->
|
||||
<div class="context-card">
|
||||
<div class="context-card-label">
|
||||
<i class="fas fa-file-contract"></i>
|
||||
<?= _('Police en cours') ?>
|
||||
</div>
|
||||
<button class="context-btn btn-primary-context"
|
||||
id="numeroPolice_C" name="numeroPolice_C"
|
||||
onclick="javascript:afficher_police_id();"
|
||||
title="<?= _('Couverture') . ': ' . dateLang($_SESSION['dateEffet_C'], $_SESSION['lang']) . ' → ' . dateLang($_SESSION['dateEcheance_C'], $_SESSION['lang']) ?>">
|
||||
<i class="fas fa-file-contract"></i>
|
||||
<?= _('Police') . ' : ' . $this->nettoyer($_SESSION['numeroPolice_C']) ?>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- ── STATISTIQUES FAMILLE ── -->
|
||||
<div class="context-stats">
|
||||
<div class="context-stat">
|
||||
<div class="context-stat-value"><?= format_N($_SESSION['ndAdh_C']) ?></div>
|
||||
<div class="context-stat-label"><?= _('Fam.') ?></div>
|
||||
</div>
|
||||
<div class="context-stat">
|
||||
<div class="context-stat-value"><?= format_N($_SESSION['ndDep_C']) ?></div>
|
||||
<div class="context-stat-label"><?= _('Dép.') ?></div>
|
||||
</div>
|
||||
<div class="context-stat">
|
||||
<div class="context-stat-value"><?= format_N($_SESSION['ndActif_C']) ?></div>
|
||||
<div class="context-stat-label"><?= _('Bén.') ?></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ── ADHÉRENT ── -->
|
||||
<div class="context-card">
|
||||
<div class="context-card-label">
|
||||
<i class="fas fa-users"></i>
|
||||
<?= _('Famille en cours') ?>
|
||||
<a href="javascript:afficher_adherent_id();" title="<?= _('Voir les membres de famille') ?>">
|
||||
#<?= $this->nettoyer($_SESSION['numeroAdherent_C']) ?>
|
||||
</a>
|
||||
</div>
|
||||
<button class="context-btn btn-primary-context"
|
||||
onclick="javascript:afficher_adherent_id();"
|
||||
id="numeroAdherent_C" name="numeroAdherent_C"
|
||||
title="<?= _('Voir les membres de famille') ?>">
|
||||
<i class="fas fa-users"></i>
|
||||
<?= _('Famille') . ' : ' . $this->nettoyer($_SESSION['numeroAdherent_C']) ?>
|
||||
</button>
|
||||
<button class="context-btn mt-1"
|
||||
onclick="javascript:afficher_adherent_id();">
|
||||
<?= substr($this->nettoyer($_SESSION['adherent_C']), 0, 28) ?>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- ── BÉNÉFICIAIRE ── -->
|
||||
<div class="context-card">
|
||||
<div class="context-card-label">
|
||||
<i class="fas fa-user"></i>
|
||||
<?= _('Bénéficiaire en cours') ?>
|
||||
<a href="javascript:afficher_beneficiaire_id();">
|
||||
#<?= $this->nettoyer($_SESSION['numeroBeneficiaire_C']) ?>
|
||||
</a>
|
||||
</div>
|
||||
<button class="context-btn btn-primary-context"
|
||||
onclick="javascript:afficher_beneficiaire_id();"
|
||||
id="numeroBeneficiaire_C" name="numeroBeneficiaire_C"
|
||||
title="<?= _('Couverture') . ': ' . dateLang($_SESSION['dateEntreeBeneficiaire_C'], $_SESSION['lang']) . ' → ' . dateLang($_SESSION['dateEcheancePolice_C'], $_SESSION['lang']) ?>">
|
||||
<i class="fas fa-user"></i>
|
||||
<?= _('Bénéficiaire') . ' : ' . $this->nettoyer($_SESSION['numeroBeneficiaire_C']) ?>
|
||||
</button>
|
||||
<button class="context-btn mt-1"
|
||||
onclick="javascript:afficher_beneficiaire_id();">
|
||||
<?= substr($this->nettoyer($_SESSION['beneficiaire_C']), 0, 28) ?>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- ── PHOTO ── -->
|
||||
<?php if ($_SESSION['faceRegistered_C'] == '1' && $_SESSION['idBeneficiaire_C'] > '0'): ?>
|
||||
<div class="photo-container">
|
||||
<img src="data:image/jpg;base64,<?= $imgData ?>"
|
||||
class="img-fluid"
|
||||
data-bs-toggle="modal"
|
||||
data-bs-target="#pop_photo"
|
||||
alt="<?= _('Photo du bénéficiaire') ?>"
|
||||
title="<?= _('Cliquer pour agrandir') ?>">
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- ── DERNIÈRES POLICES ── -->
|
||||
<?php if (!empty($_SESSION['contextPolice'])): ?>
|
||||
<div class="mb-3">
|
||||
<div class="recent-policies-title">
|
||||
<i class="bi bi-clock-history"></i>
|
||||
<?= _('Dernières polices ouvertes') ?>
|
||||
</div>
|
||||
<?php foreach ($_SESSION['contextPolice'] as $contextPolice):
|
||||
$idPolice = $contextPolice['idPolice'];
|
||||
$numeroPolice = $contextPolice['numeroPolice'];
|
||||
?>
|
||||
<a href="javascript:selectionner_police(<?= $idPolice ?>, '<?= $numeroPolice ?>'); afficher_police_id();"
|
||||
class="policy-item"
|
||||
title="<?= htmlspecialchars($contextPolice['libellePolice'] ?? '', ENT_QUOTES) ?>">
|
||||
<i class="fas fa-file-medical-alt me-1" style="color:var(--color-primary);font-size:0.65rem;"></i>
|
||||
<?= htmlspecialchars($contextPolice['libellePolice'] ?? $numeroPolice, ENT_QUOTES) ?>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- ── MESSAGES ── -->
|
||||
<button class="context-btn mb-2"
|
||||
onclick="javascript:gerer_messagerie();"
|
||||
style="border-color:var(--color-info);color:var(--color-info);">
|
||||
<i class="fas fa-comments"></i>
|
||||
<?= _('Gérer Messages') ?>
|
||||
</button>
|
||||
|
||||
<!-- ── CHANGER MOT DE PASSE ── -->
|
||||
<a href="javascript:change_password();"
|
||||
class="change-pwd-link"
|
||||
title="<?= isset($_SESSION['lang']) && $_SESSION['lang'] == 'en_US' ? 'Change password' : 'Changer le mot de passe' ?>">
|
||||
<img src="Bootstrap_new/images/pwd.png" alt="mot de passe">
|
||||
<span><?= isset($_SESSION['lang']) && $_SESSION['lang'] == 'en_US' ? 'Change Password' : 'Changer le mot de passe' ?></span>
|
||||
</a>
|
||||
|
||||
<!-- ── MODE COTATION / DEVIS ── -->
|
||||
<?php if ($_SESSION['modeDevis'] == '1'): ?>
|
||||
<div class="mode-devis-banner">
|
||||
<i class="fas fa-tag me-2"></i><?= _('GESTION DES COTATIONS') ?>
|
||||
</div>
|
||||
|
||||
<div class="context-card">
|
||||
<div class="context-card-label">
|
||||
<i class="fas fa-user-times"></i>
|
||||
<?= _('Prospect') ?>
|
||||
</div>
|
||||
<button class="context-btn btn-primary-context"
|
||||
onclick="javascript:afficher_client_d_id();"
|
||||
id="numeroClient_d_C" name="numeroClient_d_C">
|
||||
<i class="fas fa-user-times"></i>
|
||||
<?= _('Prospect') . ' : ' . $this->nettoyer($_SESSION['numeroClient_d_C']) ?>
|
||||
</button>
|
||||
<button class="context-btn mt-1" onclick="javascript:afficher_client_d_id();">
|
||||
<?= substr($this->nettoyer($_SESSION['nomClient_d_C']), 0, 28) ?>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="context-card">
|
||||
<div class="context-card-label">
|
||||
<i class="fas fa-file-signature"></i>
|
||||
<?= _('Devis') ?>
|
||||
</div>
|
||||
<button class="context-btn btn-primary-context"
|
||||
id="numeroPolice_d_C" name="numeroPolice_d_C"
|
||||
onclick="javascript:afficher_police_d_id_init();">
|
||||
<i class="fas fa-file-signature"></i>
|
||||
<?= $this->nettoyer($_SESSION['numeroPolice_d_C']) ?>
|
||||
</button>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- Footer technique (timer, inputs cachés) -->
|
||||
<footer class="container-fluid" style="padding:0 0 6px;">
|
||||
<div id="nbMessagesNonLus" name="nbMessagesNonLus">
|
||||
<input class="sr-only timer" id="timer" name="timer" type="button" value="0">
|
||||
<input class="sr-only" id="msgNonLus" name="msgNonLus" type="text" value="0">
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div><!-- /.drawer-inner -->
|
||||
</div>
|
||||
<!-- End Barre Latérale Contexte -->
|
||||
63
Vue/includes/head-meta.php
Normal file
63
Vue/includes/head-meta.php
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
<?php
|
||||
// Versioning automatique pour le cache navigateur
|
||||
$version = date('YmdHi');
|
||||
|
||||
// $racineWeb est défini dans gabarit.php, on le garde
|
||||
// Exemple: $racineWeb = '/newdesignstationnaire/';
|
||||
?>
|
||||
<meta charset="UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<!-- On garde la balise base avec $racineWeb -->
|
||||
<base href="<?= $racineWeb ?>">
|
||||
|
||||
<!-- Favicon - chemin relatif à la base -->
|
||||
<link rel="icon" href="Bootstrap_new/images/favicon.ico"/>
|
||||
|
||||
<!-- Google Fonts : Inter -->
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
|
||||
<link href="https://fonts.gstatic.com" rel="preconnect">
|
||||
|
||||
<!-- Vendor CSS Files -->
|
||||
<link href="Bootstrap/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="Bootstrap/vendor/bootstrap-icons/bootstrap-icons.css" rel="stylesheet">
|
||||
<link href="Bootstrap/vendor/boxicons/css/boxicons.min.css" rel="stylesheet">
|
||||
<link href="Bootstrap_new/css/select2.min.css" rel="stylesheet">
|
||||
<link href="Bootstrap_new/select/css/bootstrap-select.min.css" rel="stylesheet">
|
||||
<link href="Bootstrap_new/datatables/datatable.min.css" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/npm/sweetalert2@11.14.1/dist/sweetalert2.min.css" rel="stylesheet">
|
||||
|
||||
<!-- Font Awesome 6 -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css">
|
||||
|
||||
<!-- Thème principal -->
|
||||
<link href="Bootstrap_new/css/theme-modern.css?ver=<?= $version ?>" rel="stylesheet">
|
||||
|
||||
<title><?= $_SESSION['descriptionVue'] ?? 'INTER SANTE' ?></title>
|
||||
|
||||
<!-- Chart.js -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/chartjs-plugin-datalabels@2.0.0"></script>
|
||||
|
||||
<style>
|
||||
/* Style de secours minimal en attendant le chargement du CSS */
|
||||
body {
|
||||
font-family: 'Inter', sans-serif;
|
||||
margin: 0;
|
||||
background: #f4f6f9;
|
||||
}
|
||||
.sidebar {
|
||||
width: 260px;
|
||||
background: #1a2b3c;
|
||||
color: white;
|
||||
position: fixed;
|
||||
height: 100vh;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
.main {
|
||||
margin-left: 260px;
|
||||
padding: 20px;
|
||||
}
|
||||
</style>
|
||||
150
Vue/includes/header.php
Normal file
150
Vue/includes/header.php
Normal file
|
|
@ -0,0 +1,150 @@
|
|||
<?php
|
||||
/*
|
||||
* INTER SANTÉ — includes/header.php
|
||||
* Header épuré SaaS Premium
|
||||
*/
|
||||
|
||||
$flag = est_anglophone() ? 'england.png' : 'france.png';
|
||||
$alt = est_anglophone() ? 'English' : 'Français';
|
||||
$lib = est_anglophone() ? 'En' : 'Fr';
|
||||
$styleTest = '';
|
||||
$labelTest = '';
|
||||
|
||||
if ($_SESSION['bdTests_C'] == '1') {
|
||||
$colorTests = $_SESSION['colorTests'];
|
||||
$styleTest = "background: {$colorTests};";
|
||||
$labelTest = '<span class="mode-test-badge">MODE TEST</span>';
|
||||
}
|
||||
?>
|
||||
|
||||
<!-- ======= Header ======= -->
|
||||
<header id="header" class="header fixed-top d-flex align-items-center <?= $_SESSION['bdTests_C'] == '1' ? 'header-test' : '' ?>" style="<?= $styleTest ?>">
|
||||
|
||||
<!-- Left: Logo + Toggle -->
|
||||
<div class="d-flex align-items-center gap-2 me-3">
|
||||
<a href="#" class="logo d-flex align-items-center text-decoration-none">
|
||||
<img src="Bootstrap_new/images/new/favicon.png" alt="Logo Inter Santé">
|
||||
<span class="d-none d-lg-block">INTER SANTÉ</span>
|
||||
</a>
|
||||
<i class="bi bi-list toggle-sidebar-btn" role="button" title="<?= _('Réduire / Étendre le menu') ?>"></i>
|
||||
</div>
|
||||
|
||||
<!-- Center: Breadcrumb -->
|
||||
<nav aria-label="breadcrumb" class="flex-grow-1 d-none d-md-block">
|
||||
<ol class="breadcrumb mb-0">
|
||||
<?php if (!empty($_SESSION['retourVue'])): ?>
|
||||
<li class="breadcrumb-item">
|
||||
<a href="<?= $_SESSION['retourVue'] ?>" class="d-flex align-items-center gap-1">
|
||||
<i class="fas fa-arrow-left" style="font-size:0.65rem;"></i>
|
||||
<?= htmlspecialchars($_SESSION['titreRetour'], ENT_QUOTES) ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<li class="breadcrumb-item active">
|
||||
<?= htmlspecialchars($_SESSION['descriptionVue'] ?? '', ENT_QUOTES) ?>
|
||||
</li>
|
||||
</ol>
|
||||
</nav>
|
||||
|
||||
<!-- Right: Navigation Items -->
|
||||
<nav class="header-nav ms-auto">
|
||||
<ul class="d-flex align-items-center gap-1 mb-0 list-unstyled">
|
||||
|
||||
<!-- Mode test indicator -->
|
||||
<?php if (!empty($labelTest)): ?>
|
||||
<li class="nav-item">
|
||||
<span class="mode-test-badge" style="background:rgba(255,255,255,0.25);color:white;font-weight:800;font-size:0.65rem;letter-spacing:0.1em;padding:4px 10px;border-radius:999px;cursor:pointer;"
|
||||
onclick="javascript:alert_ebene('TEST', 'TEST');">TEST</span>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- Notifications -->
|
||||
<li class="nav-item">
|
||||
<a class="nav-link nav-icon position-relative" href="#"
|
||||
onclick="javascript:pop_messagerie(); return false;"
|
||||
title="<?= _('Notifications') ?>">
|
||||
<i class="bi bi-bell" style="font-size:1.1rem;"></i>
|
||||
<span id="span_notification"
|
||||
class="badge-number"
|
||||
title="<?= _('Notification') ?>">0</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<!-- Company Logo -->
|
||||
<li class="nav-item d-none d-lg-flex">
|
||||
<a class="company-logo-area text-decoration-none"
|
||||
href="javascript:infos_entite();"
|
||||
title="<?= _('Gestionnaire d\'assurance santé') ?>">
|
||||
<img src="<?= $_SESSION['lienLogo'] ?>"
|
||||
alt="<?= htmlspecialchars($_SESSION['nomSociete'], ENT_QUOTES) ?>">
|
||||
<span class="company-name"><?= $companyDisplayName ?></span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<!-- Language Switcher -->
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link d-flex align-items-center gap-1 lang-selector"
|
||||
href="#"
|
||||
data-bs-toggle="dropdown"
|
||||
title="<?= _('Changer la langue actuelle') ?>">
|
||||
<img src="Bootstrap_new/images/<?= $flag ?>" alt="<?= $alt ?>" width="22" class="rounded-1">
|
||||
<span class="d-none d-md-block dropdown-toggle" style="font-size:0.78rem;font-weight:600;"><?= $lib ?></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-menu-end">
|
||||
<li>
|
||||
<a class="dropdown-item" href="javascript:changer_langue();">
|
||||
<i class="fa fa-exchange"></i>
|
||||
<?= _('Changer de langue') ?>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<!-- Help -->
|
||||
<li class="nav-item">
|
||||
<a class="nav-link nav-icon"
|
||||
href="Guideutilisation/"
|
||||
title="<?= _('Guide d\'utilisation') ?>">
|
||||
<i class="bi bi-question-circle" style="font-size:1.05rem;"></i>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<!-- User Profile -->
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link d-flex align-items-center gap-2 pe-0"
|
||||
href="#"
|
||||
data-bs-toggle="dropdown"
|
||||
title="<?= _('Profil utilisateur') ?>">
|
||||
<span class="initials"><?= htmlspecialchars($_SESSION['userInitials_C'] ?? '??', ENT_QUOTES) ?></span>
|
||||
<i class="bi bi-chevron-down d-none d-md-inline" style="font-size:0.6rem;color:var(--text-muted);"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-menu-end" style="min-width:200px;">
|
||||
<li>
|
||||
<div class="px-3 py-2 border-bottom" style="border-color:var(--border-light)!important;">
|
||||
<div style="font-weight:700;font-size:0.82rem;color:var(--text-primary);">
|
||||
<?= htmlspecialchars($_SESSION['utilisateur_C'] ?? '', ENT_QUOTES) ?>
|
||||
</div>
|
||||
<div style="font-size:0.72rem;color:var(--text-muted);"><?= htmlspecialchars($_SESSION['nomSociete'] ?? '', ENT_QUOTES) ?></div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<a class="dropdown-item" href="javascript:change_password();">
|
||||
<i class="fa fa-user-circle"></i>
|
||||
<?= _('Mon profil / Mot de passe') ?>
|
||||
</a>
|
||||
</li>
|
||||
<li><hr class="dropdown-divider my-1"></li>
|
||||
<li>
|
||||
<a class="dropdown-item text-danger" href="#">
|
||||
<i class="bi bi-box-arrow-right"></i>
|
||||
<?= _('Déconnexion') ?>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
</header>
|
||||
<!-- End Header -->
|
||||
36
Vue/includes/main-content.php
Normal file
36
Vue/includes/main-content.php
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
// $contenu vient du contrôleur, on le garde
|
||||
if (!isset($contenu)) $contenu = '';
|
||||
?>
|
||||
|
||||
<!-- Inputs cachés essentiels -->
|
||||
<input type="hidden" id="vue" value="<?= $_SESSION['vue'] ?? '' ?>">
|
||||
<input type="hidden" id="racineWeb" value="<?= $racineWeb ?>">
|
||||
<input type="hidden" id="dureeSession" value="<?= $_SESSION['dureeSession'] ?? '' ?>">
|
||||
<input type="hidden" id="codeLangue" value="<?= $_SESSION['lang'] ?? 'fr_FR' ?>">
|
||||
|
||||
<!-- Navigation secondaire -->
|
||||
<?php if (!empty($menusvue)): ?>
|
||||
<div class="scrollmenu">
|
||||
<?php foreach ($menusvue as $menu): ?>
|
||||
<a href="<?= $menu['lienMenu'] ?>"
|
||||
class="<?= (explode('/', $menu['lienMenu'])[0] == $activeLink) ? 'active' : '' ?>">
|
||||
<?= _($menu['libeleMenu']) ?>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- ================================================= -->
|
||||
<!-- CONTENU PRINCIPAL - NE PAS MODIFIER -->
|
||||
<!-- ================================================= -->
|
||||
<div class="page-content">
|
||||
<!-- Div pour AJAX -->
|
||||
<div id="div_test_gabarit" class="d-none"></div>
|
||||
|
||||
<!-- LE CONTENU DYNAMIQUE DES PAGES -->
|
||||
<?= $contenu ?>
|
||||
|
||||
<!-- Div pour entité -->
|
||||
<div id="div_entite" class="d-none"></div>
|
||||
</div>
|
||||
119
Vue/includes/modals.php
Normal file
119
Vue/includes/modals.php
Normal file
|
|
@ -0,0 +1,119 @@
|
|||
<!-- ================================================= -->
|
||||
<!-- MODALS - NE PAS SUPPRIMER LES BOUTONS CACHÉS -->
|
||||
<!-- Utilisés par les fonctions JavaScript existantes -->
|
||||
<!-- ================================================= -->
|
||||
|
||||
<!-- Bouton caché pour déclencher la modal des messages non lus -->
|
||||
<button id="btn_pop_messagerie" type="button" class="d-none" data-bs-toggle="modal" data-bs-target="#popmessagerie">
|
||||
<?= _("Afficher les messages non lus...") ?>
|
||||
</button>
|
||||
|
||||
<!-- Bouton caché pour déclencher la modal d'alerte message -->
|
||||
<button id="btn_pop_dernier_messagerie" type="button" class="d-none" data-bs-toggle="modal" data-bs-target="#popderniermessagerie">
|
||||
<?= _("Alerte Réception Message...") ?>
|
||||
</button>
|
||||
|
||||
<!-- ================================================= -->
|
||||
<!-- MODAL : Messages non lus -->
|
||||
<!-- ================================================= -->
|
||||
<div class="modal fade" id="popmessagerie" tabindex="-1" aria-labelledby="popmessagerieLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg modal-dialog-centered modal-dialog-scrollable">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="popmessagerieLabel">
|
||||
<i class="bi bi-envelope me-2"></i><?= _("Messages non lus") ?>
|
||||
</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="<?= _("Fermer") ?>"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="div_messagerie" class="messagerie-container">
|
||||
<!-- Contenu chargé dynamiquement par JavaScript -->
|
||||
<div class="text-center text-muted py-4">
|
||||
<i class="bi bi-hourglass-split me-2"></i><?= _("Chargement...") ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-light" data-bs-dismiss="modal">
|
||||
<i class="bi bi-x-lg me-2"></i><?= _("Fermer") ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ================================================= -->
|
||||
<!-- MODAL : Alerte dernier message -->
|
||||
<!-- ================================================= -->
|
||||
<div class="modal fade" id="popderniermessagerie" tabindex="-1" aria-labelledby="popderniermessagerieLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg modal-dialog-centered modal-dialog-scrollable">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="popderniermessagerieLabel">
|
||||
<i class="bi bi-exclamation-circle me-2"></i><?= _("Alerte Réception Message...") ?>
|
||||
</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="<?= _("Fermer") ?>"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="div_dernier_messagerie" class="messagerie-container">
|
||||
<!-- Contenu chargé dynamiquement par JavaScript -->
|
||||
<div class="text-center text-muted py-4">
|
||||
<i class="bi bi-hourglass-split me-2"></i><?= _("Chargement...") ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button id="btn_close_pop_dernier_messagerie" type="button" class="btn btn-light" data-bs-dismiss="modal">
|
||||
<i class="bi bi-x-lg me-2"></i><?= _("Fermer") ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ================================================= -->
|
||||
<!-- MODAL : Photo bénéficiaire -->
|
||||
<!-- ================================================= -->
|
||||
<div class="modal fade" id="pop_photo" tabindex="-1" aria-labelledby="pop_photoLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="pop_photoLabel">
|
||||
<i class="bi bi-camera me-2"></i><?= _("Photo du bénéficiaire") ?>
|
||||
</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="<?= _("Fermer") ?>"></button>
|
||||
</div>
|
||||
<div class="modal-body text-center">
|
||||
<?php if (!empty($imgData) && $_SESSION['faceRegistered_C'] == "1"): ?>
|
||||
<img src="data:image/jpg;base64,<?= $imgData ?>"
|
||||
class="img-fluid rounded-3"
|
||||
style="max-height: 70vh; width: auto;"
|
||||
alt="<?= _("Photo bénéficiaire") ?>">
|
||||
<?php else: ?>
|
||||
<div class="text-muted py-5">
|
||||
<i class="bi bi-image fs-1 d-block mb-3"></i>
|
||||
<p><?= _("Aucune photo disponible") ?></p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-light" data-bs-dismiss="modal">
|
||||
<i class="bi bi-x-lg me-2"></i><?= _("Fermer") ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ================================================= -->
|
||||
<!-- MODAL : Changement de mot de passe (si existante) -->
|
||||
<!-- ================================================= -->
|
||||
<?php if (function_exists('change_password_modal')): ?>
|
||||
<!-- Si vous avez une modal dédiée au changement de mot de passe, elle peut être incluse ici -->
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- ================================================= -->
|
||||
<!-- NOTE : Les IDs des boutons déclencheurs sont conservés -->
|
||||
<!-- btn_pop_messagerie et btn_pop_dernier_messagerie sont utilisés -->
|
||||
<!-- par les fonctions JavaScript pop_messagerie() et raffraichir_messagerie() -->
|
||||
<!-- ================================================= -->
|
||||
262
Vue/includes/scripts-footer.php
Normal file
262
Vue/includes/scripts-footer.php
Normal file
|
|
@ -0,0 +1,262 @@
|
|||
<!-- ======= Scripts Footer — INTER SANTÉ ======= -->
|
||||
<!-- IMPORTANT: Respecter strictement l'ordre de chargement -->
|
||||
|
||||
<!-- 1. Script spécifique à la société -->
|
||||
<script src="<?= $_SESSION['dossierSociete'] . '/Js/societe.js' ?>"></script>
|
||||
|
||||
<!-- 2. Vendor Libs (Bootstrap ecosystem) -->
|
||||
<script src="Bootstrap/vendor/apexcharts/apexcharts.min.js"></script>
|
||||
<script src="Bootstrap/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="Bootstrap/vendor/chart.js/chart.umd.js"></script>
|
||||
<script src="Bootstrap/vendor/echarts/echarts.min.js"></script>
|
||||
<script src="Bootstrap/vendor/quill/quill.min.js"></script>
|
||||
<script src="Bootstrap/vendor/simple-datatables/simple-datatables.js"></script>
|
||||
<script src="Bootstrap/vendor/php-email-form/validate.js"></script>
|
||||
|
||||
<!-- 3. jQuery (DOIT précéder tout le reste) -->
|
||||
<script src="Bootstrap/js/jquery.min.js"></script>
|
||||
<script src="Bootstrap/js/jquery-ui.js"></script>
|
||||
<script src="Bootstrap/js/timer.jquery.js"></script>
|
||||
|
||||
<!-- 4. Select2 & Bootstrap-Select -->
|
||||
<script src="Bootstrap_new/js/select2.min.js"></script>
|
||||
<script src="Bootstrap_new/select/js/bootstrap-select.min.js"></script>
|
||||
|
||||
<!-- 5. Template main -->
|
||||
<script src="Bootstrap/js/main.js"></script>
|
||||
<script src="Bootstrap_new/datatables/datatable.min.js" crossorigin="anonymous"></script>
|
||||
|
||||
<!-- 6. Datepicker selon langue -->
|
||||
<?php if (est_anglophone()): ?>
|
||||
<script src="Js/datepicker-eng.js"></script>
|
||||
<?php else: ?>
|
||||
<script src="Js/datepicker-fr.js"></script>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- 7. Utilitaires -->
|
||||
<script src="Js/html2pdf.js"></script>
|
||||
|
||||
<!-- 8. Toastr notifications -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.css" crossorigin="anonymous">
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.js" crossorigin="anonymous"></script>
|
||||
|
||||
<!-- 9. SweetAlert2 -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11.14.1/dist/sweetalert2.all.min.js"></script>
|
||||
|
||||
<!-- 10. Fonctions applicatives Inter Santé -->
|
||||
<script src="Js/fonctions.js?ver=<?= defined('APP_VERSION') ? APP_VERSION : date('YmdHi') ?>"></script>
|
||||
|
||||
<!-- 11. Vue.js -->
|
||||
<script src="https://unpkg.com/vue@3/dist/vue.global.prod.js"></script>
|
||||
|
||||
<!-- 12. Chart.js (dédupliqué — déjà en head, mais conservé pour compatibilité) -->
|
||||
<!-- <script src="https://cdn.jsdelivr.net/npm/chart.js"></script> -->
|
||||
|
||||
<!-- 13. Bootstrap JS -->
|
||||
<script src="Bootstrap/js/bootstrap.min.js"></script>
|
||||
|
||||
<!-- ===== Conteneur AJAX gabarit ===== -->
|
||||
<div id="div_ajaxgabarit"></div>
|
||||
|
||||
<!-- ===== Initialisation applicative ===== -->
|
||||
<script type="text/javascript">
|
||||
/* Rafraîchissement du gabarit */
|
||||
raffraichier_gabarit();
|
||||
|
||||
/* Timer messagerie (60s) */
|
||||
$(document).ready(function () {
|
||||
|
||||
/* --- Panneau contexte : Drawer animé --- */
|
||||
$('#barre_laterale_d').hide();
|
||||
$('#showSideNav').hide(); // Masqué jusqu'au scroll ou action
|
||||
|
||||
// Afficher le bouton déclencheur après un court délai
|
||||
setTimeout(function () {
|
||||
$('#showSideNav').fadeIn(300);
|
||||
}, 800);
|
||||
|
||||
// Ouverture du panneau
|
||||
$('#showSideNav').on('click', function () {
|
||||
$('#barre_laterale_d').stop(true).show('slide', { direction: 'right' }, 350);
|
||||
$(this).fadeOut(150);
|
||||
});
|
||||
|
||||
// Fermeture du panneau
|
||||
$('#hideSideNav').on('click', function () {
|
||||
$('#barre_laterale_d').stop(true).hide('slide', { direction: 'right' }, 350, function () {
|
||||
$('#showSideNav').fadeIn(200);
|
||||
});
|
||||
});
|
||||
|
||||
// Fermeture en cliquant en dehors du panneau
|
||||
$(document).on('click', function (e) {
|
||||
if ($('#barre_laterale_d').is(':visible') &&
|
||||
!$(e.target).closest('#barre_laterale_d, #showSideNav').length) {
|
||||
$('#barre_laterale_d').stop(true).hide('slide', { direction: 'right' }, 300, function () {
|
||||
$('#showSideNav').fadeIn(200);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
/* --- Timer messagerie --- */
|
||||
$('#timer').timer({
|
||||
duration: '60s',
|
||||
callback: function () {
|
||||
raffraichier_messagerie();
|
||||
},
|
||||
repeat: true
|
||||
});
|
||||
|
||||
/* --- Select2 global --- */
|
||||
if ($.fn.select2) {
|
||||
$('select.select2, .select-field').each(function () {
|
||||
$(this).select2({ theme: 'bootstrap-5', width: '100%' });
|
||||
});
|
||||
}
|
||||
|
||||
/* --- Bootstrap Select global --- */
|
||||
if ($.fn.selectpicker) {
|
||||
$('select.selectpicker').selectpicker('refresh');
|
||||
}
|
||||
|
||||
/* --- Sidebar toggle ---
|
||||
* On désactive le listener natif de main.js (Bootstrap template) en
|
||||
* clonant le nœud DOM, ce qui supprime tous ses event listeners,
|
||||
* puis on rebranche notre propre logique.
|
||||
*/
|
||||
(function () {
|
||||
var $btn = $('.toggle-sidebar-btn');
|
||||
if (!$btn.length) return;
|
||||
|
||||
// Cloner pour vider les listeners attachés par main.js
|
||||
var $clone = $btn.clone(false);
|
||||
$btn.replaceWith($clone);
|
||||
|
||||
$clone.on('click', function () {
|
||||
var isMobile = $(window).width() < 1200;
|
||||
|
||||
if (isMobile) {
|
||||
// Mobile : slide complet via classe CSS
|
||||
$('#sidebar').toggleClass('sidebar-mobile-open');
|
||||
} else {
|
||||
// Desktop : basculer entre plein / icônes seules
|
||||
$('body').toggleClass('toggle-sidebar');
|
||||
// Forcer la fermeture des sous-menus collapse ouverts
|
||||
if ($('body').hasClass('toggle-sidebar')) {
|
||||
$('#sidebar .nav-content.show').collapse('hide');
|
||||
}
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
/* --- Highlight ligne active DataTable au clic --- */
|
||||
$(document).on('click', '.table tbody tr', function () {
|
||||
$(this).closest('tbody').find('tr').removeClass('row-selected');
|
||||
$(this).addClass('row-selected');
|
||||
});
|
||||
|
||||
/* --- Toastr config globale --- */
|
||||
if (typeof toastr !== 'undefined') {
|
||||
toastr.options = {
|
||||
positionClass: 'toast-top-right',
|
||||
timeOut: 4000,
|
||||
closeButton: true,
|
||||
progressBar: true,
|
||||
preventDuplicates: true,
|
||||
newestOnTop: true
|
||||
};
|
||||
}
|
||||
|
||||
}); // end document.ready
|
||||
</script>
|
||||
|
||||
<!-- Styles sidebar toggle + ligne sélectionnée -->
|
||||
<style>
|
||||
/* ── Ligne DataTable sélectionnée ── */
|
||||
.table tbody tr.row-selected > td {
|
||||
background: rgba(26, 107, 74, 0.08) !important;
|
||||
border-left: 3px solid var(--color-accent, #0abf7c);
|
||||
}
|
||||
|
||||
/* ── Transitions fluides (doivent être déclarées ici, APRÈS le CSS du template,
|
||||
pour ne pas être écrasées par Bootstrap/css/style.css) ── */
|
||||
#sidebar {
|
||||
transition: width 0.3s cubic-bezier(.4,0,.2,1),
|
||||
transform 0.3s cubic-bezier(.4,0,.2,1) !important;
|
||||
overflow: hidden !important;
|
||||
will-change: width;
|
||||
}
|
||||
#main {
|
||||
transition: margin-left 0.3s cubic-bezier(.4,0,.2,1) !important;
|
||||
will-change: margin-left;
|
||||
}
|
||||
|
||||
/* ── Mode réduit (icônes seules) — desktop ── */
|
||||
body.toggle-sidebar #sidebar {
|
||||
width: 68px !important;
|
||||
min-width: 68px !important;
|
||||
}
|
||||
body.toggle-sidebar #main {
|
||||
margin-left: 68px !important;
|
||||
}
|
||||
/* Masquer textes et chevrons */
|
||||
body.toggle-sidebar #sidebar .nav-link span,
|
||||
body.toggle-sidebar #sidebar .nav-link .bi-chevron-down,
|
||||
body.toggle-sidebar #sidebar .sidebar-section-label {
|
||||
opacity: 0;
|
||||
width: 0;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
display: inline-block; /* garder dans le flux mais invisible — évite le reflow brutal */
|
||||
transition: opacity 0.2s ease, width 0.2s ease;
|
||||
}
|
||||
body:not(.toggle-sidebar) #sidebar .nav-link span,
|
||||
body:not(.toggle-sidebar) #sidebar .nav-link .bi-chevron-down {
|
||||
opacity: 1;
|
||||
width: auto;
|
||||
transition: opacity 0.25s ease 0.05s, width 0.25s ease;
|
||||
}
|
||||
/* Centrer les icônes et agrandir légèrement */
|
||||
body.toggle-sidebar #sidebar .nav-link {
|
||||
justify-content: center !important;
|
||||
padding: 11px 0 !important;
|
||||
}
|
||||
body.toggle-sidebar #sidebar .nav-link i:first-child {
|
||||
font-size: 1.25rem !important;
|
||||
width: auto !important;
|
||||
margin: 0 !important;
|
||||
}
|
||||
/* Fermer les sous-menus */
|
||||
body.toggle-sidebar #sidebar .nav-content {
|
||||
display: none !important;
|
||||
}
|
||||
/* Tooltip natif au survol en mode réduit */
|
||||
body.toggle-sidebar #sidebar .nav-link {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* ── Mobile : slide depuis la gauche ── */
|
||||
@media (max-width: 1199px) {
|
||||
#sidebar {
|
||||
transform: translateX(-100%);
|
||||
width: var(--sidebar-width, 240px) !important;
|
||||
}
|
||||
#sidebar.sidebar-mobile-open {
|
||||
transform: translateX(0);
|
||||
}
|
||||
/* Overlay semi-transparent derrière le sidebar mobile */
|
||||
#sidebar.sidebar-mobile-open::after {
|
||||
content: '';
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background: rgba(0,0,0,0.35);
|
||||
z-index: -1;
|
||||
}
|
||||
#main {
|
||||
margin-left: 0 !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
91
Vue/includes/sidebar.php
Normal file
91
Vue/includes/sidebar.php
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
<?php
|
||||
/*
|
||||
* INTER SANTÉ — includes/sidebar.php
|
||||
* Sidebar navigation moderne avec micro-animations
|
||||
*/
|
||||
?>
|
||||
|
||||
<!-- ======= Sidebar ======= -->
|
||||
<aside id="sidebar" class="sidebar">
|
||||
|
||||
<ul class="sidebar-nav" id="sidebar-nav">
|
||||
<?php foreach ($menus as $key0 => $menuParent):
|
||||
$menuChildrenLevelOne = $gabary->get_menus_by_parent_code($menuParent['vue']);
|
||||
$hasChildren = sizeof($menuChildrenLevelOne) > 0;
|
||||
$parentLink = explode('/', $menuParent['lienMenu'])[0];
|
||||
$isActive = strtolower($menuParent['libeleMenu']) == strtolower($activeLevel1)
|
||||
|| $parentLink == $activeLevel1;
|
||||
?>
|
||||
|
||||
<?php if ($hasChildren): ?>
|
||||
|
||||
<!-- Menu parent avec sous-menus -->
|
||||
<li class="nav-item">
|
||||
<a class="nav-link collapsed <?= $isActive ? 'parent-active' : '' ?>"
|
||||
data-bs-target="#nav-<?= $menuParent['codeMenu'] . $key0 ?>"
|
||||
data-bs-toggle="collapse"
|
||||
href="#"
|
||||
aria-expanded="<?= $isActive ? 'true' : 'false' ?>">
|
||||
|
||||
<i class="<?= htmlspecialchars($menuParent['icone'], ENT_QUOTES) ?>"></i>
|
||||
|
||||
<span class="<?= $isActive ? 'active-main' : '' ?>">
|
||||
<?= htmlspecialchars($menuParent['libeleMenu'], ENT_QUOTES) ?>
|
||||
</span>
|
||||
|
||||
<i class="bi bi-chevron-down ms-auto"></i>
|
||||
</a>
|
||||
|
||||
<ul id="nav-<?= $menuParent['codeMenu'] . $key0 ?>"
|
||||
class="nav-content collapse <?= $isActive ? 'show' : '' ?>"
|
||||
data-bs-parent="#sidebar-nav">
|
||||
|
||||
<?php foreach ($menuChildrenLevelOne as $key1 => $menuChild):
|
||||
$linkClean = explode('/', $menuChild['lienMenu'])[0];
|
||||
$activeLink = $_SESSION['firstLevelMenu'];
|
||||
$isSubActive = $linkClean == $activeLink;
|
||||
?>
|
||||
<li>
|
||||
<a href="<?= htmlspecialchars($menuChild['lienMenu'], ENT_QUOTES) ?>"
|
||||
class="<?= $isSubActive ? 'active-submenu' : '' ?>"
|
||||
title="<?= htmlspecialchars($menuChild['libeleMenu'], ENT_QUOTES) ?>">
|
||||
<span><?= htmlspecialchars($menuChild['libeleMenu'], ENT_QUOTES) ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<?php else: ?>
|
||||
|
||||
<!-- Menu parent sans sous-menus (lien direct) -->
|
||||
<li class="nav-item">
|
||||
<a class="nav-link collapsed <?= $isActive ? 'parent-active' : '' ?>"
|
||||
href="<?= htmlspecialchars($menuParent['lienMenu'], ENT_QUOTES) ?>">
|
||||
<i class="<?= htmlspecialchars($menuParent['icone'], ENT_QUOTES) ?>"></i>
|
||||
<span><?= htmlspecialchars($menuParent['libeleMenu'], ENT_QUOTES) ?></span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
|
||||
</aside>
|
||||
<!-- End Sidebar -->
|
||||
|
||||
<style>
|
||||
/* Sidebar — styles inline spécifiques au composant */
|
||||
#sidebar { background: var(--bg-sidebar, #0f2d20); }
|
||||
|
||||
/* Active parent: highlight subtle */
|
||||
#sidebar .nav-link.parent-active {
|
||||
background: rgba(255,255,255,0.08);
|
||||
color: white;
|
||||
}
|
||||
#sidebar .nav-link.parent-active > i:first-child {
|
||||
color: var(--color-accent, #0abf7c);
|
||||
}
|
||||
</style>
|
||||
106
Vue/sidebar.php
106
Vue/sidebar.php
|
|
@ -1,106 +0,0 @@
|
|||
<!-- ======= Sidebar ======= -->
|
||||
<aside id="sidebar" class="sidebar shadow-lg">
|
||||
<div class="sidebar-header py-3 px-4 border-bottom">
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="avatar-sm bg-primary bg-opacity-10 rounded-circle d-flex align-items-center justify-content-center me-3">
|
||||
<i class="fas fa-user-md text-primary"></i>
|
||||
</div>
|
||||
<div>
|
||||
<h6 class="mb-0 fw-bold"><?= _("Navigation") ?></h6>
|
||||
<small class="text-muted"><?= _("Portail Gestionnaire") ?></small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sidebar-body">
|
||||
<ul class="sidebar-nav list-unstyled" id="sidebar-nav">
|
||||
<?php foreach ($menus as $key0 => $menuParent): ?>
|
||||
<?php
|
||||
$menuChildrenLevelOne = $gabary->get_menus_by_parent_code($menuParent['vue']);
|
||||
$hasChildren = sizeof($menuChildrenLevelOne) > 0;
|
||||
$isActiveParent = strtolower($menuParent['libeleMenu']) == strtolower($activeLevel1);
|
||||
?>
|
||||
|
||||
<?php if ($hasChildren): ?>
|
||||
<!-- Menu avec sous-menus -->
|
||||
<li class="nav-item mb-1">
|
||||
<a class="nav-link d-flex align-items-center justify-content-between py-3 px-4
|
||||
<?= $isActiveParent ? 'active-main' : '' ?>"
|
||||
data-bs-toggle="collapse"
|
||||
href="#menu-<?= $menuParent['codeMenu'] . $key0 ?>"
|
||||
role="button"
|
||||
aria-expanded="<?= $isActiveParent ? 'true' : 'false' ?>"
|
||||
aria-controls="menu-<?= $menuParent['codeMenu'] . $key0 ?>">
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="icon-wrapper bg-primary bg-opacity-10 rounded-circle d-flex align-items-center justify-content-center me-3"
|
||||
style="width: 36px; height: 36px;">
|
||||
<i class="<?= $menuParent['icone'] ?> text-primary"></i>
|
||||
</div>
|
||||
<span class="fw-medium"><?= $menuParent['libeleMenu'] ?></span>
|
||||
</div>
|
||||
<!-- Icône avec rotation CSS pure -->
|
||||
<i class="fas fa-chevron-down sidebar-chevron <?= $isActiveParent ? 'sidebar-chevron-rotated' : '' ?>"></i>
|
||||
</a>
|
||||
|
||||
<div class="collapse <?= $isActiveParent ? 'show' : '' ?>"
|
||||
id="menu-<?= $menuParent['codeMenu'] . $key0 ?>">
|
||||
<ul class="list-unstyled ps-4 py-2 bg-light rounded">
|
||||
<?php foreach ($menuChildrenLevelOne as $key1 => $menuChild): ?>
|
||||
<?php
|
||||
$link_clean = explode('/', $menuChild['lienMenu'])[0];
|
||||
$activeLink = $_SESSION['firstLevelMenu'] ?? '';
|
||||
$isActiveChild = $link_clean == $activeLink;
|
||||
?>
|
||||
<li class="mb-1">
|
||||
<a class="nav-link-sub d-flex align-items-center py-2 px-3 rounded
|
||||
<?= $isActiveChild ? 'active-submenu bg-primary text-white' : 'text-dark' ?>"
|
||||
href="<?= $menuChild['lienMenu'] ?>">
|
||||
<i class="fas fa-circle me-2" style="font-size: 0.5rem;"></i>
|
||||
<span><?= $menuChild['libeleMenu'] ?></span>
|
||||
<?php if ($isActiveChild): ?>
|
||||
<i class="fas fa-arrow-right ms-auto"></i>
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<?php else: ?>
|
||||
<!-- Menu sans sous-menus (comme Quitter) -->
|
||||
<li class="nav-item mb-1">
|
||||
<a class="nav-link d-flex align-items-center justify-content-between py-3 px-4
|
||||
<?= $isActiveParent ? 'active-main' : '' ?>"
|
||||
href="<?= $menuParent['lienMenu'] ?>">
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="icon-wrapper bg-primary bg-opacity-10 rounded-circle d-flex align-items-center justify-content-center me-3"
|
||||
style="width: 36px; height: 36px;">
|
||||
<i class="<?= $menuParent['icone'] ?> text-primary"></i>
|
||||
</div>
|
||||
<span class="fw-medium"><?= $menuParent['libeleMenu'] ?></span>
|
||||
</div>
|
||||
<!-- Flèche uniquement si le menu est actif -->
|
||||
<?php if ($isActiveParent): ?>
|
||||
<i class="fas fa-arrow-right ms-auto text-primary"></i>
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="sidebar-footer p-4 border-top bg-light">
|
||||
<div class="d-grid">
|
||||
<button class="btn btn-outline-primary d-flex align-items-center justify-content-center py-2"
|
||||
onclick="javascript:window.open('Guideutilisation/', '_blank');">
|
||||
<i class="fas fa-question-circle me-2"></i>
|
||||
<?= _("Aide & Support") ?>
|
||||
</button>
|
||||
</div>
|
||||
<div class="mt-3 text-center">
|
||||
<small class="text-muted">v<?= $_SESSION['version_C'] ?? '1.0.4' ?></small>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
<!-- End Sidebar -->
|
||||
Loading…
Reference in New Issue
Block a user