refresh on click for mins and summary

mic_level
Matt Huntington 3 years ago
parent 69fd271aec
commit 17d9e94341

@ -7,6 +7,13 @@
time_left:0
}
},
methods: {
refresh(){
axios.get(import.meta.env.VITE_PRACTICE_TRACKER_API_URL+'mins-left-to-practice-today').then((response)=>{
this.time_left= response.data.time_left;
})
}
},
mounted() {
axios.get(import.meta.env.VITE_PRACTICE_TRACKER_API_URL+'mins-left-to-practice-today').then((response)=>{
this.time_left= response.data.time_left;
@ -16,7 +23,7 @@
</script>
<template>
<h2>Mins Left to Practice Today</h2>
<h2 @click="refresh">Mins Left to Practice Today</h2>
{{time_left}}
</template>

@ -7,6 +7,13 @@
categories:[]
}
},
methods: {
refresh(){
axios.get(import.meta.env.VITE_PRACTICE_TRACKER_API_URL+'summary').then((response)=>{
this.categories = response.data
})
}
},
mounted() {
axios.get(import.meta.env.VITE_PRACTICE_TRACKER_API_URL+'summary').then((response)=>{
this.categories = response.data
@ -17,7 +24,7 @@
<template>
<details>
<summary><h2>Summary</h2></summary>
<summary><h2 @click="refresh">Summary</h2></summary>
<table>
<thead>
<tr>

Loading…
Cancel
Save