Client - update user typing

This commit is contained in:
Sam
2022-03-13 09:50:09 +01:00
parent ac6aceadfd
commit 0b1d99aa7a
16 changed files with 41 additions and 37 deletions

View File

@@ -133,7 +133,7 @@
import UserPicture from '@/components/User/UserPicture.vue'
import { AUTH_USER_STORE, ROOT_STORE, USERS_STORE } from '@/store/constants'
import { IPagination, TPaginationPayload } from '@/types/api'
import { IUserProfile } from '@/types/user'
import { IAuthUserProfile, IUserProfile } from '@/types/user'
import { useStore } from '@/use/useStore'
import { getQuery, sortList } from '@/utils/api'
import { getDateWithTZ } from '@/utils/dates'
@@ -152,7 +152,7 @@
let query: TPaginationPayload = reactive(
getQuery(route.query, orderByList, defaultOrderBy)
)
const authUser: ComputedRef<IUserProfile> = computed(
const authUser: ComputedRef<IAuthUserProfile> = computed(
() => store.getters[AUTH_USER_STORE.GETTERS.AUTH_USER_PROFILE]
)
const users: ComputedRef<IUserProfile[]> = computed(

View File

@@ -96,7 +96,7 @@
TStatisticsFromApi,
IStatisticsParams,
} from '@/types/statistics'
import { IUserProfile } from '@/types/user'
import { IAuthUserProfile } from '@/types/user'
import { useStore } from '@/use/useStore'
import { formatStats } from '@/utils/statistics'
@@ -111,7 +111,7 @@
required: true,
},
user: {
type: Object as PropType<IUserProfile>,
type: Object as PropType<IAuthUserProfile>,
required: true,
},
chartParams: {
@@ -169,7 +169,7 @@
}
function getApiParams(
chartParams: IStatisticsDateParams,
user: IUserProfile
user: IAuthUserProfile
): IStatisticsParams {
return {
from: format(chartParams.start, 'yyyy-MM-dd'),

View File

@@ -84,7 +84,7 @@
import UserPicture from '@/components/User/UserPicture.vue'
import { AUTH_USER_STORE, ROOT_STORE } from '@/store/constants'
import { IDropdownOption } from '@/types/forms'
import { IUserProfile } from '@/types/user'
import { IAuthUserProfile } from '@/types/user'
import { useStore } from '@/use/useStore'
import { availableLanguages } from '@/utils/locales'
@@ -93,7 +93,7 @@
const { locale } = useI18n()
const store = useStore()
const authUser: ComputedRef<IUserProfile> = computed(
const authUser: ComputedRef<IAuthUserProfile> = computed(
() => store.getters[AUTH_USER_STORE.GETTERS.AUTH_USER_PROFILE]
)
const isAuthenticated: ComputedRef<boolean> = computed(

View File

@@ -48,7 +48,7 @@
import { ComputedRef, Ref, computed, ref, toRefs, withDefaults } from 'vue'
import { AUTH_USER_STORE, USERS_STORE } from '@/store/constants'
import { IUserProfile } from '@/types/user'
import { IAuthUserProfile, IUserProfile } from '@/types/user'
import { useStore } from '@/use/useStore'
interface Props {
@@ -62,7 +62,7 @@
const store = useStore()
const { user, fromAdmin } = toRefs(props)
const authUser: ComputedRef<IUserProfile> = computed(
const authUser: ComputedRef<IAuthUserProfile> = computed(
() => store.getters[AUTH_USER_STORE.GETTERS.AUTH_USER_PROFILE]
)
const registrationDate = computed(() =>