diff --git a/Front/js/backend/match.js b/Front/js/backend/match.js index 8289360..a3ed2a8 100644 --- a/Front/js/backend/match.js +++ b/Front/js/backend/match.js @@ -19,10 +19,13 @@ if (!("Notification" in window)) { } const equipeList = await pb.collection('equipes').getFullList({ - expand: "sport" + sort: '+classement', + expand: 'sport' }); -const sportList = await pb.collection('sport').getFullList({}); +const sportList = await pb.collection('sport').getFullList({ + expand: "following" +}); //Gestion des mises à jour en temps réel des matchs matchList.forEach(match => { @@ -90,11 +93,65 @@ matchList.forEach(match => { } }); +function getTableCard(sport){ + console.log(sport) + let card = ` +
+
+

${sport.name}

+

${sport.tableau} ${sport.following != "" ? "(qualificatif à " + sport.expand.following.tableau + ")" : "(finale)"}

+
+ +
+
+
` + if(sport.state === "started" && sport.following != ""){ + card = card + ` +