2026-03-17 17:34:34 +01:00
|
|
|
export function createFormation(raw) {
|
2026-03-20 03:06:30 +01:00
|
|
|
var taux = 0
|
|
|
|
|
var latitude = null
|
|
|
|
|
var longitude = null
|
2026-03-18 12:45:44 +01: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
|
|
|
if (raw.g_olocalisation_des_formations) {
|
|
|
|
|
latitude = raw.g_olocalisation_des_formations.lat
|
|
|
|
|
longitude = raw.g_olocalisation_des_formations.lon
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-18 12:45:44 +01:00
|
|
|
return {
|
|
|
|
|
id: raw.cod_uai + "-" + raw.lib_for_voe_ins,
|
2026-03-18 13:25:23 +01:00
|
|
|
|
2026-03-18 12:45:44 +01:00
|
|
|
nom: raw.lib_for_voe_ins,
|
|
|
|
|
etablissement: raw.g_ea_lib_vx,
|
|
|
|
|
ville: raw.ville_etab,
|
|
|
|
|
departement: raw.dep,
|
2026-03-18 13:25:23 +01:00
|
|
|
departementLib: raw.dep_lib,
|
|
|
|
|
region: raw.region_etab_aff,
|
|
|
|
|
academie: raw.acad_mies,
|
|
|
|
|
contrat: raw.contrat_etab,
|
|
|
|
|
|
2026-03-18 12:45:44 +01:00
|
|
|
filiere: raw.fili,
|
|
|
|
|
selectivite: raw.select_form,
|
2026-03-18 13:25:23 +01:00
|
|
|
|
2026-03-18 12:45:44 +01:00
|
|
|
capacite: raw.capa_fin,
|
|
|
|
|
candidats: raw.voe_tot,
|
|
|
|
|
admis: raw.acc_tot,
|
|
|
|
|
tauxAcces: taux,
|
2026-03-18 13:25:23 +01:00
|
|
|
|
2026-03-20 03:06:30 +01:00
|
|
|
latitude: latitude,
|
|
|
|
|
longitude: longitude,
|
2026-03-18 13:25:23 +01:00
|
|
|
|
|
|
|
|
pctFemmes: raw.pct_f,
|
|
|
|
|
pctBoursiers: raw.pct_bours,
|
|
|
|
|
pctNeoBac: raw.pct_neobac,
|
|
|
|
|
|
|
|
|
|
pctGeneral: raw.pct_bg,
|
|
|
|
|
pctTechno: raw.pct_bt,
|
|
|
|
|
pctPro: raw.pct_bp,
|
|
|
|
|
|
|
|
|
|
pctSansMention: raw.pct_sansmention,
|
|
|
|
|
pctAB: raw.pct_ab,
|
|
|
|
|
pctB: raw.pct_b,
|
|
|
|
|
pctTB: raw.pct_tb,
|
|
|
|
|
pctTBF: raw.pct_tbf,
|
|
|
|
|
|
|
|
|
|
pctDebutPhase: raw.pct_acc_debutpp,
|
|
|
|
|
pctDateBac: raw.pct_acc_datebac,
|
|
|
|
|
pctFinPhase: raw.pct_acc_finpp,
|
|
|
|
|
|
|
|
|
|
admisDebutPhase: raw.acc_debutpp,
|
|
|
|
|
admisDateBac: raw.acc_datebac,
|
|
|
|
|
admisFinPhase: raw.acc_finpp,
|
|
|
|
|
|
2026-03-18 14:54:01 +01:00
|
|
|
// phase principale
|
|
|
|
|
voePPGeneral: raw.nb_voe_pp_bg,
|
|
|
|
|
voePPTechno: raw.nb_voe_pp_bt,
|
|
|
|
|
voePPPro: raw.nb_voe_pp_bp,
|
|
|
|
|
voePPAutres: raw.nb_voe_pp_at,
|
|
|
|
|
voePPTotal: raw.nb_voe_pp,
|
|
|
|
|
|
|
|
|
|
classesPPGeneral: raw.nb_cla_pp_bg,
|
|
|
|
|
classesPPTechno: raw.nb_cla_pp_bt,
|
|
|
|
|
classesPPPro: raw.nb_cla_pp_bp,
|
|
|
|
|
classesPPAutres: raw.nb_cla_pp_at,
|
|
|
|
|
classesPPTotal: raw.nb_cla_pp,
|
|
|
|
|
|
|
|
|
|
propositionsPPGeneral: raw.prop_tot_bg,
|
|
|
|
|
propositionsPPTechno: raw.prop_tot_bt,
|
|
|
|
|
propositionsPPPro: raw.prop_tot_bp,
|
|
|
|
|
propositionsPPAutres: raw.prop_tot_at,
|
|
|
|
|
propositionsPPTotal: raw.prop_tot,
|
|
|
|
|
|
|
|
|
|
acceptesPPGeneral: raw.acc_bg,
|
|
|
|
|
acceptesPPTechno: raw.acc_bt,
|
|
|
|
|
acceptesPPPro: raw.acc_bp,
|
|
|
|
|
acceptesPPAutres: raw.acc_at,
|
|
|
|
|
acceptesPPTotal: raw.acc_pp,
|
|
|
|
|
|
|
|
|
|
// phase complémentaire
|
|
|
|
|
voePCGeneral: raw.nb_voe_pc_bg,
|
|
|
|
|
voePCTechno: raw.nb_voe_pc_bt,
|
|
|
|
|
voePCPro: raw.nb_voe_pc_bp,
|
|
|
|
|
voePCAutres: raw.nb_voe_pc_at,
|
|
|
|
|
voePCTotal: raw.nb_voe_pc,
|
|
|
|
|
|
|
|
|
|
classesPCTotal: raw.nb_cla_pc,
|
|
|
|
|
acceptesPCTotal: raw.acc_pc
|
2026-03-18 12:45:44 +01:00
|
|
|
}
|
|
|
|
|
}
|