fg
This commit is contained in:
parent
c2c2bab2a7
commit
bae46aa358
|
|
@ -62020,52 +62020,44 @@ function detail_baremepriseencharge(idBaremePriseEnCharge)
|
||||||
* Gère l'affichage de la Section 1 : Standard de la Famille
|
* Gère l'affichage de la Section 1 : Standard de la Famille
|
||||||
*/
|
*/
|
||||||
function afficherMasquerGarantiesBareme() {
|
function afficherMasquerGarantiesBareme() {
|
||||||
// 1. Récupération sécurisée de la valeur
|
// 1. Récupérer l'état actuel
|
||||||
var masquerGarantie = $("#masquerGarantie").val();
|
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. Ciblage des éléments
|
// 2. Cibler les éléments
|
||||||
var blocContenu = $('#div_garanties_masquer');
|
var divMasquer = $('#div_garanties_masquer');
|
||||||
var iconeChevron = $("#span_bareme");
|
var icone = $("#span_bareme");
|
||||||
|
|
||||||
if (masquerGarantie == "1") {
|
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 ---
|
// --- ACTION : OUVRIR ---
|
||||||
blocContenu.show();
|
divMasquer.show();
|
||||||
$("#masquerGarantie").val("0"); // On change l'état à "ouvert"
|
$("#masquerGarantie").val("1");
|
||||||
|
|
||||||
// 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();
|
intit_saisie_garantiebareme();
|
||||||
actualiser_bareme_garantie();
|
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 ---
|
// --- ACCORDÉON : FERMER LES AUTRES ---
|
||||||
// On réinitialise les inputs des autres blocs
|
|
||||||
$("#masquerGarantieLienParente").val("1");
|
$("#masquerGarantieLienParente").val("1");
|
||||||
$("#masquerActe").val("1");
|
$("#masquerActe").val("1");
|
||||||
$("#masquerActeLienParente").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é"
|
|
||||||
|
|
||||||
// Bascule l'icône vers le BAS
|
afficherMasquerGarantiesBaremeLienParente();
|
||||||
iconeChevron.removeClass("fa-chevron-up text-primary").addClass("fa-chevron-down text-muted");
|
afficherMasquerActeBareme();
|
||||||
|
afficherMasquerActeBaremeLienParente();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 3. Mise à jour du compteur
|
// 3. Update compteur
|
||||||
afficheNombreLigneBareme('garantiesbaremepriseencharge');
|
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();">
|
<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">
|
<span class="fw-bold text-dark small text-uppercase">
|
||||||
1. <?= _("Règle Standard de la Famille") ?>
|
1. <?= _("Règle Standard de la Famille") ?>
|
||||||
<span id="garantiesbaremepriseencharge" class="ms-2 badge bg-light text-primary border fw-normal"></span>
|
<span id="garantiesbaremepriseencharge" class="ms-2 badge bg-light text-primary border"></span>
|
||||||
</span>
|
</span>
|
||||||
<i id="span_bareme" class="fas fa-chevron-down text-muted"></i>
|
<i id="span_bareme" class="fas fa-chevron-down text-muted"></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user