Table data implemented
This commit is contained in:
@@ -42,6 +42,7 @@
|
||||
}
|
||||
|
||||
#league-stats-container {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#league-table-container {
|
||||
|
||||
flex: 1;
|
||||
width: 60%;
|
||||
background-color: #eaeaea; /* Example background color */
|
||||
margin: 10px;
|
||||
|
||||
border: 1px solid gray;
|
||||
border-radius: 8px;
|
||||
|
||||
@@ -30,7 +30,13 @@ const fetchLeaguesData = async (req, res, next) => {
|
||||
team_name: team.team.name,
|
||||
team_crest: team.team.crest
|
||||
},
|
||||
})),
|
||||
games_played: team.playedGames,
|
||||
wins: team.won,
|
||||
losses: team.lost,
|
||||
draws: team.draw,
|
||||
goal_difference: team.goalDifference,
|
||||
points: team.points
|
||||
}))
|
||||
};
|
||||
next();
|
||||
} catch (error) {
|
||||
|
||||
@@ -19,6 +19,12 @@
|
||||
<th>#</th>
|
||||
<th></th>
|
||||
<th>Club</th>
|
||||
<th>GP</th>
|
||||
<th>W</th>
|
||||
<th>L</th>
|
||||
<th>D</th>
|
||||
<th>GD</th>
|
||||
<th>Pts</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -27,6 +33,12 @@
|
||||
<td>{{table.league_position}}</td>
|
||||
<td><img src="{{table.team_crest}}" alt="{{table.team_name}} Crest" id="table-logo"></td>
|
||||
<td>{{table.team_name}}</td>
|
||||
<td>{{games_played}}</td>
|
||||
<td>{{wins}}</td>
|
||||
<td>{{losses}}</td>
|
||||
<td>{{draws}}</td>
|
||||
<td>{{goal_difference}}</td>
|
||||
<td>{{points}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
|
||||
Reference in New Issue
Block a user