Client - upgrade Vue to 3.3 and move to Vite

This commit is contained in:
Sam
2023-11-11 15:23:04 +01:00
parent 91455251e1
commit 1befae927d
309 changed files with 6291 additions and 12719 deletions

View File

@ -1,7 +1,7 @@
import { createStore } from 'vuex'
import root from '@/store/modules/root'
import { IRootState } from '@/store/modules/root/types'
import type { IRootState } from '@/store/modules/root/types'
const store = createStore<IRootState>(root)

View File

@ -1,4 +1,4 @@
import { ActionContext, ActionTree } from 'vuex'
import type { ActionContext, ActionTree } from 'vuex'
import authApi from '@/api/authApi'
import api from '@/api/defaultApi'
@ -11,13 +11,13 @@ import {
USERS_STORE,
WORKOUTS_STORE,
} from '@/store/constants'
import {
import type {
IAuthUserActions,
IAuthUserState,
} from '@/store/modules/authUser/types'
import { IRootState } from '@/store/modules/root/types'
import type { IRootState } from '@/store/modules/root/types'
import { deleteUserAccount } from '@/store/modules/users/actions'
import {
import type {
ILoginOrRegisterData,
IUserAccountPayload,
IUserDeletionPayload,

View File

@ -1,11 +1,11 @@
import { GetterTree } from 'vuex'
import type { GetterTree } from 'vuex'
import { AUTH_USER_STORE } from '@/store/constants'
import {
import type {
IAuthUserGetters,
IAuthUserState,
} from '@/store/modules/authUser/types'
import { IRootState } from '@/store/modules/root/types'
import type { IRootState } from '@/store/modules/root/types'
export const getters: GetterTree<IAuthUserState, IRootState> &
IAuthUserGetters = {

View File

@ -1,11 +1,11 @@
import { Module } from 'vuex'
import type { Module } from 'vuex'
import { actions } from '@/store/modules/authUser/actions'
import { getters } from '@/store/modules/authUser/getters'
import { mutations } from '@/store/modules/authUser/mutations'
import { authUserState } from '@/store/modules/authUser/state'
import { IAuthUserState } from '@/store/modules/authUser/types'
import { IRootState } from '@/store/modules/root/types'
import type { IAuthUserState } from '@/store/modules/authUser/types'
import type { IRootState } from '@/store/modules/root/types'
const authUser: Module<IAuthUserState, IRootState> = {
state: authUserState,

View File

@ -1,11 +1,11 @@
import { MutationTree } from 'vuex'
import type { MutationTree } from 'vuex'
import { AUTH_USER_STORE } from '@/store/constants'
import {
import type {
IAuthUserState,
TAuthUserMutations,
} from '@/store/modules/authUser/types'
import { IAuthUserProfile, IExportRequest } from '@/types/user'
import type { IAuthUserProfile, IExportRequest } from '@/types/user'
export const mutations: MutationTree<IAuthUserState> & TAuthUserMutations = {
[AUTH_USER_STORE.MUTATIONS.CLEAR_AUTH_USER_TOKEN](state: IAuthUserState) {

View File

@ -1,5 +1,5 @@
import { IAuthUserState } from '@/store/modules/authUser/types'
import { IAuthUserProfile } from '@/types/user'
import type { IAuthUserState } from '@/store/modules/authUser/types'
import type { IAuthUserProfile } from '@/types/user'
export const authUserState: IAuthUserState = {
authToken: null,

View File

@ -1,4 +1,4 @@
import {
import type {
ActionContext,
CommitOptions,
DispatchOptions,
@ -6,8 +6,8 @@ import {
} from 'vuex'
import { AUTH_USER_STORE } from '@/store/constants'
import { IRootState } from '@/store/modules/root/types'
import {
import type { IRootState } from '@/store/modules/root/types'
import type {
IAuthUserProfile,
ILoginOrRegisterData,
IUserDeletionPayload,
@ -195,7 +195,7 @@ export type TAuthUserStoreModule<S = IAuthUserState> = Omit<
} & {
commit<
K extends keyof TAuthUserMutations,
P extends Parameters<TAuthUserMutations[K]>[1]
P extends Parameters<TAuthUserMutations[K]>[1],
>(
key: K,
payload?: P,

View File

@ -1,11 +1,11 @@
import { ActionContext, ActionTree } from 'vuex'
import type { ActionContext, ActionTree } from 'vuex'
import authApi from '@/api/authApi'
import router from '@/router'
import { OAUTH2_STORE, ROOT_STORE } from '@/store/constants'
import { IOAuth2Actions, IOAuth2State } from '@/store/modules/oauth2/types'
import { IRootState } from '@/store/modules/root/types'
import {
import type { IOAuth2Actions, IOAuth2State } from '@/store/modules/oauth2/types'
import type { IRootState } from '@/store/modules/root/types'
import type {
IOauth2ClientsPayload,
IOAuth2ClientPayload,
IOAuth2ClientAuthorizePayload,

View File

@ -1,8 +1,8 @@
import { GetterTree } from 'vuex'
import type { GetterTree } from 'vuex'
import { OAUTH2_STORE } from '@/store/constants'
import { IOAuth2Getters, IOAuth2State } from '@/store/modules/oauth2/types'
import { IRootState } from '@/store/modules/root/types'
import type { IOAuth2Getters, IOAuth2State } from '@/store/modules/oauth2/types'
import type { IRootState } from '@/store/modules/root/types'
export const getters: GetterTree<IOAuth2State, IRootState> & IOAuth2Getters = {
[OAUTH2_STORE.GETTERS.CLIENT]: (state: IOAuth2State) => state.client,

View File

@ -1,11 +1,11 @@
import { Module } from 'vuex'
import type { Module } from 'vuex'
import { actions } from '@/store/modules/oauth2/actions'
import { getters } from '@/store/modules/oauth2/getters'
import { mutations } from '@/store/modules/oauth2/mutations'
import { oAuth2State } from '@/store/modules/oauth2/state'
import { IOAuth2State } from '@/store/modules/oauth2/types'
import { IRootState } from '@/store/modules/root/types'
import type { IOAuth2State } from '@/store/modules/oauth2/types'
import type { IRootState } from '@/store/modules/root/types'
const oauth2: Module<IOAuth2State, IRootState> = {
state: oAuth2State,

View File

@ -1,9 +1,12 @@
import { MutationTree } from 'vuex'
import type { MutationTree } from 'vuex'
import { OAUTH2_STORE } from '@/store/constants'
import { IOAuth2State, TOAuth2Mutations } from '@/store/modules/oauth2/types'
import { IPagination } from '@/types/api'
import { IOAuth2Client } from '@/types/oauth'
import type {
IOAuth2State,
TOAuth2Mutations,
} from '@/store/modules/oauth2/types'
import type { IPagination } from '@/types/api'
import type { IOAuth2Client } from '@/types/oauth'
export const mutations: MutationTree<IOAuth2State> & TOAuth2Mutations = {
[OAUTH2_STORE.MUTATIONS.SET_CLIENT](

View File

@ -1,6 +1,6 @@
import { IOAuth2State } from '@/store/modules/oauth2/types'
import { IPagination } from '@/types/api'
import { IOAuth2Client } from '@/types/oauth'
import type { IOAuth2State } from '@/store/modules/oauth2/types'
import type { IPagination } from '@/types/api'
import type { IOAuth2Client } from '@/types/oauth'
export const oAuth2State: IOAuth2State = {
client: <IOAuth2Client>{},

View File

@ -1,4 +1,4 @@
import {
import type {
ActionContext,
CommitOptions,
DispatchOptions,
@ -6,9 +6,9 @@ import {
} from 'vuex'
import { OAUTH2_STORE } from '@/store/constants'
import { IRootState } from '@/store/modules/root/types'
import { IPagination } from '@/types/api'
import {
import type { IRootState } from '@/store/modules/root/types'
import type { IPagination } from '@/types/api'
import type {
IOAuth2Client,
IOAuth2ClientAuthorizePayload,
IOAuth2ClientPayload,
@ -90,7 +90,7 @@ export type TOAuth2StoreModule<S = IOAuth2State> = Omit<
} & {
commit<
K extends keyof TOAuth2Mutations,
P extends Parameters<TOAuth2Mutations[K]>[1]
P extends Parameters<TOAuth2Mutations[K]>[1],
>(
key: K,
payload?: P,

View File

@ -1,11 +1,11 @@
import { ActionContext, ActionTree } from 'vuex'
import type { ActionContext, ActionTree } from 'vuex'
import authApi from '@/api/authApi'
import createI18n from '@/i18n'
import router from '@/router'
import { ROOT_STORE } from '@/store/constants'
import { IRootActions, IRootState } from '@/store/modules/root/types'
import { TAppConfigForm } from '@/types/application'
import type { IRootActions, IRootState } from '@/store/modules/root/types'
import type { TAppConfigForm } from '@/types/application'
import { handleError } from '@/utils'
const { locale } = createI18n.global

View File

@ -1,7 +1,7 @@
import { GetterTree } from 'vuex'
import type { GetterTree } from 'vuex'
import { ROOT_STORE } from '@/store/constants'
import { IRootGetters, IRootState } from '@/store/modules/root/types'
import type { IRootGetters, IRootState } from '@/store/modules/root/types'
export const getters: GetterTree<IRootState, IRootState> & IRootGetters = {
[ROOT_STORE.GETTERS.APP_CONFIG]: (state: IRootState) => {

View File

@ -1,4 +1,4 @@
import { Module, ModuleTree } from 'vuex'
import type { Module, ModuleTree } from 'vuex'
import authUserModule from '@/store/modules/authUser'
import oAuthModule from '@/store/modules/oauth2'
@ -6,7 +6,7 @@ import { actions } from '@/store/modules/root/actions'
import { getters } from '@/store/modules/root/getters'
import { mutations } from '@/store/modules/root/mutations'
import { state } from '@/store/modules/root/state'
import { IRootState } from '@/store/modules/root/types'
import type { IRootState } from '@/store/modules/root/types'
import sportsModule from '@/store/modules/sports'
import statsModule from '@/store/modules/statistics'
import usersModule from '@/store/modules/users'

View File

@ -1,8 +1,8 @@
import { MutationTree } from 'vuex'
import type { MutationTree } from 'vuex'
import { ROOT_STORE } from '@/store/constants'
import { IRootState, TRootMutations } from '@/store/modules/root/types'
import { TAppConfig, IAppStatistics } from '@/types/application'
import type { IRootState, TRootMutations } from '@/store/modules/root/types'
import type { TAppConfig, IAppStatistics } from '@/types/application'
import { localeFromLanguage } from '@/utils/locales'
export const mutations: MutationTree<IRootState> & TRootMutations = {

View File

@ -1,7 +1,7 @@
import { enUS } from 'date-fns/locale'
import { IRootState } from '@/store/modules/root/types'
import { IApplication } from '@/types/application'
import type { IRootState } from '@/store/modules/root/types'
import type { IApplication } from '@/types/application'
export const state: IRootState = {
root: true,

View File

@ -1,5 +1,5 @@
import { Locale } from 'date-fns'
import {
import type { Locale } from 'date-fns'
import type {
ActionContext,
CommitOptions,
DispatchOptions,
@ -7,7 +7,7 @@ import {
} from 'vuex'
import { ROOT_STORE } from '@/store/constants'
import {
import type {
TAppConfig,
IApplication,
IAppStatistics,
@ -100,7 +100,7 @@ export type TRootStoreModule<S = IRootState> = Omit<
} & {
commit<
K extends keyof TRootMutations,
P extends Parameters<TRootMutations[K]>[1]
P extends Parameters<TRootMutations[K]>[1],
>(
key: K,
payload?: P,

View File

@ -1,10 +1,10 @@
import { ActionContext, ActionTree } from 'vuex'
import type { ActionContext, ActionTree } from 'vuex'
import authApi from '@/api/authApi'
import { AUTH_USER_STORE, ROOT_STORE, SPORTS_STORE } from '@/store/constants'
import { IRootState } from '@/store/modules/root/types'
import { ISportsActions, ISportsState } from '@/store/modules/sports/types'
import { ISportPayload } from '@/types/sports'
import type { IRootState } from '@/store/modules/root/types'
import type { ISportsActions, ISportsState } from '@/store/modules/sports/types'
import type { ISportPayload } from '@/types/sports'
import { handleError } from '@/utils'
export const actions: ActionTree<ISportsState, IRootState> & ISportsActions = {

View File

@ -1,8 +1,8 @@
import { GetterTree } from 'vuex'
import type { GetterTree } from 'vuex'
import { SPORTS_STORE } from '@/store/constants'
import { IRootState } from '@/store/modules/root/types'
import { ISportsGetters, ISportsState } from '@/store/modules/sports/types'
import type { IRootState } from '@/store/modules/root/types'
import type { ISportsGetters, ISportsState } from '@/store/modules/sports/types'
export const getters: GetterTree<ISportsState, IRootState> & ISportsGetters = {
[SPORTS_STORE.GETTERS.SPORTS]: (state: ISportsState) => state.sports,

View File

@ -1,11 +1,11 @@
import { Module } from 'vuex'
import type { Module } from 'vuex'
import { IRootState } from '@/store/modules/root/types'
import type { IRootState } from '@/store/modules/root/types'
import { actions } from '@/store/modules/sports/actions'
import { getters } from '@/store/modules/sports/getters'
import { mutations } from '@/store/modules/sports/mutations'
import { sportsState } from '@/store/modules/sports/state'
import { ISportsState } from '@/store/modules/sports/types'
import type { ISportsState } from '@/store/modules/sports/types'
const sports: Module<ISportsState, IRootState> = {
state: sportsState,

View File

@ -1,8 +1,11 @@
import { MutationTree } from 'vuex'
import type { MutationTree } from 'vuex'
import { SPORTS_STORE } from '@/store/constants'
import { ISportsState, TSportsMutations } from '@/store/modules/sports/types'
import { ISport } from '@/types/sports'
import type {
ISportsState,
TSportsMutations,
} from '@/store/modules/sports/types'
import type { ISport } from '@/types/sports'
export const mutations: MutationTree<ISportsState> & TSportsMutations = {
[SPORTS_STORE.MUTATIONS.SET_SPORTS](state: ISportsState, sports: ISport[]) {

View File

@ -1,4 +1,4 @@
import { ISportsState } from '@/store/modules/sports/types'
import type { ISportsState } from '@/store/modules/sports/types'
export const sportsState: ISportsState = {
sports: [],

View File

@ -1,4 +1,4 @@
import {
import type {
ActionContext,
CommitOptions,
DispatchOptions,
@ -6,8 +6,8 @@ import {
} from 'vuex'
import { SPORTS_STORE } from '@/store/constants'
import { IRootState } from '@/store/modules/root/types'
import { ISport, ISportPayload } from '@/types/sports'
import type { IRootState } from '@/store/modules/root/types'
import type { ISport, ISportPayload } from '@/types/sports'
export interface ISportsState {
sports: ISport[]
@ -47,7 +47,7 @@ export type TSportsStoreModule<S = ISportsState> = Omit<
} & {
commit<
K extends keyof TSportsMutations,
P extends Parameters<TSportsMutations[K]>[1]
P extends Parameters<TSportsMutations[K]>[1],
>(
key: K,
payload?: P,

View File

@ -1,13 +1,13 @@
import { ActionContext, ActionTree } from 'vuex'
import type { ActionContext, ActionTree } from 'vuex'
import authApi from '@/api/authApi'
import { STATS_STORE, ROOT_STORE } from '@/store/constants'
import { IRootState } from '@/store/modules/root/types'
import {
import type { IRootState } from '@/store/modules/root/types'
import type {
IStatisticsActions,
IStatisticsState,
} from '@/store/modules/statistics/types'
import { IUserStatisticsPayload } from '@/types/statistics'
import type { IUserStatisticsPayload } from '@/types/statistics'
import { handleError } from '@/utils'
export const actions: ActionTree<IStatisticsState, IRootState> &

View File

@ -1,8 +1,8 @@
import { GetterTree } from 'vuex'
import type { GetterTree } from 'vuex'
import { STATS_STORE } from '@/store/constants'
import { IRootState } from '@/store/modules/root/types'
import {
import type { IRootState } from '@/store/modules/root/types'
import type {
IStatisticsGetters,
IStatisticsState,
} from '@/store/modules/statistics/types'

View File

@ -1,11 +1,11 @@
import { Module } from 'vuex'
import type { Module } from 'vuex'
import { IRootState } from '@/store/modules/root/types'
import type { IRootState } from '@/store/modules/root/types'
import { actions } from '@/store/modules/statistics/actions'
import { getters } from '@/store/modules/statistics/getters'
import { mutations } from '@/store/modules/statistics/mutations'
import { statisticsState } from '@/store/modules/statistics/state'
import { IStatisticsState } from '@/store/modules/statistics/types'
import type { IStatisticsState } from '@/store/modules/statistics/types'
const statistics: Module<IStatisticsState, IRootState> = {
state: statisticsState,

View File

@ -1,11 +1,11 @@
import { MutationTree } from 'vuex'
import type { MutationTree } from 'vuex'
import { STATS_STORE } from '@/store/constants'
import {
import type {
IStatisticsState,
TStatisticsMutations,
} from '@/store/modules/statistics/types'
import { TStatisticsFromApi } from '@/types/statistics'
import type { TStatisticsFromApi } from '@/types/statistics'
export const mutations: MutationTree<IStatisticsState> & TStatisticsMutations =
{

View File

@ -1,5 +1,5 @@
import { IStatisticsState } from '@/store/modules/statistics/types'
import { TStatisticsFromApi } from '@/types/statistics'
import type { IStatisticsState } from '@/store/modules/statistics/types'
import type { TStatisticsFromApi } from '@/types/statistics'
export const statisticsState: IStatisticsState = {
statistics: <TStatisticsFromApi>{},

View File

@ -1,4 +1,4 @@
import {
import type {
ActionContext,
CommitOptions,
DispatchOptions,
@ -6,8 +6,11 @@ import {
} from 'vuex'
import { STATS_STORE } from '@/store/constants'
import { IRootState } from '@/store/modules/root/types'
import { IUserStatisticsPayload, TStatisticsFromApi } from '@/types/statistics'
import type { IRootState } from '@/store/modules/root/types'
import type {
IUserStatisticsPayload,
TStatisticsFromApi,
} from '@/types/statistics'
export interface IStatisticsState {
statistics: TStatisticsFromApi
@ -48,7 +51,7 @@ export type TStatisticsStoreModule<S = IStatisticsState> = Omit<
} & {
commit<
K extends keyof TStatisticsMutations,
P extends Parameters<TStatisticsMutations[K]>[1]
P extends Parameters<TStatisticsMutations[K]>[1],
>(
key: K,
payload?: P,

View File

@ -1,13 +1,13 @@
import { ActionContext, ActionTree } from 'vuex'
import type { ActionContext, ActionTree } from 'vuex'
import authApi from '@/api/authApi'
import router from '@/router'
import { AUTH_USER_STORE, ROOT_STORE, USERS_STORE } from '@/store/constants'
import { IAuthUserState } from '@/store/modules/authUser/types'
import { IRootState } from '@/store/modules/root/types'
import { IUsersActions, IUsersState } from '@/store/modules/users/types'
import { TPaginationPayload } from '@/types/api'
import { IAdminUserPayload, IUserDeletionPayload } from '@/types/user'
import type { IAuthUserState } from '@/store/modules/authUser/types'
import type { IRootState } from '@/store/modules/root/types'
import type { IUsersActions, IUsersState } from '@/store/modules/users/types'
import type { TPaginationPayload } from '@/types/api'
import type { IAdminUserPayload, IUserDeletionPayload } from '@/types/user'
import { handleError } from '@/utils'
export const deleteUserAccount = (

View File

@ -1,8 +1,8 @@
import { GetterTree } from 'vuex'
import type { GetterTree } from 'vuex'
import { USERS_STORE } from '@/store/constants'
import { IRootState } from '@/store/modules/root/types'
import { IUsersGetters, IUsersState } from '@/store/modules/users/types'
import type { IRootState } from '@/store/modules/root/types'
import type { IUsersGetters, IUsersState } from '@/store/modules/users/types'
export const getters: GetterTree<IUsersState, IRootState> & IUsersGetters = {
[USERS_STORE.GETTERS.USER]: (state: IUsersState) => {

View File

@ -1,11 +1,11 @@
import { Module } from 'vuex'
import type { Module } from 'vuex'
import { IRootState } from '@/store/modules/root/types'
import type { IRootState } from '@/store/modules/root/types'
import { actions } from '@/store/modules/users/actions'
import { getters } from '@/store/modules/users/getters'
import { mutations } from '@/store/modules/users/mutations'
import { usersState } from '@/store/modules/users/state'
import { IUsersState } from '@/store/modules/users/types'
import type { IUsersState } from '@/store/modules/users/types'
const users: Module<IUsersState, IRootState> = {
state: usersState,

View File

@ -1,9 +1,9 @@
import { MutationTree } from 'vuex'
import type { MutationTree } from 'vuex'
import { USERS_STORE } from '@/store/constants'
import { IUsersState, TUsersMutations } from '@/store/modules/users/types'
import { IPagination } from '@/types/api'
import { IUserProfile } from '@/types/user'
import type { IUsersState, TUsersMutations } from '@/store/modules/users/types'
import type { IPagination } from '@/types/api'
import type { IUserProfile } from '@/types/user'
export const mutations: MutationTree<IUsersState> & TUsersMutations = {
[USERS_STORE.MUTATIONS.UPDATE_USER](state: IUsersState, user: IUserProfile) {

View File

@ -1,6 +1,6 @@
import { IUsersState } from '@/store/modules/users/types'
import { IPagination } from '@/types/api'
import { IUserProfile } from '@/types/user'
import type { IUsersState } from '@/store/modules/users/types'
import type { IPagination } from '@/types/api'
import type { IUserProfile } from '@/types/user'
export const usersState: IUsersState = {
user: <IUserProfile>{},

View File

@ -1,4 +1,4 @@
import {
import type {
ActionContext,
CommitOptions,
DispatchOptions,
@ -6,9 +6,9 @@ import {
} from 'vuex'
import { USERS_STORE } from '@/store/constants'
import { IRootState } from '@/store/modules/root/types'
import { IPagination, TPaginationPayload } from '@/types/api'
import {
import type { IRootState } from '@/store/modules/root/types'
import type { IPagination, TPaginationPayload } from '@/types/api'
import type {
IAdminUserPayload,
IUserDeletionPayload,
IUserProfile,
@ -86,7 +86,7 @@ export type TUsersStoreModule<S = IUsersState> = Omit<
} & {
commit<
K extends keyof TUsersMutations,
P extends Parameters<TUsersMutations[K]>[1]
P extends Parameters<TUsersMutations[K]>[1],
>(
key: K,
payload?: P,

View File

@ -1,15 +1,15 @@
import { ActionContext, ActionTree } from 'vuex'
import type { ActionContext, ActionTree } from 'vuex'
import authApi from '@/api/authApi'
import router from '@/router'
import { ROOT_STORE, AUTH_USER_STORE, WORKOUTS_STORE } from '@/store/constants'
import { IRootState } from '@/store/modules/root/types'
import type { IRootState } from '@/store/modules/root/types'
import { WorkoutsMutations } from '@/store/modules/workouts/enums'
import {
import type {
IWorkoutsActions,
IWorkoutsState,
} from '@/store/modules/workouts/types'
import {
import type {
IWorkout,
IWorkoutForm,
IWorkoutPayload,

View File

@ -1,8 +1,8 @@
import { GetterTree } from 'vuex'
import type { GetterTree } from 'vuex'
import { WORKOUTS_STORE } from '@/store/constants'
import { IRootState } from '@/store/modules/root/types'
import {
import type { IRootState } from '@/store/modules/root/types'
import type {
IWorkoutsGetters,
IWorkoutsState,
} from '@/store/modules/workouts/types'

View File

@ -1,11 +1,11 @@
import { Module } from 'vuex'
import type { Module } from 'vuex'
import { IRootState } from '@/store/modules/root/types'
import type { IRootState } from '@/store/modules/root/types'
import { actions } from '@/store/modules/workouts/actions'
import { getters } from '@/store/modules/workouts/getters'
import { mutations } from '@/store/modules/workouts/mutations'
import { workoutsState } from '@/store/modules/workouts/state'
import { IWorkoutsState } from '@/store/modules/workouts/types'
import type { IWorkoutsState } from '@/store/modules/workouts/types'
const workouts: Module<IWorkoutsState, IRootState> = {
state: workoutsState,

View File

@ -1,12 +1,12 @@
import { MutationTree } from 'vuex'
import type { MutationTree } from 'vuex'
import { WORKOUTS_STORE } from '@/store/constants'
import {
import type {
IWorkoutsState,
TWorkoutsMutations,
} from '@/store/modules/workouts/types'
import { IPagination } from '@/types/api'
import { IWorkout, IWorkoutApiChartData } from '@/types/workouts'
import type { IPagination } from '@/types/api'
import type { IWorkout, IWorkoutApiChartData } from '@/types/workouts'
export const mutations: MutationTree<IWorkoutsState> & TWorkoutsMutations = {
[WORKOUTS_STORE.MUTATIONS.ADD_TIMELINE_WORKOUTS](

View File

@ -1,6 +1,6 @@
import { IWorkoutsState } from '@/store/modules/workouts/types'
import { IPagination } from '@/types/api'
import { IWorkout } from '@/types/workouts'
import type { IWorkoutsState } from '@/store/modules/workouts/types'
import type { IPagination } from '@/types/api'
import type { IWorkout } from '@/types/workouts'
export const workoutsState: IWorkoutsState = {
calendar_workouts: [],

View File

@ -1,4 +1,4 @@
import {
import type {
ActionContext,
CommitOptions,
DispatchOptions,
@ -6,9 +6,9 @@ import {
} from 'vuex'
import { WORKOUTS_STORE } from '@/store/constants'
import { IRootState } from '@/store/modules/root/types'
import { IPagination } from '@/types/api'
import {
import type { IRootState } from '@/store/modules/root/types'
import type { IPagination } from '@/types/api'
import type {
IWorkout,
IWorkoutApiChartData,
TWorkoutsPayload,
@ -126,7 +126,7 @@ export type TWorkoutsStoreModule<S = IWorkoutsState> = Omit<
} & {
commit<
K extends keyof TWorkoutsMutations,
P extends Parameters<TWorkoutsMutations[K]>[1]
P extends Parameters<TWorkoutsMutations[K]>[1],
>(
key: K,
payload?: P,

View File

@ -1,10 +1,10 @@
import { TAuthUserStoreModule } from '@/store/modules/authUser/types'
import { TOAuth2StoreModule } from '@/store/modules/oauth2/types'
import { TRootStoreModule } from '@/store/modules/root/types'
import { TSportsStoreModule } from '@/store/modules/sports/types'
import { TStatisticsStoreModule } from '@/store/modules/statistics/types'
import { TUsersStoreModule } from '@/store/modules/users/types'
import { TWorkoutsStoreModule } from '@/store/modules/workouts/types'
import type { TAuthUserStoreModule } from '@/store/modules/authUser/types'
import type { TOAuth2StoreModule } from '@/store/modules/oauth2/types'
import type { TRootStoreModule } from '@/store/modules/root/types'
import type { TSportsStoreModule } from '@/store/modules/sports/types'
import type { TStatisticsStoreModule } from '@/store/modules/statistics/types'
import type { TUsersStoreModule } from '@/store/modules/users/types'
import type { TWorkoutsStoreModule } from '@/store/modules/workouts/types'
type StoreModules = {
authUserModule: TAuthUserStoreModule