diff --git a/apps/admin/src/components/StudentProfileContent/shared.integration.test.ts b/apps/admin/src/components/StudentProfileContent/shared.integration.test.ts new file mode 100644 index 0000000..84bef23 --- /dev/null +++ b/apps/admin/src/components/StudentProfileContent/shared.integration.test.ts @@ -0,0 +1,46 @@ +import { describe, expect, it } from 'vitest'; +import { + FOLLOW_UP_METHOD_OPTIONS, + GENDER_OPTIONS, + GRADE_OPTIONS, + SUBJECT_DIRECTION_OPTIONS, + SUBJECT_OPTIONS, +} from './shared'; + +describe('StudentProfileContent shared option constants', () => { + it('SUBJECT_OPTIONS covers common exam subjects', () => { + expect(SUBJECT_OPTIONS.map((o) => o.value)).toEqual([ + '语文', + '数学', + '英语', + '物理', + '化学', + '生物', + '政治', + '历史', + '地理', + '计算机', + ]); + }); + + it('FOLLOW_UP_METHOD_OPTIONS covers common follow-up channels', () => { + expect(FOLLOW_UP_METHOD_OPTIONS.map((o) => o.value)).toEqual([ + '电话', + '微信', + '面谈', + '上门', + '其他', + ]); + }); + + it('GENDER / GRADE / SUBJECT_DIRECTION options match the agreed enums', () => { + expect(GENDER_OPTIONS.map((o) => o.value)).toEqual(['男', '女']); + expect(GRADE_OPTIONS.map((o) => o.value)).toEqual(['高三', '复读', '应届']); + expect(SUBJECT_DIRECTION_OPTIONS.map((o) => o.value)).toEqual([ + '物理类', + '历史类', + '艺术类', + '体育类', + ]); + }); +}); diff --git a/apps/admin/src/components/StudentProfileContent/shared.ts b/apps/admin/src/components/StudentProfileContent/shared.ts index c08f86e..2aed0ef 100644 --- a/apps/admin/src/components/StudentProfileContent/shared.ts +++ b/apps/admin/src/components/StudentProfileContent/shared.ts @@ -215,3 +215,47 @@ export interface TabProps { studentId: number; onRefresh: () => void; } + +/** 常见考试科目(成绩录入联想用) */ +export const SUBJECT_OPTIONS = [ + { value: '语文', label: '语文' }, + { value: '数学', label: '数学' }, + { value: '英语', label: '英语' }, + { value: '物理', label: '物理' }, + { value: '化学', label: '化学' }, + { value: '生物', label: '生物' }, + { value: '政治', label: '政治' }, + { value: '历史', label: '历史' }, + { value: '地理', label: '地理' }, + { value: '计算机', label: '计算机' }, +]; + +/** 课堂回访跟进方式 */ +export const FOLLOW_UP_METHOD_OPTIONS = [ + { value: '电话', label: '电话' }, + { value: '微信', label: '微信' }, + { value: '面谈', label: '面谈' }, + { value: '上门', label: '上门' }, + { value: '其他', label: '其他' }, +]; + +/** 学生基本信息:性别 */ +export const GENDER_OPTIONS = [ + { value: '男', label: '男' }, + { value: '女', label: '女' }, +]; + +/** 学生基本信息:年级 */ +export const GRADE_OPTIONS = [ + { value: '高三', label: '高三' }, + { value: '复读', label: '复读' }, + { value: '应届', label: '应届' }, +]; + +/** 学生基本信息:选科方向 */ +export const SUBJECT_DIRECTION_OPTIONS = [ + { value: '物理类', label: '物理类' }, + { value: '历史类', label: '历史类' }, + { value: '艺术类', label: '艺术类' }, + { value: '体育类', label: '体育类' }, +];