diff --git a/web/components/management/election.js b/web/components/management/election.js index ec0a71ed704ff1bcd17fac08006c55329d0a24db..92d194e5678da60fd4a0c7b69d4c6dcd61536f81 100644 --- a/web/components/management/election.js +++ b/web/components/management/election.js @@ -340,6 +340,11 @@ class Election { document.getElementById("election-modal-name").value = election.Name; document.getElementById("election-modal-ballot-type").value = election.BallotType; + + document.getElementById("election-modal-area-map").value = + election.MapAreaFile; + document.getElementById("election-modal-section-map").value = + election.MapSectionFile; Common.toggleModal("election-modal", "election-modal-card"); } @@ -353,7 +358,7 @@ class Election { this.method, parseInt(document.getElementById("election-modal-id").value), document.getElementById("election-modal-name").value, - document.getElementById("election-modal-ballot-type").value, + document.getElementById("election-modal-ballot-type").value ) ) { election = await this.ElectionModel.saveElection( diff --git a/web/components/visualization/results-detaileds.js b/web/components/visualization/results-detaileds.js index 505e000a316c0cec4a80229a4b403a2d07ade89c..69190ecca1441551980615440baa603a1b967ec9 100644 --- a/web/components/visualization/results-detaileds.js +++ b/web/components/visualization/results-detaileds.js @@ -198,15 +198,22 @@ class DetailedsResultsComponent { this.parent.parent.zone === "areas" && zone.stats.PercentageConsiderated == 100 ) { - document.getElementById("zone-detaileds-results").innerHTML += - '<br/><h5 class="title is-5">Élus</h5>'; + let electedsZone = document.getElementById("zone-detaileds-results"); + electedsZone.innerHTML = '<br/><h5 class="title is-5">Élus</h5>'; + let electedList = document.createElement("ol"); + let li; for (let i in zone.Electeds) { let candidateList = await this.CandidateListModel.getCandidateList( zone.Electeds[i].CandidateListID ); - document.getElementById("zone-detaileds-results").innerHTML += - zone.Electeds[i].FullName + " (" + candidateList.Name + ")<br/>"; + li = document.createElement("li"); + li.innerHTML = + zone.Electeds[i].FullName + " (" + candidateList.Name + ")"; + if (zone.Electeds[i].PotentialIncompatibility) + li.style.backgroundColor = "rgba(255,185,0,.95)"; + electedList.appendChild(li); } + electedsZone.appendChild(electedList); } } }