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