diff --git a/parcoursup/app.riot b/parcoursup/app.riot index 26c4cbb..ecf46dc 100644 --- a/parcoursup/app.riot +++ b/parcoursup/app.riot @@ -33,6 +33,7 @@ hasSearched: false, results: [], selected: null + selectedFormations: [] }, async launchSearch(query) { @@ -73,6 +74,24 @@ }) }, + addToSelection(index) { + const formation = this.state.results[index] + const selection = [...this.state.selectedFormations] + + let exists = false + + for (let i = 0; i < selection.length; i++) { + if (selection[i].id === formation.id) { + exists = true + } + } + + if (!exists) { + selection.push(formation) + this.update({ selectedFormations: selection }) + } +}, + backToList() { this.update({ selected: null diff --git a/parcoursup/components/detail-view.riot b/parcoursup/components/detail-view.riot index 3084a1f..cde24b5 100644 --- a/parcoursup/components/detail-view.riot +++ b/parcoursup/components/detail-view.riot @@ -22,30 +22,68 @@

Profil des admis

-

Femmes : { props.formation.pctFemmes }%

-

Boursiers : { props.formation.pctBoursiers }%

-

Néo-bacheliers : { props.formation.pctNeoBac }%

-

Bac général : { props.formation.pctGeneral }%

-

Bac technologique : { props.formation.pctTechno }%

-

Bac professionnel : { props.formation.pctPro }%

+
+
Répartition des bacs
+ + + + + + + + + + + + + + + + +
Général + { props.formation.pctGeneral }% +
Technologique + { props.formation.pctTechno }% +
Professionnel + { props.formation.pctPro }% +
+

Mentions au bac

-

Sans mention : { props.formation.pctSansMention }%

-

Assez bien : { props.formation.pctAB }%

-

Bien : { props.formation.pctB }%

-

Très bien : { props.formation.pctTB }%

-

Très bien avec félicitations : { props.formation.pctTBF }%

- -
- -

Phase principale

-

Début de phase : { props.formation.pctDebutPhase }% ({ props.formation.admisDebutPhase } admis)

-

Date du bac : { props.formation.pctDateBac }% ({ props.formation.admisDateBac } admis)

-

Fin de phase : { props.formation.pctFinPhase }% ({ props.formation.admisFinPhase } admis)

+
+ + + + + + + + + + + + + + + + + + + +
Sans mention + { props.formation.pctSansMention }% +
AB + { props.formation.pctAB }% +
B + { props.formation.pctB }% +
TB + { props.formation.pctTB }% +
+
\ No newline at end of file diff --git a/parcoursup/components/map-view.riot b/parcoursup/components/map-view.riot index 3bfd26d..067b92f 100644 --- a/parcoursup/components/map-view.riot +++ b/parcoursup/components/map-view.riot @@ -1,13 +1,15 @@

Carte des formations

-
+
+ diff --git a/parcoursup/style.css b/parcoursup/style.css index e1b9373..296703f 100644 --- a/parcoursup/style.css +++ b/parcoursup/style.css @@ -68,7 +68,7 @@ body { padding: 20px; border-radius: 8px; } - + .detail-card hr { margin: 18px 0; border: none; @@ -85,13 +85,10 @@ body { } .map-box { - border: 1px solid #d8d8d8; - background: white; - border-radius: 8px; - padding: 12px; + overflow: hidden; } - #map { + .map { height: 420px; width: 100%; border-radius: 6px; @@ -103,6 +100,15 @@ body { border: 1px solid #d8d8d8; border-radius: 8px; } + + .chart-container { + margin-top: 15px; + } + + .chart-title { + margin: 10px 0; + font-weight: bold; + } @media (min-width: 900px) { .layout {