Files
public-html2/parcoursup/formation.js
T

23 lines
695 B
JavaScript
Raw Normal View History

2026-03-31 17:54:23 +02:00
export function createFormation(raw) {
let taux = 0
2026-03-21 13:47:09 +01:00
2026-03-31 17:54:23 +02:00
if (raw.voe_tot && raw.voe_tot > 0) {
taux = Math.round((raw.acc_tot / raw.voe_tot) * 100)
2026-03-20 03:06:30 +01:00
}
return {
2026-03-31 17:54:23 +02:00
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
}
}