diff --git a/app/performance-survey/PerformanceSurveyAdminConfig.test.tsx b/app/performance-survey/PerformanceSurveyAdminConfig.test.tsx index e228150..6ad1692 100644 --- a/app/performance-survey/PerformanceSurveyAdminConfig.test.tsx +++ b/app/performance-survey/PerformanceSurveyAdminConfig.test.tsx @@ -214,6 +214,19 @@ describe('PerformanceSurveyAdminConfig', () => { await waitFor(() => expect(onMonthChange).toHaveBeenCalledWith('2026-09')) }) + test.each([ + ['positions', '岗位管理'], + ['people', '人员分配'], + ['templates', '模板管理'], + ] as const)('%s 管理页面不显示月份查看入口', async (mode, heading) => { + const request = createRequest() + render() + + await waitFor(() => expect(screen.getByRole('heading', { name: heading })).toBeInTheDocument()) + expect(screen.queryByLabelText('查看月份')).not.toBeInTheDocument() + expect(request).toHaveBeenCalledWith(`/admin/config?month=2026-07&scope=${mode}`) + }) + test('岗位编辑产生 dirty 状态并保护岗位切换', async () => { const request = createRequest() const onDirtyChange = jest.fn() diff --git a/app/performance-survey/PerformanceSurveyAdminConfig.tsx b/app/performance-survey/PerformanceSurveyAdminConfig.tsx index c55d55b..a15637d 100644 --- a/app/performance-survey/PerformanceSurveyAdminConfig.tsx +++ b/app/performance-survey/PerformanceSurveyAdminConfig.tsx @@ -549,15 +549,17 @@ export function PerformanceSurveyAdminConfig({ {dirty && } - + {mode === 'overview' && ( + + )} {notice && (