Correctif relevé tri UEs capitalisées
This commit is contained in:
parent
c6a06266fa
commit
d178c636bf
@ -279,6 +279,17 @@ section>div:nth-child(1) {
|
||||
background: var(--couleurFondTitresSAE) !important;
|
||||
color: #000 !important;
|
||||
}
|
||||
/* UE Capitalisée */
|
||||
.synthese .ue.capitalisee,
|
||||
.ue.capitalisee>h3{
|
||||
background: var(--couleurFondTitresUECapitalisee);;
|
||||
}
|
||||
.synthese .ue.capitalisee>h3::before{
|
||||
content: "Capitalisée : ";
|
||||
}
|
||||
.synthese .ue.capitalisee .ue_rang{
|
||||
display: none;
|
||||
}
|
||||
|
||||
/***************/
|
||||
/* Evaluations */
|
||||
@ -294,6 +305,7 @@ section>div:nth-child(1) {
|
||||
padding: 4px 32px;
|
||||
border-radius: 4px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
margin: 4px 0 2px 0;
|
||||
overflow-x: auto;
|
||||
@ -337,8 +349,6 @@ section>div:nth-child(1) {
|
||||
}
|
||||
|
||||
h3 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 0 auto 0 0;
|
||||
position: sticky;
|
||||
left: -32px;
|
||||
|
@ -305,7 +305,16 @@ class releveBUT extends HTMLElement {
|
||||
/*******************************/
|
||||
showSynthese(data) {
|
||||
let output = ``;
|
||||
Object.entries(data.ues).forEach(([ue, dataUE]) => {
|
||||
/* Fusion et tri des UE et UE capitalisées */
|
||||
let fusionUE = [
|
||||
...Object.entries(data.ues),
|
||||
...Object.entries(data.ues_capitalisees)
|
||||
].sort((a, b) => {
|
||||
return a[1].numero - b[1].numero
|
||||
});
|
||||
|
||||
/* Affichage */
|
||||
fusionUE.forEach(([ue, dataUE]) => {
|
||||
if (dataUE.type == 1) { // UE Sport / Bonus
|
||||
output += `
|
||||
<div>
|
||||
@ -319,17 +328,22 @@ class releveBUT extends HTMLElement {
|
||||
} else {
|
||||
output += `
|
||||
<div>
|
||||
<div class=ue>
|
||||
<div class="ue ${dataUE.date_capitalisation?"capitalisee":""}">
|
||||
<h3>
|
||||
${ue}${(dataUE.titre) ? " - " + dataUE.titre : ""}
|
||||
</h3>
|
||||
<div>
|
||||
<div class=moyenne>Moyenne : ${dataUE.moyenne?.value ?? "-"}</div>
|
||||
<div class=moyenne>Moyenne : ${dataUE.moyenne?.value || dataUE.moyenne || "-"}</div>
|
||||
<div class=ue_rang>Rang : ${dataUE.moyenne?.rang} / ${dataUE.moyenne?.total}</div>
|
||||
<div class=info>
|
||||
Bonus : ${dataUE.bonus || 0} -
|
||||
Malus : ${dataUE.malus || 0}
|
||||
<span class=ects> -
|
||||
<div class=info>`;
|
||||
if(!dataUE.date_capitalisation){
|
||||
output += ` Bonus : ${dataUE.bonus || 0} -
|
||||
Malus : ${dataUE.malus || 0}`;
|
||||
} else {
|
||||
output += ` le ${this.ISOToDate(dataUE.date_capitalisation.split("T")[0])} <a href="${dataUE.bul_orig_url}">dans ce semestre</a>`;
|
||||
}
|
||||
|
||||
output += ` <span class=ects> -
|
||||
ECTS : ${dataUE.ECTS?.acquis ?? "-"} / ${dataUE.ECTS?.total ?? "-"}
|
||||
</span>
|
||||
</div>
|
||||
@ -338,57 +352,19 @@ class releveBUT extends HTMLElement {
|
||||
<div>Abs N.J.</div><div>${dataUE.absences?.injustifie || 0}</div>
|
||||
<div>Total</div><div>${dataUE.absences?.total || 0}</div>
|
||||
</div>*/
|
||||
output += `
|
||||
</div>
|
||||
${this.synthese(data, dataUE.ressources)}
|
||||
${this.synthese(data, dataUE.saes)}
|
||||
</div>
|
||||
`;
|
||||
/* UE capitalisées */
|
||||
if (data.ues_capitalisees !== undefined) {
|
||||
if (ue in data.ues_capitalisees) {
|
||||
output += this.show_ue_capitalisee(ue, data.ues_capitalisees[ue]);
|
||||
delete data.ues_capitalisees[ue];
|
||||
}
|
||||
output += "</div>";
|
||||
|
||||
if(!dataUE.date_capitalisation){
|
||||
output +=
|
||||
this.synthese(data, dataUE.ressources) +
|
||||
this.synthese(data, dataUE.saes);
|
||||
}
|
||||
|
||||
output += "</div>";
|
||||
}
|
||||
});
|
||||
/* UE capitalisées seulement (non déjà vues) */
|
||||
if (data.ues_capitalisees !== undefined) {
|
||||
Object.entries(data.ues_capitalisees).forEach(([ue, ue_cap]) => {
|
||||
output += this.show_ue_capitalisee(ue, data.ues_capitalisees[ue]);
|
||||
});
|
||||
}
|
||||
this.shadow.querySelector(".synthese").innerHTML = output;
|
||||
}
|
||||
|
||||
show_ue_capitalisee(ue, ue_cap) {
|
||||
let date_capitalisation = new Date(ue_cap.date_capitalisation).toLocaleString("fr-FR");
|
||||
let link_sem = "";
|
||||
if (ue_cap.bul_orig_url != null) {
|
||||
link_sem = `<a href="${ue_cap.bul_orig_url}">dans ce semestre</a>`;
|
||||
}
|
||||
return `
|
||||
<div>
|
||||
<div class="ue ue_capitalisee">
|
||||
<h3>
|
||||
Capitalisée : ${ue}${(ue_cap.titre) ? " - " + ue_cap.titre : ""}
|
||||
</h3>
|
||||
<div>
|
||||
<div class=moyenne>Moyenne : ${ue_cap.moyenne ?? "-"}</div>
|
||||
|
||||
<div class=info>
|
||||
le ${date_capitalisation} ${link_sem}
|
||||
<span class=ects>
|
||||
ECTS : ${ue_cap.ECTS?.acquis ?? "-"} / ${ue_cap.ECTS?.total ?? "-"}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
}
|
||||
|
||||
|
||||
synthese(data, modules) {
|
||||
let output = "";
|
||||
Object.entries(modules).forEach(([module, dataModule]) => {
|
||||
|
Loading…
Reference in New Issue
Block a user