1
0
forked from ScoDoc/ScoDoc

Assiduité : signal_assiduites_group : fix bug photo etud

This commit is contained in:
Iziram 2024-03-26 09:02:55 +01:00
parent b2ef6a4c53
commit b1055a4ebe
2 changed files with 9 additions and 8 deletions

View File

@ -217,13 +217,11 @@ function creerLigneEtudiant(etud, index) {
const nameField = document.createElement("div");
nameField.classList.add("name_field");
if ($("#pdp").is(":checked")) {
const pdp = document.createElement("img");
pdp.src = `../../api/etudiant/etudid/${etud.id}/photo?size=small`;
pdp.alt = `${etud.nom} ${etud.prenom}`;
pdp.classList.add("pdp");
nameField.appendChild(pdp);
}
const nameSet = document.createElement("a");
nameSet.classList.add("name_set");

View File

@ -54,7 +54,8 @@
}
document.getElementById("pdp").addEventListener("change", (e) => {
creerTousLesEtudiants(etuds);
afficherPDP(e.target.checked);
//creerTousLesEtudiants(etuds);
});
$('#date').on('change', async function(d) {
@ -87,6 +88,8 @@
}
creerTousLesEtudiants(etuds);
// affichage ou non des PDP
afficherPDP(localStorage.getItem("scodoc-etud-pdp") == "true" )
}
setTimeout(main, 0);