diff --git a/frontend/src/vues/CharacterDetails.vue b/frontend/src/vues/CharacterDetails.vue index cace6b1..6c8dc38 100644 --- a/frontend/src/vues/CharacterDetails.vue +++ b/frontend/src/vues/CharacterDetails.vue @@ -11,11 +11,11 @@
Last Game: {{ lastPlayedPostDate }}
-

Games Played

+

{{ games.played.length }} Games Played

-

Games Applied

+

{{ games.applied.length }} Games Applied

diff --git a/frontend/src/vues/CharacterList.vue b/frontend/src/vues/CharacterList.vue index 7d64d83..0d0d124 100644 --- a/frontend/src/vues/CharacterList.vue +++ b/frontend/src/vues/CharacterList.vue @@ -88,7 +88,7 @@ let debounce = null watch(filtervalue, (newFilter, oldFilter) => { debounce = clearTimeout(debounce) debounce = setTimeout(() => { - router.replace({query: {page: route.query.page, filter: newFilter}}) + router.replace({ query: { page: route.query.page, filter: newFilter } }) }, 500) }) diff --git a/frontend/src/vues/GameDetails.vue b/frontend/src/vues/GameDetails.vue index 497c2c6..b4427d6 100644 --- a/frontend/src/vues/GameDetails.vue +++ b/frontend/src/vues/GameDetails.vue @@ -6,26 +6,45 @@

GameMaster: {{ game.gamemaster }}

-
+
+
+

Picks

+
+ {{ pick.pickedCharacter.playerName }} as {{ pick.characterName }} +
+

Payout

{{ game.payoutEB }} eb
{{ game.payoutIP }} IP
{{ game.payoutLoot }}
+
+
-
-

Picks

-
- {{ pick.characterName }} -
+
+
+
+

{{ picks.length }} Character Picks

+ + + +
- -
-

Apps

-
- {{ app.characterName }} -
+
+

{{ apps.length }} Character Apps

+ + + +
@@ -43,8 +62,15 @@ } .result-box { - margin: 10px; - margin-top: 40px; + margin: 20px; + margin-top: 20px; +} + +.character-list { + margin: 20px; + h3 { + margin-bottom: 10px; + } } @@ -55,10 +81,24 @@ import axios from 'axios' const route = useRoute() +const pickHeaders = [ + { title: 'ID', align: 'start', key: 'characterId' }, + { title: 'Character', align: 'start', key: 'characterName' }, + { title: 'Status', align: 'start', key: 'pickedCharacter.status' }, + { title: 'Player', align: 'start', key: 'pickedCharacter.playerName' } +] + +const appHeaders = [ + { title: 'ID', align: 'start', key: 'characterId' }, + { title: 'Character', align: 'start', key: 'characterName' }, + { title: 'Status', align: 'start', key: 'appliedCharacter.status' }, + { title: 'Player', align: 'start', key: 'appliedCharacter.playerName' } +] + const gameId = ref(route.params.gameId) const game = ref({}) -const picks = ref({}) -const apps = ref({}) +const picks = ref([]) +const apps = ref([]) loadGameDetails() @@ -85,5 +125,6 @@ async function loadPicks() { async function loadApps() { const response = await axios.post(`/api/game/${gameId.value}/apps`) apps.value = response.data + console.log(apps.value) } diff --git a/frontend/src/vues/GameList.vue b/frontend/src/vues/GameList.vue index 3851f34..f08145a 100644 --- a/frontend/src/vues/GameList.vue +++ b/frontend/src/vues/GameList.vue @@ -6,7 +6,30 @@ v-model="filtervalue" >
- + + + + ID + Title + Staus + Post Date + + + + + + {{ game.id }} + + + {{ game.title }} + + {{ game.status }} + + {{ new Date(game.postdate * 1000).toISOString().split('T')[0] }} + + + { @@ -73,7 +96,7 @@ let debounce = null watch(filtervalue, (newFilter, oldFilter) => { debounce = clearTimeout(debounce) debounce = setTimeout(() => { - router.replace({query: {page: route.query.page, filter: newFilter}}) + router.replace({ query: { page: route.query.page, filter: newFilter } }) }, 500) }) diff --git a/frontend/src/vues/GameTable.vue b/frontend/src/vues/GameTable.vue index e47ecdf..973c9b4 100644 --- a/frontend/src/vues/GameTable.vue +++ b/frontend/src/vues/GameTable.vue @@ -1,33 +1,26 @@ diff --git a/frontend/src/vues/ServerStats.vue b/frontend/src/vues/ServerStats.vue index f08f8b8..9677e1d 100644 --- a/frontend/src/vues/ServerStats.vue +++ b/frontend/src/vues/ServerStats.vue @@ -96,6 +96,9 @@ import { onMounted, watch, ref } from 'vue' import Chart from 'chart.js/auto' import axios from 'axios' +const route = useRoute() +const router = useRouter() + const dateSelect = ref(-1) const dateItems = buildDateItems() @@ -184,6 +187,7 @@ function updateChart(stats, tag) { } watch(dateSelect, async (newValue, oldValue) => { + router.replace({ query: { monthId: dateSelect.value } }) loadData() }) @@ -196,6 +200,12 @@ watch(chartSelect, async (newValue, oldValue) => { }) onMounted(async () => { + console.log(dateItems) + if (!route.query.monthId) { + router.replace({ query: { monthId: -1 } }) + } else { + dateSelect.value = Number(route.query.monthId) + } loadData() chart = new Chart(document.getElementById('piechart'), { type: 'pie',