1
0
forked from ScoDoc/ScoDoc

Correction ref compétences

This commit is contained in:
Sébastien Lehmann 2022-11-28 18:03:48 +01:00 committed by iziram
parent 4c730a6302
commit 25d1132a06

View File

@ -61,7 +61,7 @@ class ref_competences extends HTMLElement {
let divCompetence = document.createElement("div");
divCompetence.innerText = `${competence} ${niveauCle.niveau}`;
divCompetence.style.gridRowStart = annee;
divCompetence.style.gridColumnStart = competence;
divCompetence.style.gridColumnStart = competence.replaceAll(" ", "_");
divCompetence.className = "comp" + numComp;
divCompetence.dataset.competence = `${competence} ${niveauCle.niveau}`;
divCompetence.addEventListener("click", (event) => { this.AC(event, competence, niveauCle.niveau, annee, numComp) })
@ -76,9 +76,9 @@ class ref_competences extends HTMLElement {
let gridTemplate = "";
Object.keys(this.data.competences).forEach(competence => {
if (competencesBucket.indexOf(competence) == -1) {
gridTemplate += `[${competence}] 0`;
gridTemplate += `[${competence.replaceAll(" ", "_")}] 0`;
} else {
gridTemplate += `[${competence}] 1fr`;
gridTemplate += `[${competence.replaceAll(" ", "_")}] 1fr`;
}
})
this.shadow.querySelector(".competences").style.gridTemplateColumns = gridTemplate;