|
|
|
|
@ -10,24 +10,19 @@
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
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;
|
|
|
|
|
this.mins_practiced_today = response.data.mins_practiced_today;
|
|
|
|
|
|
|
|
|
|
const today = new Date()
|
|
|
|
|
this.to_get_ahead = this.time_left + (today.getMonth()+1)*150 + today.getDate()*5
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
axios.get(import.meta.env.VITE_PRACTICE_TRACKER_API_URL+'mins-left-to-practice-today').then((response)=>{
|
|
|
|
|
setTimes(response){
|
|
|
|
|
this.time_left= response.data.time_left;
|
|
|
|
|
this.mins_practiced_today = response.data.mins_practiced_today;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const today = new Date()
|
|
|
|
|
this.to_get_ahead = this.time_left + (today.getMonth()+1)*150 + today.getDate()*5
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
refresh(){
|
|
|
|
|
axios.get(import.meta.env.VITE_PRACTICE_TRACKER_API_URL+'mins-left-to-practice-today').then(this.setTimes)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
axios.get(import.meta.env.VITE_PRACTICE_TRACKER_API_URL+'mins-left-to-practice-today').then(this.setTimes)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
@ -35,11 +30,11 @@
|
|
|
|
|
<template>
|
|
|
|
|
<h2 @click="refresh">Time Summary</h2>
|
|
|
|
|
<h3>Mins Left to Practice Today</h3>
|
|
|
|
|
{{time_left}}
|
|
|
|
|
{{time_left.toFixed(4)}}
|
|
|
|
|
<h3>To Get Ahead</h3>
|
|
|
|
|
{{to_get_ahead}}
|
|
|
|
|
{{to_get_ahead.toFixed(4)}}
|
|
|
|
|
<h3>Mins Practiced Today</h3>
|
|
|
|
|
{{mins_practiced_today}}
|
|
|
|
|
{{mins_practiced_today.toFixed(4)}}
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
|