|
|
|
|
@ -5,7 +5,8 @@
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
time_left:0,
|
|
|
|
|
mins_practiced_today:0
|
|
|
|
|
mins_practiced_today:0,
|
|
|
|
|
to_get_ahead:0
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
@ -13,6 +14,9 @@
|
|
|
|
|
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
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
@ -20,6 +24,9 @@
|
|
|
|
|
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
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -29,6 +36,8 @@
|
|
|
|
|
<h2 @click="refresh">Time Summary</h2>
|
|
|
|
|
<h3>Mins Left to Practice Today</h3>
|
|
|
|
|
{{time_left}}
|
|
|
|
|
<h3>To Get Ahead</h3>
|
|
|
|
|
{{to_get_ahead}}
|
|
|
|
|
<h3>Mins Practiced Today</h3>
|
|
|
|
|
{{mins_practiced_today}}
|
|
|
|
|
</template>
|
|
|
|
|
|