|
@@ -5,6 +5,7 @@ import './TalentDetail.css'
|
|
|
import { useQuery } from '@tanstack/react-query'
|
|
import { useQuery } from '@tanstack/react-query'
|
|
|
import { PageContainer } from '@d8d/mini-shared-ui-components/components/page-container'
|
|
import { PageContainer } from '@d8d/mini-shared-ui-components/components/page-container'
|
|
|
import { Navbar } from '@d8d/mini-shared-ui-components/components/navbar'
|
|
import { Navbar } from '@d8d/mini-shared-ui-components/components/navbar'
|
|
|
|
|
+import { NameAvatar } from '@/components/NameAvatar'
|
|
|
import { enterpriseDisabilityClient } from '@/api'
|
|
import { enterpriseDisabilityClient } from '@/api'
|
|
|
import { useRequireAuth } from '@/hooks'
|
|
import { useRequireAuth } from '@/hooks'
|
|
|
// 直接从后端模块导入类型定义
|
|
// 直接从后端模块导入类型定义
|
|
@@ -257,13 +258,6 @@ const TalentDetail: React.FC<TalentDetailProps> = () => {
|
|
|
const isLoading = talentLoading || workLoading || salaryLoading || filesLoading || historyLoading || workHistoryLoading || videosLoading
|
|
const isLoading = talentLoading || workLoading || salaryLoading || filesLoading || historyLoading || workHistoryLoading || videosLoading
|
|
|
const hasError = talentError
|
|
const hasError = talentError
|
|
|
|
|
|
|
|
- // 获取头像颜色
|
|
|
|
|
- const getAvatarColor = (id: number) => {
|
|
|
|
|
- const colors = ['blue', 'green', 'purple', 'orange', 'red', 'teal']
|
|
|
|
|
- const index = id % colors.length
|
|
|
|
|
- return colors[index]
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
// 格式化日期
|
|
// 格式化日期
|
|
|
const formatDate = (dateStr?: string) => {
|
|
const formatDate = (dateStr?: string) => {
|
|
|
if (!dateStr) return '未指定'
|
|
if (!dateStr) return '未指定'
|
|
@@ -422,10 +416,8 @@ const TalentDetail: React.FC<TalentDetailProps> = () => {
|
|
|
<View className="gradient-bg text-white p-5">
|
|
<View className="gradient-bg text-white p-5">
|
|
|
<View className="flex justify-between items-start">
|
|
<View className="flex justify-between items-start">
|
|
|
<View className="flex items-center">
|
|
<View className="flex items-center">
|
|
|
- <View className={`name-avatar ${getAvatarColor(talentDetail.id)} w-16 h-16 rounded-full border-2 border-white mr-4 flex items-center justify-center`}>
|
|
|
|
|
- <Text className="text-white text-2xl font-bold">
|
|
|
|
|
- {talentDetail.name.charAt(0)}
|
|
|
|
|
- </Text>
|
|
|
|
|
|
|
+ <View className="mr-4">
|
|
|
|
|
+ <NameAvatar name={talentDetail.name} size="lg" id={talentDetail.id} className="border-2 border-white" />
|
|
|
</View>
|
|
</View>
|
|
|
<View>
|
|
<View>
|
|
|
<Text className="text-xl font-bold">{talentDetail.name}</Text>
|
|
<Text className="text-xl font-bold">{talentDetail.name}</Text>
|