newdesigngestionnaire/Vue/Consulterproduit/index.php
2026-03-16 12:46:10 +00:00

194 lines
12 KiB
PHP
Executable File

<?php
$codeModecalculPrime = $produit['codeModecalculPrime'];
?>
<div class="page-content animate__animated animate__fadeIn">
<div class="header-section mb-4">
<div class="d-flex align-items-center bg-white p-3 shadow-sm border-start border-primary border-4" style="border-radius: var(--radius-md);">
<div class="icon-shape bg-primary-ghost text-primary rounded-circle me-3" style="width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;">
<i class="fas fa-box fs-4"></i>
</div>
<div class="flex-grow-1">
<h4 id="titre-page" class="mb-0 fw-bold text-uppercase"><?= $this->nettoyer($produit['libelle']) ?></h4>
<p class="text-muted small mb-0"><?= _("Code Produit :") ?> <span class="badge bg-light text-muted fw-bold border"><?= $this->nettoyer($produit['codeProduit']) ?></span></p>
</div>
</div>
</div>
<input type="hidden" id="idProduit" name="idProduit" value="<?= $this->nettoyer($produit['idProduit']) ?>">
<div class="card border-0 shadow-sm mb-1">
<div class="card-header bg-white py-3">
<h6 class="mb-0 fw-bold text-primary text-uppercase"><i class="fas fa-info-circle me-2"></i><?= _("Configuration Générale") ?></h6>
</div>
<div class="card-body p-4">
<div class="row g-4">
<div class="col-md-3">
<label class="form-label small text-muted fw-bold text-uppercase"><?= _("État du Produit") ?></label>
<?php if (!empty($produit['codeEtatProduit'])): ?>
<select class="form-control bg-light border-0 fw-bold" disabled>
<?php liste_options($etatproduit,$this->nettoyer($produit['codeEtatProduit']),false); ?>
</select>
<?php else: ?>
<input class="form-control bg-light border-0" value="---" disabled>
<?php endif; ?>
</div>
<div class="col-md-5">
<label class="form-label small text-muted fw-bold text-uppercase"><?= _("Garant") ?></label>
<?php if (!empty($produit['codeGcAssureur'])): ?>
<select class="form-control bg-light border-0 fw-bold" disabled>
<?php liste_options($garant,$this->nettoyer($produit['codeGcAssureur']),false); ?>
</select>
<?php else: ?>
<input class="form-control bg-light border-0" value="---" disabled>
<?php endif; ?>
</div>
<div class="col-md-4">
<label class="form-label small text-muted fw-bold text-uppercase"><?= _("Mode de Calcul Prime") ?></label>
<?php if (!empty($produit['codeModecalculPrime'])): ?>
<select class="form-control bg-light border-0 fw-bold" disabled>
<?php liste_options($calculprime,$this->nettoyer($produit['codeModecalculPrime']),false); ?>
</select>
<?php else: ?>
<input class="form-control bg-light border-0" value="---" disabled>
<?php endif; ?>
</div>
<div class="col-md-4">
<label class="form-label small text-muted fw-bold text-uppercase"><?= _("Plafond Famille") ?></label>
<div class="h5 fw-bold mb-0 text-dark"><?= format_N($this->nettoyer($produit['plafondAdherent'])) ?></div>
</div>
</div>
</div>
</div>
<div class="card border-0 shadow-sm mb-1">
<div class="card-header bg-light py-3">
<h6 class="mb-0 fw-bold text-primary text-uppercase"><i class="fas fa-calculator me-2"></i><?= _("Détails de la Tarification") ?></h6>
</div>
<div class="card-body p-4">
<?php if($codeModecalculPrime=="TA"): ?>
<div class="row align-items-center mb-1 p-3 bg-primary-ghost rounded">
<div class="col-md-3">
<label class="small text-muted fw-bold text-uppercase"><?= _("Catégorie Tranche d'Âge") ?></label>
</div>
<div class="col-md-9">
<select class="form-control bg-white border-0 fw-bold shadow-sm" disabled>
<?php liste_options($typesTranches,$this->nettoyer($produit['codeEnteteTrancheAge'])); ?>
</select>
</div>
</div>
<div class="row g-2">
<div class="col-lg-8">
<div class="table-responsive border rounded">
<table class="table table-hover align-middle mb-0">
<thead class="bg-light small fw-bold text-muted text-uppercase">
<tr>
<th class="py-3 ps-3"><?= _("Lien Parenté") ?></th>
<th class="text-center"><?= _("Plafond") ?></th>
<th class="text-center"><?= _("Max/Famille") ?></th>
<th class="text-center"><?= _("Plus ?") ?></th>
<th class="text-end pe-3"><?= _("Surprime") ?></th>
</tr>
</thead>
<tbody class="small">
<?php $i = 0; foreach ($primeLienParente as $v):
$lien = est_anglophone() ? $this->nettoyer($v['lienparenteEng']) : $this->nettoyer($v['lienparente']);
$codeLien = $this->nettoyer($v['codeLienParente']);
?>
<tr>
<td class="ps-3 fw-bold"><?= $lien ?></td>
<td class="text-center"><?= format_N($v['plafondBeneficiaire']) ?></td>
<td class="text-center"><?= $v['nbreParFamille'] ?></td>
<td class="text-center">
<span class="badge rounded-pill <?= ($v['autoriserSupplement'] == 1) ? 'bg-success-light text-success' : 'bg-light text-muted' ?>">
<?= ($v['autoriserSupplement'] == 1) ? _("OUI") : _("NON") ?>
</span>
</td>
<td class="text-end pe-3 fw-bold text-primary"><?= format_N($v['primeSupplementaire']) ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
<div class="col-lg-4">
<div class="table-responsive border rounded">
<table class="table table-hover align-middle mb-0">
<thead class="bg-light small fw-bold text-muted text-uppercase">
<tr>
<th class="py-3 ps-3"><?= _("Âge") ?></th>
<th class="py-3 text-end pe-3"><?= _("Prime") ?></th>
</tr>
</thead>
<tbody class="small">
<?php foreach ($primeTrancheage as $v):
$libAge = est_anglophone() ? $this->nettoyer($v['libelleTrancheAgeEng']) : $this->nettoyer($v['libelleTrancheAge']);
?>
<tr>
<td class="ps-3"><?= $libAge ?></td>
<td class="text-end pe-3 fw-bold text-primary"><?= format_N($v['prime']) ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</div>
<?php else: ?>
<div class="table-responsive border rounded">
<table class="table table-hover align-middle mb-0">
<thead class="bg-light small fw-bold text-muted text-uppercase">
<tr>
<th class="py-3 ps-3"><?= _("Lien Parenté") ?></th>
<th class="text-center"><?= _("Prime Base") ?></th>
<th class="text-center"><?= _("Plafond") ?></th>
<th class="text-center"><?= _("Plus ?") ?></th>
<th class="text-center"><?= _("Max/Famille") ?></th>
<th class="text-end pe-3"><?= _("Surprime") ?></th>
</tr>
</thead>
<tbody class="small">
<?php foreach ($primeLienParente as $v):
$lien = est_anglophone() ? $this->nettoyer($v['lienparenteEng']) : $this->nettoyer($v['lienparente']);
?>
<tr>
<td class="ps-3 fw-bold"><?= $lien ?></td>
<td class="text-center text-primary fw-bold"><?= format_N($v['prime']) ?></td>
<td class="text-center"><?= format_N($v['plafondBeneficiaire']) ?></td>
<td class="text-center">
<span class="badge rounded-pill <?= ($v['autoriserSupplement'] == 1) ? 'bg-success-light text-success' : 'bg-light text-muted' ?>">
<?= ($v['autoriserSupplement'] == 1) ? _("OUI") : _("NON") ?>
</span>
</td>
<td class="text-center"><?= $v['nbreParFamille'] ?></td>
<td class="text-end pe-3 fw-bold"><?= format_N($v['primeSupplementaire']) ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<?php endif; ?>
</div>
</div>
<div class="card border-0 shadow-sm mb-5">
<div class="card-body p-3 text-center bg-light">
<button class="btn btn-primary rounded-pill px-5 fw-bold shadow-sm" onClick="retour_liste_produits();">
<?= _("Fermer la consultation") ?>
</button>
</div>
</div>
</div>
<style>
.bg-primary-ghost { background-color: rgba(33, 46, 83, 0.05); }
.bg-success-light { background-color: rgba(25, 135, 84, 0.1); }
.form-control:disabled { opacity: 1; cursor: default; }
/* Suppression flèche select en disabled */
select.form-control:disabled { -webkit-appearance: none; -moz-appearance: none; appearance: none; }
.table thead th { border-top: none; }
</style>