Changed style, fixed schedulle view

This commit is contained in:
Torsten Schulz
2024-09-12 18:22:25 +02:00
parent ba1be441f1
commit 61fd50bb29
3 changed files with 14 additions and 8 deletions

View File

@@ -79,11 +79,11 @@ export default {
width: 100%;
}
.navigation {
width: 13em;
background-color: #e0e0e0;
width: 13em;
background-color: #e0f0e8;
display: flex;
flex-direction: column;
padding: 0.5rem;
padding: .5rem;
}
.content {
flex: 1;

View File

@@ -9,10 +9,16 @@ body {
flex-direction: column;
}
h1 {
border-bottom: 1px solid #000000;
margin: 0;
height: 3rem;
padding: 0 0.5rem;
text-align: center;
background-color: #f0f0f0;
color: #4CAF50;
text-shadow: 2px 2px 3px #a0a0a0;
}
h2 {
margin: 0;
}
#app {
flex: 1;

View File

@@ -9,7 +9,7 @@
</div>
<div class="output">
<ul>
<li v-for="league in leagues" :key="league" @click="loadMatchesForLeague(league.id)">{{ league.name }}</li>
<li v-for="league in leagues" :key="league" @click="loadMatchesForLeague(league.id, league.name)">{{ league.name }}</li>
</ul>
<div class="flex-item">
<div v-if="matches.length > 0">
@@ -114,10 +114,10 @@ export default {
console.error('Failed to load leagues:', error);
}
},
async loadMatchesForLeague(league) {
this.selectedLeague = league;
async loadMatchesForLeague(leagueId, leagueName) {
this.selectedLeague = leagueName;
try {
const response = await apiClient.get(`/matches/leagues/${this.currentClub}/matches/${league}`);
const response = await apiClient.get(`/matches/leagues/${this.currentClub}/matches/${leagueId}`);
this.matches = response.data;
} catch (error) {
console.error('Failed to load matches:', error);