From f7a99d34b29a94b6381cbe1b1446466795da0492 Mon Sep 17 00:00:00 2001 From: lehmann Date: Sat, 30 Dec 2023 10:11:01 +0100 Subject: [PATCH] Correction bug ref competences --- app/static/js/ref_competences.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/app/static/js/ref_competences.js b/app/static/js/ref_competences.js index 38d2730b..918ec4cb 100644 --- a/app/static/js/ref_competences.js +++ b/app/static/js/ref_competences.js @@ -66,10 +66,7 @@ class ref_competences extends HTMLElement { let divCompetence = document.createElement("div"); divCompetence.innerText = `${competence} ${niveauCle.niveau}`; divCompetence.style.gridRowStart = annee; - divCompetence.style.gridColumnStart = competence.replaceAll( - " ", - "_" - ); + divCompetence.style.gridColumnStart = competence.replaceAll(" ","_").replaceAll("'", "_"); divCompetence.className = "comp" + numComp; divCompetence.dataset.competence = `${competence} ${niveauCle.niveau}`; divCompetence.addEventListener("click", (event) => { @@ -88,9 +85,9 @@ class ref_competences extends HTMLElement { let gridTemplate = ""; Object.keys(this.data.competences).forEach((competence) => { if (competencesBucket.indexOf(competence) == -1) { - gridTemplate += `[${competence.replaceAll(" ", "_")}] 0`; + gridTemplate += `[${competence.replaceAll(" ", "_").replaceAll("'", "_")}] 0`; } else { - gridTemplate += `[${competence.replaceAll(" ", "_")}] 1fr`; + gridTemplate += `[${competence.replaceAll(" ", "_").replaceAll("'", "_")}] 1fr`; } }); this.shadow.querySelector(".competences").style.gridTemplateColumns =