diff --git a/app/static/js/assiduites.js b/app/static/js/assiduites.js index f668c3d5..59aefad1 100644 --- a/app/static/js/assiduites.js +++ b/app/static/js/assiduites.js @@ -158,11 +158,12 @@ function validateSelectors(btn) { getAssiduitesFromEtuds(true); - document.querySelector(".selectors").disabled = true; - $("#tl_date").datepicker("option", "disabled", true); + // document.querySelector(".selectors").disabled = true; + // $("#tl_date").datepicker("option", "disabled", true); generateMassAssiduites(); generateAllEtudRow(); - btn.remove(); + // btn.remove(); + btn.textContent = "Actualiser"; onlyAbs(); }; @@ -581,6 +582,7 @@ function massAction() { * puis on ajoute les événements associés */ function generateMassAssiduites() { + if (readOnly || document.querySelector(".mass-selection") != null) return; const content = document.getElementById("content"); const mass = document.createElement("div"); @@ -1459,7 +1461,8 @@ function generateEtudRow( assi += ``; } }); - const conflit = assiduite.type == "conflit" ? "conflit" : ""; + if (readOnly) assi = ""; + const conflit = assiduite.type == "conflit" && !readOnly ? "conflit" : ""; const pdp_url = `${getUrl()}/api/etudiant/etudid/${etud.id}/photo?size=small`; let defdem = ""; @@ -1591,11 +1594,11 @@ function generateAllEtudRow() { return; } - if (!document.querySelector(".selectors")?.disabled) { - return; - } - - document.querySelector(".etud_holder").innerHTML = ""; + // if (!document.querySelector(".selectors")?.disabled) { + // return; + // } + const etud_hodler = document.querySelector(".etud_holder"); + if (etud_hodler) etud_hodler.innerHTML = ""; etuds_ids = Object.keys(etuds).sort((a, b) => etuds[a].nom > etuds[b].nom ? 1 : etuds[b].nom > etuds[a].nom ? -1 : 0 ); diff --git a/app/templates/assiduites/pages/signal_assiduites_etud.j2 b/app/templates/assiduites/pages/signal_assiduites_etud.j2 index 2284604a..ea453095 100644 --- a/app/templates/assiduites/pages/signal_assiduites_etud.j2 +++ b/app/templates/assiduites/pages/signal_assiduites_etud.j2 @@ -102,6 +102,9 @@ setupTimeLine(() => { + if(document.querySelector('.etud_holder .placeholder') != null){ + generateAllEtudRow(); + } updateJustifyBtn(); }); diff --git a/app/templates/assiduites/pages/signal_assiduites_group.j2 b/app/templates/assiduites/pages/signal_assiduites_group.j2 index 15fd6a48..238dd25c 100644 --- a/app/templates/assiduites/pages/signal_assiduites_group.j2 +++ b/app/templates/assiduites/pages/signal_assiduites_group.j2 @@ -26,11 +26,9 @@ + {% if readonly == "false" %} {{timeline|safe}} - - - {% if readonly == "false" %}