From 553a1284683e2fe158c639d17eba987adcf005ea Mon Sep 17 00:00:00 2001 From: Matthew Huntington Date: Wed, 21 Aug 2024 13:04:25 +0200 Subject: [PATCH] time left to get ahead --- src/components/mins_left_to_practice_today.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/components/mins_left_to_practice_today.vue b/src/components/mins_left_to_practice_today.vue index 468e187..495ba3b 100644 --- a/src/components/mins_left_to_practice_today.vue +++ b/src/components/mins_left_to_practice_today.vue @@ -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 @@

Time Summary

Mins Left to Practice Today

{{time_left}} +

To Get Ahead

+ {{to_get_ahead}}

Mins Practiced Today

{{mins_practiced_today}}