Browse Source

fix: 修复 HR/企业端进不去(非 Tab 页误置于 Tabs 组内)

- 将 (enterprise) 组内 6 个非 Tab 屏企业页(enterprise-certification/audit-report/candidate-detail/hr-evaluation/job-publish/operation-rules)移回根目录 app/,与求职端 job-preference 结构对称
- 仅保留 4 个 Tab 屏(enterprise-overview/job-management/talent-recommendation/enterprise-chat)+ _layout 在组内
- 修正移回文件相对引用 ../../src → ../src
- 根因:enterprise-certification 被塞进 Tabs 组但非 Tab 屏,router.replace('/enterprise-certification') 进入后 Tab 导航器因 route 未声明而导航失败/白屏,导致『HR 进不去』;移出后成为干净栈页,身份认证→企业端链路通畅
master
doublex001 2 months ago
parent
commit
39728cd1aa
  1. 6
      app/audit-report.tsx
  2. 6
      app/candidate-detail.tsx
  3. 8
      app/enterprise-certification.tsx
  4. 6
      app/hr-evaluation.tsx
  5. 6
      app/job-publish.tsx
  6. 6
      app/operation-rules.tsx

6
app/(enterprise)/audit-report.tsx → app/audit-report.tsx

@ -3,9 +3,9 @@ import { useRouter } from 'expo-router';
import { ActivityIndicator, Pressable, ScrollView, StyleSheet, Text, View } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import Svg, { Line, Path, Rect, Text as SvgText } from 'react-native-svg';
import { useAuditReport } from '../../src/hooks';
import { colors } from '../../src/theme';
import type { AuditKPI, AuditTrendPoint, RiskDistributionItem } from '../../src/types';
import { useAuditReport } from '../src/hooks';
import { colors } from '../src/theme';
import type { AuditKPI, AuditTrendPoint, RiskDistributionItem } from '../src/types';
/* ===================== 子组件:顶部导航 ===================== */

6
app/(enterprise)/candidate-detail.tsx → app/candidate-detail.tsx

@ -10,9 +10,9 @@ import {
} from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import Svg, { Line, Path, Polygon, Text as SvgText } from 'react-native-svg';
import { useCandidateDetail } from '../../src/hooks';
import { colors } from '../../src/theme';
import type { CandidateAbility, CandidateReview } from '../../src/types';
import { useCandidateDetail } from '../src/hooks';
import { colors } from '../src/theme';
import type { CandidateAbility, CandidateReview } from '../src/types';
/* ===================== 子组件:顶部导航 ===================== */

8
app/(enterprise)/enterprise-certification.tsx → app/enterprise-certification.tsx

@ -11,10 +11,10 @@ import {
View,
} from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useEnterpriseCertification } from '../../src/hooks';
import { useAuth } from '../../src/context/AuthContext';
import { colors } from '../../src/theme';
import type { EnterpriseCertificationForm, EnterpriseCertificationStatus } from '../../src/types';
import { useEnterpriseCertification } from '../src/hooks';
import { useAuth } from '../src/context/AuthContext';
import { colors } from '../src/theme';
import type { EnterpriseCertificationForm, EnterpriseCertificationStatus } from '../src/types';
/* ===================== 子组件:顶部导航 ===================== */

6
app/(enterprise)/hr-evaluation.tsx → app/hr-evaluation.tsx

@ -10,9 +10,9 @@ import {
} from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import Svg, { Circle, Line, Path, Text as SvgText } from 'react-native-svg';
import { useHREvaluation } from '../../src/hooks';
import { colors } from '../../src/theme';
import type { EvaluationDimension, EvaluationReview, EvaluationTrendPoint } from '../../src/types';
import { useHREvaluation } from '../src/hooks';
import { colors } from '../src/theme';
import type { EvaluationDimension, EvaluationReview, EvaluationTrendPoint } from '../src/types';
/** 评级 → 文字颜色(优秀=品牌蓝,良好=主色,其他=次要文字) */
const LEVEL_TEXT_COLOR: Record<string, string> = {

6
app/(enterprise)/job-publish.tsx → app/job-publish.tsx

@ -11,9 +11,9 @@ import {
View,
} from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useJobPublish } from '../../src/hooks';
import { colors } from '../../src/theme';
import type { JobPublishFormData } from '../../src/types';
import { useJobPublish } from '../src/hooks';
import { colors } from '../src/theme';
import type { JobPublishFormData } from '../src/types';
const WORK_TYPE_OPTIONS: { label: string; value: JobPublishFormData['workType'] }[] = [
{ label: '全职', value: 'full-time' },

6
app/(enterprise)/operation-rules.tsx → app/operation-rules.tsx

@ -12,9 +12,9 @@ import {
View,
} from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useOperationRules } from '../../src/hooks';
import { colors } from '../../src/theme';
import type { MatchMode, OperationRules } from '../../src/types';
import { useOperationRules } from '../src/hooks';
import { colors } from '../src/theme';
import type { MatchMode, OperationRules } from '../src/types';
/* ===================== 子组件:顶部导航 ===================== */
Loading…
Cancel
Save