forked from ScoDoc/DocScoDoc
Correction ref compétences
This commit is contained in:
parent
7653342142
commit
594bbd84fd
@ -61,7 +61,7 @@ class ref_competences extends HTMLElement {
|
|||||||
let divCompetence = document.createElement("div");
|
let divCompetence = document.createElement("div");
|
||||||
divCompetence.innerText = `${competence} ${niveauCle.niveau}`;
|
divCompetence.innerText = `${competence} ${niveauCle.niveau}`;
|
||||||
divCompetence.style.gridRowStart = annee;
|
divCompetence.style.gridRowStart = annee;
|
||||||
divCompetence.style.gridColumnStart = competence;
|
divCompetence.style.gridColumnStart = competence.replaceAll(" ", "_");
|
||||||
divCompetence.className = "comp" + numComp;
|
divCompetence.className = "comp" + numComp;
|
||||||
divCompetence.dataset.competence = `${competence} ${niveauCle.niveau}`;
|
divCompetence.dataset.competence = `${competence} ${niveauCle.niveau}`;
|
||||||
divCompetence.addEventListener("click", (event) => { this.AC(event, competence, niveauCle.niveau, annee, numComp) })
|
divCompetence.addEventListener("click", (event) => { this.AC(event, competence, niveauCle.niveau, annee, numComp) })
|
||||||
@ -76,9 +76,9 @@ class ref_competences extends HTMLElement {
|
|||||||
let gridTemplate = "";
|
let gridTemplate = "";
|
||||||
Object.keys(this.data.competences).forEach(competence => {
|
Object.keys(this.data.competences).forEach(competence => {
|
||||||
if (competencesBucket.indexOf(competence) == -1) {
|
if (competencesBucket.indexOf(competence) == -1) {
|
||||||
gridTemplate += `[${competence}] 0`;
|
gridTemplate += `[${competence.replaceAll(" ", "_")}] 0`;
|
||||||
} else {
|
} else {
|
||||||
gridTemplate += `[${competence}] 1fr`;
|
gridTemplate += `[${competence.replaceAll(" ", "_")}] 1fr`;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.shadow.querySelector(".competences").style.gridTemplateColumns = gridTemplate;
|
this.shadow.querySelector(".competences").style.gridTemplateColumns = gridTemplate;
|
||||||
|
Loading…
Reference in New Issue
Block a user