first commit

This commit is contained in:
2026-03-17 17:34:34 +01:00
commit 45fc1ff5c0
9 changed files with 358 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
export function createFormation(raw) {
let taux = 0
if (raw.voe_tot && raw.voe_tot > 0) {
taux = Math.round((raw.acc_tot / raw.voe_tot) * 100)
}
return {
id: raw.cod_uai + "-" + raw.lib_for_voe_ins,
nom: raw.lib_for_voe_ins,
etablissement: raw.g_ea_lib_vx,
ville: raw.ville_etab,
departement: raw.dep,
filiere: raw.fili,
selectivite: raw.select_form,
capacite: raw.capa_fin,
candidats: raw.voe_tot,
admis: raw.acc_tot,
tauxAcces: taux,
latitude: raw.g_olocalisation_des_formations ? raw.g_olocalisation_des_formations.lat : null,
longitude: raw.g_olocalisation_des_formations ? raw.g_olocalisation_des_formations.lon : null
}
}