diff --git a/src/Components/DataPoints/DataPoints.jsx b/src/Components/DataPoints/DataPoints.jsx index 8061f68..e37d409 100644 --- a/src/Components/DataPoints/DataPoints.jsx +++ b/src/Components/DataPoints/DataPoints.jsx @@ -27,9 +27,9 @@ export async function loader() { programs = Object.values(programs).flat().filter(program => program.Applicants.length > 0); const recordIDs = programs.map(program => program.Applicants.map(applicant => applicant + "|" + program.ProgramID)).flat(); let records = Object.values(await getRecordByRecordIDs(recordIDs)); - programs = programs.map(program => program.ProgramID); + const programIDs = programs.map(program => program.ProgramID); records = records.sort((a, b) => { - return programs.indexOf(a.ProgramID) - programs.indexOf(b.ProgramID); + return programIDs.indexOf(a.ProgramID) - programIDs.indexOf(b.ProgramID); }); return {records}; } diff --git a/src/Components/Profile/ProfileApplicant/ProfileApplicantPage.jsx b/src/Components/Profile/ProfileApplicant/ProfileApplicantPage.jsx index d83bca3..c337fa3 100644 --- a/src/Components/Profile/ProfileApplicant/ProfileApplicantPage.jsx +++ b/src/Components/Profile/ProfileApplicant/ProfileApplicantPage.jsx @@ -7,7 +7,7 @@ import { ListItemIcon, ListItemText, TextField, Paper, Slider, styled, Typography, Divider, Tooltip, Input, ButtonGroup, } from "@mui/material"; -import {Add, Delete, Edit, Refresh} from "@mui/icons-material"; +import {Add, Delete, Download, Edit, Refresh} from "@mui/icons-material"; import "./ProfileApplicantPage.css"; import {Link} from 'react-router-dom'; import { @@ -338,32 +338,47 @@ function BasicInfoBlock({avatarUrl, contact, applicant, records, editable}) { editable={editable && isAuth}/> - + 联系方式: - - {Object.entries(contact).length ? Object.entries(contact).map(([key, value]) => { - const Icon = contactIcons[key]; - if (value === "") { - return null; - } - return ( - - { - await navigator.clipboard.writeText(value) - alert(`已复制${value}到剪贴板!`) - }} - > - {["QQ", "WeChat"].includes(key) ? : - } - - - ) - }) : "暂无"} - + {Object.entries(contact).length ? + + {Object.entries(contact).map(([key, value]) => { + const Icon = contactIcons[key]; + if (value === "") { + return null; + } + return ( + + { + await navigator.clipboard.writeText(value) + alert(`已复制${value}到剪贴板!`) + }} + > + {["QQ", "WeChat"].includes(key) ? + : + } + + + ) + })} + : "暂无"} + {/**/} + {/* */} + {/* 申请材料:*/} + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + {/**/} 最终去向: