Skip to content
Snippets Groups Projects
Commit e35cb4a0 authored by Alexis POYEN's avatar Alexis POYEN
Browse files

Resolve "Rank number"

parent b4729545
No related branches found
No related tags found
No related merge requests found
No preview for this file type
......@@ -186,15 +186,23 @@ class CandidateList {
</div> `;
let candidates = await this.updateCandidates();
candidates.sort(function (a, b) {
return a.Rank > b.Rank;
});
const markup = candidates
.map((candidate) => this.candidateTemplate(candidate))
.join("");
document.getElementById("candidates").innerHTML = markup;
let newRank = 1;
candidates.forEach((candidate) => {
if (candidate.Rank >= newRank) newRank = candidate.Rank + 1;
});
let candidate = {
ID: 0,
FullName: "",
Rank: 0,
Rank: newRank,
CommunityCounseller: false,
Birthdate: "2000-01-01",
PotentialIncompatibility: false,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment