fix building errors
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -304,7 +304,6 @@ import { useAuth } from '@/composables/useAuth'
|
|||||||
import api from '@/services/api'
|
import api from '@/services/api'
|
||||||
import ModernNavbar from '@/components/ModernNavbar.vue'
|
import ModernNavbar from '@/components/ModernNavbar.vue'
|
||||||
|
|
||||||
const router = useRouter()
|
|
||||||
const auth = useAuth()
|
const auth = useAuth()
|
||||||
|
|
||||||
const activePeriod = ref('week')
|
const activePeriod = ref('week')
|
||||||
@@ -322,11 +321,11 @@ const nextWorkout = ref(null)
|
|||||||
|
|
||||||
const currentDate = computed(() => {
|
const currentDate = computed(() => {
|
||||||
const now = new Date()
|
const now = new Date()
|
||||||
return now.toLocaleDateString('en-US', {
|
return now.toLocaleDateString('en-US', {
|
||||||
weekday: 'long',
|
weekday: 'long',
|
||||||
year: 'numeric',
|
year: 'numeric',
|
||||||
month: 'long',
|
month: 'long',
|
||||||
day: 'numeric'
|
day: 'numeric'
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -353,17 +352,13 @@ function loadNextWorkout() {
|
|||||||
const upcomingWorkouts = recentWorkouts.value
|
const upcomingWorkouts = recentWorkouts.value
|
||||||
.filter(w => new Date(w.scheduled_date) >= new Date())
|
.filter(w => new Date(w.scheduled_date) >= new Date())
|
||||||
.sort((a, b) => new Date(a.scheduled_date) - new Date(b.scheduled_date))
|
.sort((a, b) => new Date(a.scheduled_date) - new Date(b.scheduled_date))
|
||||||
|
|
||||||
if (upcomingWorkouts.length > 0) {
|
if (upcomingWorkouts.length > 0) {
|
||||||
nextWorkout.value = upcomingWorkouts[0]
|
nextWorkout.value = upcomingWorkouts[0]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function startQuickWorkout() {
|
|
||||||
router.push('/calendar')
|
|
||||||
}
|
|
||||||
|
|
||||||
function getWorkoutColor(type) {
|
function getWorkoutColor(type) {
|
||||||
const colors = {
|
const colors = {
|
||||||
'Cycling': '#667eea',
|
'Cycling': '#667eea',
|
||||||
|
|||||||
@@ -596,14 +596,6 @@ function isToday(date) {
|
|||||||
date.getFullYear() === today.getFullYear()
|
date.getFullYear() === today.getFullYear()
|
||||||
}
|
}
|
||||||
|
|
||||||
function formatDate(dateStr) {
|
|
||||||
return new Date(dateStr).toLocaleDateString('en-US', {
|
|
||||||
month: 'short',
|
|
||||||
day: 'numeric',
|
|
||||||
year: 'numeric',
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
function formatDuration(seconds) {
|
function formatDuration(seconds) {
|
||||||
const hours = Math.floor(seconds / 3600)
|
const hours = Math.floor(seconds / 3600)
|
||||||
const minutes = Math.floor((seconds % 3600) / 60)
|
const minutes = Math.floor((seconds % 3600) / 60)
|
||||||
|
|||||||
Reference in New Issue
Block a user