fty
This commit is contained in:
parent
d6acd5f3b3
commit
c2c2bab2a7
|
|
@ -62020,44 +62020,52 @@ function detail_baremepriseencharge(idBaremePriseEnCharge)
|
|||
* Gère l'affichage de la Section 1 : Standard de la Famille
|
||||
*/
|
||||
function afficherMasquerGarantiesBareme() {
|
||||
// 1. Récupérer l'état actuel
|
||||
// 1. Récupération sécurisée de la valeur
|
||||
var masquerGarantie = $("#masquerGarantie").val();
|
||||
if (masquerGarantie == undefined) { masquerGarantie = "1"; }
|
||||
|
||||
// Si c'est la première fois ou indéfini, on initialise à 1 (fermé)
|
||||
if(masquerGarantie == undefined || masquerGarantie == "") {
|
||||
masquerGarantie = "1";
|
||||
}
|
||||
|
||||
// 2. Cibler les éléments
|
||||
var divMasquer = $('#div_garanties_masquer');
|
||||
var icone = $("#span_bareme");
|
||||
// 2. Ciblage des éléments
|
||||
var blocContenu = $('#div_garanties_masquer');
|
||||
var iconeChevron = $("#span_bareme");
|
||||
|
||||
if (masquerGarantie == "1") {
|
||||
// --- ACTION : FERMER ---
|
||||
divMasquer.hide();
|
||||
$("#masquerGarantie").val("0");
|
||||
|
||||
// On remet le chevron vers le BAS (Fermé)
|
||||
icone.attr('class', 'fas fa-chevron-down text-muted');
|
||||
|
||||
} else {
|
||||
// --- ACTION : OUVRIR ---
|
||||
divMasquer.show();
|
||||
$("#masquerGarantie").val("1");
|
||||
blocContenu.show();
|
||||
$("#masquerGarantie").val("0"); // On change l'état à "ouvert"
|
||||
|
||||
// Bascule l'icône vers le HAUT
|
||||
iconeChevron.removeClass("fa-chevron-down text-muted").addClass("fa-chevron-up text-primary");
|
||||
|
||||
// Initialisation métier
|
||||
intit_saisie_garantiebareme();
|
||||
actualiser_bareme_garantie();
|
||||
|
||||
// On met le chevron vers le HAUT (Ouvert)
|
||||
icone.attr('class', 'fas fa-chevron-up text-primary');
|
||||
|
||||
// --- ACCORDÉON : FERMER LES AUTRES ---
|
||||
// On réinitialise les inputs des autres blocs
|
||||
$("#masquerGarantieLienParente").val("1");
|
||||
$("#masquerActe").val("1");
|
||||
$("#masquerActeLienParente").val("1");
|
||||
|
||||
// On appelle les fonctions de fermeture des autres sections
|
||||
// (Assure-toi que ces fonctions existent et ne plantent pas)
|
||||
if(typeof afficherMasquerGarantiesBaremeLienParente === "function") afficherMasquerGarantiesBaremeLienParente();
|
||||
if(typeof afficherMasquerActeBareme === "function") afficherMasquerActeBareme();
|
||||
if(typeof afficherMasquerActeBaremeLienParente === "function") afficherMasquerActeBaremeLienParente();
|
||||
|
||||
} else {
|
||||
// --- ACTION : FERMER ---
|
||||
blocContenu.hide();
|
||||
$("#masquerGarantie").val("1"); // On remet l'état à "fermé"
|
||||
|
||||
afficherMasquerGarantiesBaremeLienParente();
|
||||
afficherMasquerActeBareme();
|
||||
afficherMasquerActeBaremeLienParente();
|
||||
// Bascule l'icône vers le BAS
|
||||
iconeChevron.removeClass("fa-chevron-up text-primary").addClass("fa-chevron-down text-muted");
|
||||
}
|
||||
|
||||
// 3. Update compteur
|
||||
// 3. Mise à jour du compteur
|
||||
afficheNombreLigneBareme('garantiesbaremepriseencharge');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
<div class="card-header bg-white py-3 cursor-pointer d-flex justify-content-between align-items-center" onclick="afficherMasquerGarantiesBareme();">
|
||||
<span class="fw-bold text-dark small text-uppercase">
|
||||
1. <?= _("Règle Standard de la Famille") ?>
|
||||
<span id="garantiesbaremepriseencharge" class="ms-2 badge bg-light text-primary border"></span>
|
||||
<span id="garantiesbaremepriseencharge" class="ms-2 badge bg-light text-primary border fw-normal"></span>
|
||||
</span>
|
||||
<i id="span_bareme" class="fas fa-chevron-down text-muted"></i>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user