Séparation des résultats par tour
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
export function getNomZone(typeResultats, resultats) {
|
||||
if (!resultats || resultats.length === 0)
|
||||
export function getNomZone(typeResultats, zoneInfo) {
|
||||
if (!zoneInfo)
|
||||
return ""
|
||||
else if (typeResultats === "france")
|
||||
return "France"
|
||||
else if (typeResultats === "region")
|
||||
return `Région ${resultats.region.nom}`
|
||||
return `Région ${zoneInfo.nom}`
|
||||
else if (typeResultats === "departement")
|
||||
return `Département ${resultats.departement.nom}`
|
||||
return `Département ${zoneInfo.nom}`
|
||||
else if (typeResultats === "circonscription")
|
||||
return `Circonscription ${resultats.circonscription.id}`
|
||||
return `Circonscription ${zoneInfo.id}`
|
||||
else if (typeResultats === "commune")
|
||||
return `Commune ${resultats.commune.nom}`
|
||||
return `Commune ${zoneInfo.nom}`
|
||||
else if (typeResultats === "bureau_vote")
|
||||
return resultats.bureau_vote.libelle
|
||||
return zoneInfo.libelle
|
||||
}
|
||||
|
||||
export function trierCandidats(candidats, voix_par_candidat) {
|
||||
|
Reference in New Issue
Block a user