parent
17d9e94341
commit
e1cb1745ee
@ -0,0 +1,55 @@
|
||||
<script lang="ts">
|
||||
import axios from 'axios';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
categories:[]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
submit(event){
|
||||
event.preventDefault();
|
||||
console.log('hi');
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
axios.get(import.meta.env.VITE_PRACTICE_TRACKER_API_URL+'categories').then((response)=>{
|
||||
this.categories = response.data
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<details>
|
||||
<summary><h2>Timer</h2></summary>
|
||||
<form @submit="submit">
|
||||
<label>Description</label>
|
||||
<input type="text"/>
|
||||
|
||||
<label>Seconds</label>
|
||||
<input type="number"/>
|
||||
|
||||
<label>Comments</label>
|
||||
<textarea/>
|
||||
|
||||
<label>Practice Category</label>
|
||||
<select>
|
||||
<option v-for="category in categories" v-bind:value="category.id">
|
||||
{{category.id}}.
|
||||
{{category.instrument}}
|
||||
:
|
||||
{{category.category}}
|
||||
</option>
|
||||
</select>
|
||||
|
||||
<input type="Submit"/>
|
||||
</form>
|
||||
</details>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
label, [type="submit"] {
|
||||
display:block;
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in new issue