1
0
forked from ScoDoc/ScoDoc

Mise à jour de 'app/static/js/releve-but.js'

Suppression du block moyenne lorsque `data.options.block_moyenne_generale`   est true
This commit is contained in:
pascal.bouron 2023-01-12 21:21:03 +01:00
parent 79bdf03caa
commit fe640ee8d5

View File

@ -211,7 +211,9 @@ class releveBUT extends HTMLElement {
this.shadow.querySelector("#identite_etudiant").innerHTML = ` <a href="${data.etudiant.fiche_url}">${data.etudiant.nomprenom}</a> `; this.shadow.querySelector("#identite_etudiant").innerHTML = ` <a href="${data.etudiant.fiche_url}">${data.etudiant.nomprenom}</a> `;
this.shadow.querySelector(".dateInscription").innerHTML += this.ISOToDate(data.semestre.inscription); this.shadow.querySelector(".dateInscription").innerHTML += this.ISOToDate(data.semestre.inscription);
let output = ` let output = '';
if(!data.options.block_moyenne_generale){
output += `
<div> <div>
<div class=enteteSemestre>Moyenne</div><div class=enteteSemestre>${data.semestre.notes.value}</div> <div class=enteteSemestre>Moyenne</div><div class=enteteSemestre>${data.semestre.notes.value}</div>
<div class=rang>Rang :</div><div class=rang>${data.semestre.rang.value} / ${data.semestre.rang.total}</div> <div class=rang>Rang :</div><div class=rang>${data.semestre.rang.value} / ${data.semestre.rang.total}</div>
@ -219,6 +221,9 @@ class releveBUT extends HTMLElement {
<div>Moy. promo. :</div><div>${data.semestre.notes.moy}</div> <div>Moy. promo. :</div><div>${data.semestre.notes.moy}</div>
<div>Min. promo. :</div><div>${data.semestre.notes.min}</div> <div>Min. promo. :</div><div>${data.semestre.notes.min}</div>
</div> </div>
`;
}
output += `
${(() => { ${(() => {
if ((!data.semestre.rang.groupes) || if ((!data.semestre.rang.groupes) ||
(Object.keys(data.semestre.rang.groupes).length == 0)) { (Object.keys(data.semestre.rang.groupes).length == 0)) {