diff --git a/src/components/global/api/Controller.js b/src/components/global/api/Controller.js
index c6f9ef6..e5f12ee 100644
--- a/src/components/global/api/Controller.js
+++ b/src/components/global/api/Controller.js
@@ -63,22 +63,23 @@ export default class Controller {
log("Selector->Controller", "Requete Section 1")
this.model.getModelData1().then((res) => {
this.view.renderMenu(this.model.getTitle(), res)
+ this.view.renderPath(this.model.getPath())
})
} else if(n === 2) {
log("Selector->Controller", "Requete Section 2")
this.model.getModelData2().then((res) => {
this.view.renderMenu(this.model.getTitle(), res)
+ this.view.renderPath(this.model.getPath())
})
} else if(n === 3) {
log("Selector->Controller", "Requete de la liste des etablissements")
this.model.getModelData3().then((res) => {
this.view.renderStat(res)
this.view.renderEtab(res)
+ this.view.renderPath(this.model.getPath())
})
} else {
log("Selector->Controller", "Numero de page inconnue")
}
-
- this.view.renderPath(this.model.getPath())
}
}
\ No newline at end of file
diff --git a/src/components/global/api/View.js b/src/components/global/api/View.js
index c49db16..4d4b63f 100644
--- a/src/components/global/api/View.js
+++ b/src/components/global/api/View.js
@@ -18,10 +18,6 @@ export default class View {
/**
* Contruction de la balise
qui vas se loger dans le menu.
- *
- * Tous les noms des formations par section
- * Combien de formations dispo ?
- *
* @param { array[json] } data Donnees a afficher.
* @param { string } title Titre de la section d'un menu.
* */
@@ -54,16 +50,18 @@ export default class View {
* @param { array[string] } path Chemin courant.
* */
renderPath(path) {
- this.path.innerHTML = ""
- let elem = document.createElement("locfragment")
+ try {
+ this.path.innerHTML = ""
+ let elem = document.createElement("locfragment")
- riot.mount(elem, {
- msg: path.filter(Boolean).join(" ► ")
- }, "locfragment")
+ riot.mount(elem, {
+ msg: path.filter(Boolean).join(" ► ")
+ }, "locfragment")
- this.path.appendChild(elem)
+ this.path.appendChild(elem)
- log("Loc->View", `Chemin change ${path}`)
+ log("Loc->View", `Chemin change ${path}`)
+ } catch(e) {}
}
/**
@@ -82,10 +80,10 @@ export default class View {
data.forEach((e) => {
let etab = e.fields.g_ea_lib_vx
- let dept = e.fields.dep
+ let dept = `${e.fields.dep_lib} (${e.fields.dep})`
let city = e.fields.ville_etab
- let moy = "null"
- let selection = "null"
+ let moy = "?"
+ let selection = e.fields.taux_acces_ens
/**
* TODO: Transformer ca en composant riot (GALERE MAX)
@@ -105,7 +103,16 @@ export default class View {
td4.innerText = moy
let td5 = document.createElement("td")
- td5.innerText = selection
+ td5.innerText = `(${selection}%)`
+ td5.style.display = "flex"
+ td5.style.justifyContent = "center"
+ td5.style.alignItems = "center"
+ td5.style.gap = "1.3vw"
+
+ let progresstd5 = document.createElement("progress")
+ progresstd5.setAttribute("max", "100")
+ progresstd5.setAttribute("value", `${selection}`)
+ td5.appendChild(progresstd5)
tr.appendChild(td1)
tr.appendChild(td2)
@@ -141,25 +148,21 @@ export default class View {
let selectivity = 0
data.forEach((e) => {
- console.log(e.fields.select_form)
- if(e.fields.select_form === "formation sélective") {
+ if(e.fields.taux_acces_ens >= 0) {
totselectivity++
- selectivity++
+ selectivity += e.fields.taux_acces_ens
+
+ totcapacity++
+ capacity += e.fields.capa_fin
} else {
totselectivity++
}
-
- totcapacity++
- capacity += e.fields.capa_fin
})
let moyform = nbformation
let moycap = Math.round(capacity / totcapacity)
let moyselectivity = Math.round(selectivity / totselectivity)
- console.log(capacity + " " + totcapacity +"\n" + selectivity + " " + totselectivity)
- console.log(moyform + "\n" + moycap + "\n" + moyselectivity)
-
return {
capacitycount: moycap,
nformcount: moyform,
@@ -241,6 +244,7 @@ export default class View {
b += e.fields.acc_b
tb += e.fields.acc_tb
tbf += e.fields.acc_tbf
+ console.log(e.fields.lien_form_sup)
})
let tot = p + ab + b + tb + tbf
diff --git a/src/components/global/generalytics/generalysticsfragment.riot b/src/components/global/generalytics/generalysticsfragment.riot
index 6ceeca7..1fbbd60 100644
--- a/src/components/global/generalytics/generalysticsfragment.riot
+++ b/src/components/global/generalytics/generalysticsfragment.riot
@@ -31,11 +31,6 @@
max-width: 100%;
}
- #generalysticsfragment
- #woman, #man, #bacgen, #bacpro, #bactechno, #bacautre, #p, #ab, #b, #tb, #tbf {
- padding: 5px;
- }
-
#generalysticsfragment
#generalysticsfragment-gender
#generalysticsfragment-gender-percent
@@ -68,15 +63,23 @@
#generalysticsfragment
.generalysticsfragment-legend-container {
display: flex;
- flex-direction: column;
+ flex-direction: row;
justify-content: center;
align-items: center;
+ gap: 0.7vw;
}
#generalysticsfragment
.generalysticsfragment-legend-square {
- width: 40px;
- height: 40px;
+ width: 35px;
+ height: 35px;
+ border: 0.102vw solid #344D59;
+ }
+
+ #generalysticsfragment
+ .generalysticsfragment-percent {
+ border: 0.102vw solid #344D59;
+ padding: 0.15vw;
}
#generalysticsfragment
@@ -268,10 +271,15 @@
#generalysticsfragment-gen-progress {
width: 15vw;
}
-
+
+
+ Moyenne des admis
+ ?
+
+
Nb formations
{ this.props.nformcount }
@@ -283,7 +291,7 @@
-
{ `Selectivite (${this.props.selectivitycount})%`}
+
{ `Selectivite (${this.props.selectivitycount}%)`}
@@ -291,11 +299,11 @@
Repartition par genre
-
+
{ this.props.manPercent } (H)
-
+
{ this.props.womenPercent } (F)
@@ -316,19 +324,19 @@
Repartition par bac
-
+
{ this.props.nbacautre } (Aut)
-
+
{ this.props.nbactech } (Tech)
-
+
{ this.props.nbacpro } (Pro)
-
+
{ this.props.nbacgen } (Gen)
@@ -359,23 +367,23 @@
Repartition par mention
-
+
{ this.props.nmentiontbf } (TFB)
-
+
{ this.props.nmentiontb } (TB)
-
+
{ this.props.nmentionb } (B)
-
+
{ this.props.nmentionab } (AB)
-
+
{ this.props.nmentionp } (P)
diff --git a/src/components/global/selector/selectorfragment.riot b/src/components/global/selector/selectorfragment.riot
index 84bb5d3..eacfe3f 100644
--- a/src/components/global/selector/selectorfragment.riot
+++ b/src/components/global/selector/selectorfragment.riot
@@ -7,10 +7,14 @@
justify-content: space-between;
font-weight: bold;
list-style-type: none;
+ width: 100%;
}
#selectorfragment-container
.selectorfragment-name {
+ display: flex;
+ justify-content: center;
+ align-items: center;
text-decoration: none;
color: white;
justify-self: center;
@@ -47,7 +51,11 @@
\ No newline at end of file