fucking vuew wont import
This commit is contained in:
@@ -3,12 +3,15 @@
|
|||||||
<h1>{{ character.characterName }} - {{character.role}}</h1>
|
<h1>{{ character.characterName }} - {{character.role}}</h1>
|
||||||
<h2>Status: {{ character.status }}</h2>
|
<h2>Status: {{ character.status }}</h2>
|
||||||
<h2>Player: {{ character.playerName }}</h2>
|
<h2>Player: {{ character.playerName }}</h2>
|
||||||
|
<GameTable gameList="gamesPlayed"></GameTable>
|
||||||
|
<game-table gameList="gamesApplied"></game-table>
|
||||||
</v-container>
|
</v-container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style></style>
|
<style></style>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { GameTable } from './GameTable.vue'
|
||||||
import { onMounted, watch, ref } from 'vue'
|
import { onMounted, watch, ref } from 'vue'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
@@ -17,6 +20,8 @@ const route = useRoute()
|
|||||||
|
|
||||||
const characterId = ref(route.params.characterId)
|
const characterId = ref(route.params.characterId)
|
||||||
const character = ref({})
|
const character = ref({})
|
||||||
|
const gamesPlayed = ref({})
|
||||||
|
const gamesApplied = ref({})
|
||||||
|
|
||||||
async function loadCharacterDetails() {
|
async function loadCharacterDetails() {
|
||||||
const characterResponse = await axios.get(`/api/character/${characterId.value}`)
|
const characterResponse = await axios.get(`/api/character/${characterId.value}`)
|
||||||
@@ -26,6 +31,8 @@ async function loadCharacterDetails() {
|
|||||||
console.log(gameDetails)
|
console.log(gameDetails)
|
||||||
|
|
||||||
character.value = characterResponse.data
|
character.value = characterResponse.data
|
||||||
|
gamesPlayed.value = gameDetails.data.characterPickedForGame
|
||||||
|
gamesApplied.value = gameDetails.data.characterAppliedForGame
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user