This commit is contained in:
KONE SOREL 2026-04-07 17:55:00 +00:00
parent 6a95066720
commit decf034416
3 changed files with 55 additions and 31 deletions

View File

@ -62047,7 +62047,7 @@ function detail_baremepriseencharge(idBaremePriseEnCharge)
// 20-02-2022
/**
* Gère l'affichage de la Section 1 : Standard de la Famille
* Gère l'affichage de la Section 1 : Standard de la Garantie
*/
function afficherMasquerGarantiesBareme() {
debugger;
@ -62093,38 +62093,50 @@ function afficherMasquerGarantiesBareme() {
}
function afficherMasquerGarantiesBaremeLienParente()
{
masquerGarantieLienParente = $("#masquerGarantieLienParente").val();
/**
* Gère l'affichage de la Section 2 : Spécificités de la Garantie par Lien Parenté
*/
function afficherMasquerGarantiesBaremeLienParente() {
debugger;
// 1. Récupérer l'état actuel
var masquerGarantieLienParente = $("#masquerGarantieLienParente").val();
if (masquerGarantieLienParente == undefined) { masquerGarantieLienParente = "1"; }
if(masquerGarantieLienParente == undefined){
masquerGarantieLienParente = "1";
}
if(masquerGarantieLienParente=="1"){
$('#div_garanties_lienparente_masquer').hide();
$("#masquerGarantieLienParente").val("0");
$("#span_garantie_lienparente").text("[+]");
}else{
$('#div_garanties_lienparente_masquer').show();
$("#masquerGarantieLienParente").val("1");
intit_saisie_garantiebareme_lienparente();
// 2. Cibler les éléments
var divMasquer = $('#div_garanties_lienparente_masquer');
var icone = $("#span_bareme");
if (masquerGarantieLienParente == "1") {
// --- ACTION : FERMER ---
divMasquer.hide();
$("#masquerGarantieLienParente").val("0");
// On remet le chevron vers le BAS (Fermé)
icone.attr('class', 'fas fa-chevron-down text-muted');
} else {
// --- ACTION : OUVRIR ---
divMasquer.show();
$("#masquerGarantieLienParente").val("1");
intit_saisie_garantiebareme_lienparente();
actualiser_bareme_garantie_lienparente();
$("#span_garantie_lienparente").text("[-]");
$("#masquerGarantie").val("1");
$("#masquerActe").val("1");
$("#masquerActeLienParente").val("1");
afficherMasquerGarantiesBareme();
// On met le chevron vers le HAUT (Ouvert)
icone.attr('class', 'fas fa-chevron-up text-primary');
// --- ACCORDÉON : FERMER LES AUTRES ---
$("#masquerGarantieLienParente").val("1");
$("#masquerActe").val("1");
$("#masquerActeLienParente").val("1");
afficherMasquerGarantiesBareme();
afficherMasquerActeBareme();
afficherMasquerActeBaremeLienParente();
}
afficheNombreLigneBareme('garantiesbaremepriseenchargelienparente');
}
// 3. Update compteur
afficheNombreLigneBareme('garantiesbaremepriseenchargelienparente');
}

View File

@ -38,9 +38,12 @@
1. <?= _("Règle Standard de la Garantie") ?>
<span id="garantiesbaremepriseencharge" class="ms-2 badge bg-light text-primary border fs-6"></span>
</span>
<i id="span_bareme" class="fas fa-chevron-down text-muted"></i>
</div>
<input type="hidden" id="masquerGarantie" value="1">
<div id="div_garanties_masquer" class="bg-light p-3 rounded shadow-sm border">
<h6 class="text-uppercase fw-bold text-secondary mb-3 small">
<i class="fas fa-layer-group me-2"></i><?= _("Particularités sur Garantie") ?>
@ -209,10 +212,16 @@
<div class="card border-0 shadow-sm mb-4 rounded-3">
<div class="card-header bg-white py-3 cursor-pointer d-flex justify-content-between align-items-center" onclick="afficherMasquerGarantiesBaremeLienParente();">
<span class="fw-bold text-dark small text-uppercase">2. <?= _("Spécificités de la Garantie par Profil (Lien Parenté)") ?> <span id="garantiesbaremepriseenchargelienparente" class="ms-2 badge bg-light text-primary border fw-normal"></span></span>
<span class="fw-bold text-dark small text-uppercase">
2. <?= _("Spécificités de la Garantie par Lien Parenté") ?>
<span id="garantiesbaremepriseenchargelienparente" class="ms-2 badge bg-light text-primary border fs-6"></span>
</span>
<i id="span_garantie_lienparente" class="fas fa-chevron-down text-muted"></i>
</div>
<input type="hidden" id="masquerGarantieLienParente" value="1">
<div id="div_garanties_lienparente_masquer" class="card-body border-top bg-white" style="display:none;">
<div class="p-4 mb-3 rounded-3 bg-light border-dashed">
<div class="row g-2 mb-3">

View File

@ -1 +1,4 @@
<span id="garantiesbaremepriseenchargelienparente" ><?= "(".$nbgarantieLien.")"; ?></span>
<?php
$txt_nbgarantieLien = ($nbgarantieLien < 10) ? "0".$nbgarantieLien : $nbgarantieLien;
?>
<span id="garantiesbaremepriseenchargelienparente" ><?= $txt_nbgarantieLien; ?></span>