240 lines
10 KiB
PHP
240 lines
10 KiB
PHP
<?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 -->
|