MCPcopy Create free account
hub / github.com/OpenSIST/OpenSIST.github.io / renderCell

Function renderCell

src/Components/DataPoints/RecordTable.jsx:276–299  ·  view source on GitHub ↗
(key, r)

Source from the content-addressed store, hash-verified

274 };
275
276 const renderCell = (key, r) => {
277 switch (key) {
278 case "applicant":
279 return <Chip label={r.ApplicantID} colors={chip.link} title="查看申请人信息"
280 onClick={() => navigate(applicantDialogPath(location.pathname, r.ApplicantID))}/>;
281 case "program":
282 return <Chip label={r.ProgramID} colors={chip.link} title="查看项目描述"
283 onClick={() => navigate(dataPointsProgramPath(r.ProgramID))}/>;
284 case "status":
285 return <Chip label={r.Status} colors={chip.status[r.Status]}/>;
286 case "final":
287 return r.Final ? <Check className="rt-final" fontSize="small"/> : null;
288 case "season":
289 return <Chip label={`${r.ProgramYear}${r.Semester}`} colors={chip.semester[r.Semester]}/>;
290 case "decision":
291 case "interview":
292 case "submit":
293 return <span className="rt-date">{dateText(r.TimeLine?.[TIMELINE_KEY[key]])}</span>;
294 case "detail":
295 return <span className="rt-detail">{r.Detail}</span>;
296 default:
297 return null;
298 }
299 };
300
301 return (
302 <div className="rt-container" style={{...cssVars, ...style}}>

Callers 1

renderRowFunction · 0.85

Calls 3

applicantDialogPathFunction · 0.90
dataPointsProgramPathFunction · 0.90
dateTextFunction · 0.85

Tested by

no test coverage detected