diff --git a/src/main/webapp/public/competition.js b/src/main/webapp/public/competition.js
index 9b2b7c1..28cde4b 100644
--- a/src/main/webapp/public/competition.js
+++ b/src/main/webapp/public/competition.js
@@ -270,6 +270,35 @@ function buildTree(treeData) {
return drawGraph(initTree(treeData.filter(d => d.data.level >= 0)))
}
+function buildClassementArray(classement) {
+ const classement2 = classement.sort((a, b) => {
+ if (a.rank === b.rank)
+ return a.name.localeCompare(b.name);
+ return a.rank - b.rank;
+ })
+
+ const arrayDiv = document.createElement('div');
+ let arrayContent = `
+
+
+
+ | ${i18next.t('place')} |
+ ${i18next.t('nom')} |
+
+ `
+ for (const row of classement2) {
+ arrayContent += `
+
+ | ${row.rank} |
+ ${row.name} |
+
`
+
+ }
+ arrayContent += `
`
+ arrayDiv.innerHTML = arrayContent;
+ return arrayDiv;
+}
+
function poulePage(location) {
rootDiv.innerHTML = `
${i18next.t('résultatDeLaCompétition')} :
${i18next.t('back')}`;
document.getElementById('homeLink').addEventListener('click', () => setSubPage('home'));
@@ -343,6 +372,9 @@ function poulePage(location) {
date: d.data.date,
}))));
}
+ if (poule['treeIsClassement']){
+ dataContainer.append(buildClassementArray(poule['classement']));
+ }
}
location[2] = isPoule ? 1 : 2;
diff --git a/src/main/webapp/src/pages/result/ResultView.jsx b/src/main/webapp/src/pages/result/ResultView.jsx
index 93fd60e..5557842 100644
--- a/src/main/webapp/src/pages/result/ResultView.jsx
+++ b/src/main/webapp/src/pages/result/ResultView.jsx
@@ -181,8 +181,8 @@ function ClassementList({classement}) {
- | Place |
- Nom |
+ {t('place')} |
+ {t('nom')} |