+13
-3
@@ -214,8 +214,8 @@ import useModal from '@/composables/useModal'
|
||||
import BasicModal from '@/components/BasicModal.vue'
|
||||
import { formatJalaaliDate } from '@/utils/date-utils'
|
||||
import LineTitleBlock from '@/components/LineTitleBlock.vue'
|
||||
import { useAdminUserQuery } from '@/services/query/admin-users'
|
||||
import LineInfoBlock from '@/components/blocks/LineInfoBlock.vue'
|
||||
import { useAdminUserQuery, useAdminUserRegisterDataQuery } from '@/services/query/admin-users'
|
||||
import {
|
||||
AUDIENCE_CONFLICT_RESPONSE,
|
||||
COMPETING_PROPAGATOR_RESPONSE,
|
||||
@@ -242,10 +242,20 @@ const { data: fetched } = useAdminUserQuery(userIdRef, {
|
||||
enabled: () => !!userIdRef.value,
|
||||
})
|
||||
|
||||
const { data: registerData } = useAdminUserRegisterDataQuery(userIdRef, {
|
||||
enabled: () => !!userIdRef.value,
|
||||
})
|
||||
|
||||
const user = computed(() => modalData.value.user || fetched.value || null)
|
||||
const profile = computed(() => user.value?.profile || {})
|
||||
|
||||
// The register-data endpoint returns the answers the user gave during the
|
||||
// registration steps — the same fields the sections below render. Merge it over
|
||||
// the user's stored profile so reviewing admins see what was actually submitted.
|
||||
const profile = computed(() => ({ ...user.value?.profile, ...registerData.value }))
|
||||
|
||||
const fullName = computed(
|
||||
() => `${user.value?.firstName || ''} ${user.value?.lastName || ''}`.trim() || '—'
|
||||
() =>
|
||||
user.value?.name || `${user.value?.firstName || ''} ${user.value?.lastName || ''}`.trim() || '—'
|
||||
)
|
||||
|
||||
const platforms = computed(() =>
|
||||
|
||||
Reference in New Issue
Block a user