diff --git a/web/components/management/party.js b/web/components/management/party.js index 791c3e38efff6e03516442159d27661231bdb276..01b86e2758aa73d0662b613977864535ef2b53b3 100644 --- a/web/components/management/party.js +++ b/web/components/management/party.js @@ -222,11 +222,13 @@ class Party { document.body.appendChild(deleteModal); partyHandler.party = party; let candidateLists = await partyHandler.CandidateListModel.getCandidateLists(); - candidateLists.filter(function (candidateList) { + candidateLists = candidateLists.filter(function (candidateList) { return candidateList.PartyID == partyHandler.party.ID; }); candidateLists.forEach(async (candidateList) => { - let round = await partyHandler.RoundModel.getRound(candidateList.RoundID); + let round = await partyHandler.RoundModel.getRound( + candidateList.RoundID + ); let election = await partyHandler.ElectionModel.getElection( round.ElectionID ); @@ -235,8 +237,9 @@ class Party { candidateList.Name + " (" + election.Name + - " " + - new Date(round.Date).toLocaleDateString() + ")"; + ", " + + new Date(round.Date).toLocaleDateString() + + ")"; document.getElementById("candidate-lists-list").appendChild(el); }); });