fix: test

This commit is contained in:
sajjadtalkhabi
2026-05-28 15:40:22 +03:30
parent fc0aa2586e
commit 3f3c66a02d
25 changed files with 406 additions and 104 deletions
@@ -295,7 +295,10 @@ const { data: profile } = useGetMeQuery()
watch(profile, (user) => {
if (!user) return
const nameParts = String(user.name || '').trim().split(/\s+/).filter(Boolean)
const nameParts = String(user.name || '')
.trim()
.split(/\s+/)
.filter(Boolean)
const firstName = user.firstName || nameParts[0] || ''
const lastName = user.lastName || nameParts.slice(1).join(' ') || ''
const phone = user.phone || user.phoneNumber || ''
@@ -309,9 +312,9 @@ watch(profile, (user) => {
gender: user.profile?.gender || '',
bio: user.profile?.bio || '',
phoneNumber: phone,
provinceId: user.address?.province?.id || '',
cityId: user.address?.city?.id || '',
address: user.address?.address || '',
provinceId: user?.province?.id || '',
cityId: user?.city?.id || '',
address: user?.address || '',
avatarId: user.profile?.avatarId || null,
}
initialNationalCode.value = user.nationalCode || ''