MAJ
This commit is contained in:
+10
-8
@@ -1,10 +1,17 @@
|
||||
export function createFormation(raw) {
|
||||
let taux = 0
|
||||
var taux = 0
|
||||
var latitude = null
|
||||
var longitude = null
|
||||
|
||||
if (raw.voe_tot && raw.voe_tot > 0) {
|
||||
taux = Math.round((raw.acc_tot / raw.voe_tot) * 100)
|
||||
}
|
||||
|
||||
if (raw.g_olocalisation_des_formations) {
|
||||
latitude = raw.g_olocalisation_des_formations.lat
|
||||
longitude = raw.g_olocalisation_des_formations.lon
|
||||
}
|
||||
|
||||
return {
|
||||
id: raw.cod_uai + "-" + raw.lib_for_voe_ins,
|
||||
|
||||
@@ -25,13 +32,8 @@ export function createFormation(raw) {
|
||||
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,
|
||||
latitude: latitude,
|
||||
longitude: longitude,
|
||||
|
||||
pctFemmes: raw.pct_f,
|
||||
pctBoursiers: raw.pct_bours,
|
||||
|
||||
Reference in New Issue
Block a user