passage du prototype en composant riot simple
This commit is contained in:
+22
-22
@@ -1,23 +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
|
||||
}
|
||||
}
|
||||
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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user