diff --git a/fittrackee_client/src/components/Administration/AdminApplication.vue b/fittrackee_client/src/components/Administration/AdminApplication.vue index d90b8553..34f90eef 100644 --- a/fittrackee_client/src/components/Administration/AdminApplication.vue +++ b/fittrackee_client/src/components/Administration/AdminApplication.vue @@ -199,12 +199,12 @@ // @ts-ignore (appData[key] = getFileSizeInMB(appConfig[key])) : ['about', 'privacy_policy'].includes(key) - ? // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - (appData[key] = appConfig[key] !== null ? appConfig[key] : '') - : // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - (appData[key] = appConfig[key]) + ? // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + (appData[key] = appConfig[key] !== null ? appConfig[key] : '') + : // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + (appData[key] = appConfig[key]) }) } function onCancel() { diff --git a/fittrackee_client/src/components/Common/StatsChart/Chart.vue b/fittrackee_client/src/components/Common/StatsChart/Chart.vue index 4a953a5c..955e4b38 100644 --- a/fittrackee_client/src/components/Common/StatsChart/Chart.vue +++ b/fittrackee_client/src/components/Common/StatsChart/Chart.vue @@ -98,10 +98,10 @@ return fullStats.value && context.chart.chartArea.width < 300 ? false : displayedData.value === 'average_speed' - ? displayedSportIds.value.length == 1 - ? 'auto' - : false - : true + ? displayedSportIds.value.length == 1 + ? 'auto' + : false + : true }, formatter: function (value, context) { if (displayedData.value === 'average_speed') { diff --git a/fittrackee_client/src/components/PrivacyPolicy.vue b/fittrackee_client/src/components/PrivacyPolicy.vue index 22b3d6b7..1f96f283 100644 --- a/fittrackee_client/src/components/PrivacyPolicy.vue +++ b/fittrackee_client/src/components/PrivacyPolicy.vue @@ -64,8 +64,8 @@ return authUser.value.timezone ? authUser.value.timezone : Intl.DateTimeFormat().resolvedOptions().timeZone - ? Intl.DateTimeFormat().resolvedOptions().timeZone - : 'Europe/Paris' + ? Intl.DateTimeFormat().resolvedOptions().timeZone + : 'Europe/Paris' } function getDateFormat() { return dateStringFormats[language.value] diff --git a/fittrackee_client/src/components/User/UserSportPreferences.vue b/fittrackee_client/src/components/User/UserSportPreferences.vue index dbffc8e2..8e8a018d 100644 --- a/fittrackee_client/src/components/User/UserSportPreferences.vue +++ b/fittrackee_client/src/components/User/UserSportPreferences.vue @@ -212,8 +212,8 @@ sportPayload.color = sport.color ? sport.color : sportColors - ? sportColors[sport.label] - : defaultColor + ? sportColors[sport.label] + : defaultColor sportPayload.is_active = sport.is_active_for_user sportPayload.stopped_speed_threshold = sport.stopped_speed_threshold } else { diff --git a/fittrackee_client/src/components/Workout/WorkoutDetail/WorkoutChart/index.vue b/fittrackee_client/src/components/Workout/WorkoutDetail/WorkoutChart/index.vue index fb57192f..352ec5d6 100644 --- a/fittrackee_client/src/components/Workout/WorkoutDetail/WorkoutChart/index.vue +++ b/fittrackee_client/src/components/Workout/WorkoutDetail/WorkoutChart/index.vue @@ -189,12 +189,12 @@ return tooltipItems.length === 0 ? '' : displayDistance.value - ? `${t('workouts.DISTANCE')}: ${ - tooltipItems[0].label - } ${fromKmUnit}` - : `${t('workouts.DURATION')}: ${formatDuration( - tooltipItems[0].label.replace(',', '') - )}` + ? `${t('workouts.DISTANCE')}: ${ + tooltipItems[0].label + } ${fromKmUnit}` + : `${t('workouts.DURATION')}: ${formatDuration( + tooltipItems[0].label.replace(',', '') + )}` }, }, }, diff --git a/fittrackee_client/src/components/Workout/WorkoutDetail/index.vue b/fittrackee_client/src/components/Workout/WorkoutDetail/index.vue index 69b48ced..55a31753 100644 --- a/fittrackee_client/src/components/Workout/WorkoutDetail/index.vue +++ b/fittrackee_client/src/components/Workout/WorkoutDetail/index.vue @@ -100,14 +100,14 @@ displaySegment && segmentId && segmentId !== 1 ? `/workouts/${workout.id}/segment/${segmentId - 1}` : !displaySegment && workout.previous_workout - ? `/workouts/${workout.previous_workout}` - : null + ? `/workouts/${workout.previous_workout}` + : null const nextUrl = displaySegment && segmentId && segmentId < workout.segments.length ? `/workouts/${workout.id}/segment/${segmentId + 1}` : !displaySegment && workout.next_workout - ? `/workouts/${workout.next_workout}` - : null + ? `/workouts/${workout.next_workout}` + : null return { previousUrl, nextUrl, diff --git a/fittrackee_client/src/components/Workout/WorkoutEdition.vue b/fittrackee_client/src/components/Workout/WorkoutEdition.vue index 26dc9fcd..3bd001db 100644 --- a/fittrackee_client/src/components/Workout/WorkoutEdition.vue +++ b/fittrackee_client/src/components/Workout/WorkoutEdition.vue @@ -444,14 +444,14 @@ workoutForm.workoutAscent === '' ? null : authUser.value.imperial_units - ? convertDistance(+workoutForm.workoutAscent, 'ft', 'm', 3) - : +workoutForm.workoutAscent + ? convertDistance(+workoutForm.workoutAscent, 'ft', 'm', 3) + : +workoutForm.workoutAscent payload.descent = workoutForm.workoutDescent === '' ? null : authUser.value.imperial_units - ? convertDistance(+workoutForm.workoutDescent, 'ft', 'm', 3) - : +workoutForm.workoutDescent + ? convertDistance(+workoutForm.workoutDescent, 'ft', 'm', 3) + : +workoutForm.workoutDescent if ( (payload.ascent !== null && payload.descent === null) || (payload.ascent === null && payload.descent !== null) diff --git a/fittrackee_client/src/utils/index.ts b/fittrackee_client/src/utils/index.ts index 031b94a1..0f5357e8 100644 --- a/fittrackee_client/src/utils/index.ts +++ b/fittrackee_client/src/utils/index.ts @@ -47,14 +47,14 @@ export const handleError = ( const errorMessages = !error ? msg : error.response - ? error.response.status === 413 - ? 'file size is greater than the allowed size' - : errorInfo?.message - ? errorInfo.message - : msg - : error.message - ? error.message - : msg + ? error.response.status === 413 + ? 'file size is greater than the allowed size' + : errorInfo?.message + ? errorInfo.message + : msg + : error.message + ? error.message + : msg context.commit( ROOT_STORE.MUTATIONS.SET_ERROR_MESSAGES, errorMessages.includes('\n') diff --git a/fittrackee_client/src/utils/sports.ts b/fittrackee_client/src/utils/sports.ts index fc0b9b96..6a3ec7f8 100644 --- a/fittrackee_client/src/utils/sports.ts +++ b/fittrackee_client/src/utils/sports.ts @@ -35,8 +35,8 @@ const sortSports = (a: ITranslatedSport, b: ITranslatedSport): number => { return sportATranslatedLabel > sportBTranslatedLabel ? 1 : sportATranslatedLabel < sportBTranslatedLabel - ? -1 - : 0 + ? -1 + : 0 } export const translateSports = ( diff --git a/fittrackee_client/src/utils/statistics.ts b/fittrackee_client/src/utils/statistics.ts index 7f5cef73..de32377c 100644 --- a/fittrackee_client/src/utils/statistics.ts +++ b/fittrackee_client/src/utils/statistics.ts @@ -174,8 +174,8 @@ export const formatStats = ( useImperialUnits ) : datasetKey === 'average_speed' - ? null - : 0 + ? null + : 0 ) }) }) @@ -196,14 +196,14 @@ export const getStatsDateParams = ( timeFrame === 'year' ? startOfYear(subYears(date, 9)) : timeFrame === 'week' - ? startOfWeek(subMonths(date, 2), { weekStartsOn }) - : startOfMonth(subMonths(date, 11)) // month + ? startOfWeek(subMonths(date, 2), { weekStartsOn }) + : startOfMonth(subMonths(date, 11)) // month const end = timeFrame === 'year' ? endOfYear(date) : timeFrame === 'week' - ? endOfWeek(date, { weekStartsOn }) - : endOfMonth(date) // month + ? endOfWeek(date, { weekStartsOn }) + : endOfMonth(date) // month return { duration: timeFrame, end, @@ -224,17 +224,17 @@ export const updateChartParams = ( duration === 'year' ? endOfYear(backward ? subYears(end, 1) : addYears(end, 1)) : duration === 'week' - ? endOfWeek(backward ? subWeeks(end, 1) : addWeeks(end, 1), { - weekStartsOn, - }) - : endOfMonth(backward ? subMonths(end, 1) : addMonths(end, 1)), + ? endOfWeek(backward ? subWeeks(end, 1) : addWeeks(end, 1), { + weekStartsOn, + }) + : endOfMonth(backward ? subMonths(end, 1) : addMonths(end, 1)), start: duration === 'year' ? startOfYear(backward ? subYears(start, 1) : addYears(start, 1)) : duration === 'week' - ? startOfWeek(backward ? subWeeks(start, 1) : addWeeks(start, 1), { - weekStartsOn, - }) - : startOfMonth(backward ? subMonths(start, 1) : addMonths(start, 1)), + ? startOfWeek(backward ? subWeeks(start, 1) : addWeeks(start, 1), { + weekStartsOn, + }) + : startOfMonth(backward ? subMonths(start, 1) : addMonths(start, 1)), } }