267 lines
15 KiB
PHP
Executable File
267 lines
15 KiB
PHP
Executable File
<!-- ======= 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"><?= _("Contexte d'utilisation") ?></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 SANTÉ</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 -->
|