|
|
|
@ -2,7 +2,7 @@ import { appEvents, hasImageUrl, IContactDetail } from '@/shared'
@@ -2,7 +2,7 @@ import { appEvents, hasImageUrl, IContactDetail } from '@/shared'
|
|
|
|
|
import { contactsService } from '@/services/domain' |
|
|
|
|
import { useEffect, useMemo, useState } from 'react' |
|
|
|
|
import { getContactDetailConfig } from '../configs' |
|
|
|
|
import { createFullName, isSoonBirthday } from '@/shared/helpers' |
|
|
|
|
import { createContactName, isSoonBirthday } from '@/shared/helpers' |
|
|
|
|
import { Linking } from 'react-native' |
|
|
|
|
import { ContactDetailFieldType } from '../enums' |
|
|
|
|
import moment from 'moment' |
|
|
|
@ -43,10 +43,7 @@ export const useContactDetail = (id: number) => {
@@ -43,10 +43,7 @@ export const useContactDetail = (id: number) => {
|
|
|
|
|
userId: contactDetailInfo?.userId, |
|
|
|
|
firstName: contactDetailInfo.firstName, |
|
|
|
|
lastName: contactDetailInfo?.lastName, |
|
|
|
|
fullName: createFullName( |
|
|
|
|
contactDetailInfo.firstName, |
|
|
|
|
contactDetailInfo?.lastName, |
|
|
|
|
), |
|
|
|
|
fullName: createContactName(contactDetailInfo.firstName, contactDetailInfo.middleName, contactDetailInfo.lastName), |
|
|
|
|
position: contactDetailInfo?.position, |
|
|
|
|
factoryName: contactDetail?.factoryName, |
|
|
|
|
avatarUrl: hasImageUrl( |
|
|
|
@ -60,6 +57,7 @@ export const useContactDetail = (id: number) => {
@@ -60,6 +57,7 @@ export const useContactDetail = (id: number) => {
|
|
|
|
|
isSoonBirthday: isSoonBirthday(contactDetailInfo?.dateOfBirth), |
|
|
|
|
email: contactDetail?.email, |
|
|
|
|
chatId: contactDetail?.chatId, |
|
|
|
|
status: contactDetail?.status |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, [contactDetail]) |
|
|
|
|