(_index, row)
| 247 | }; |
| 248 | |
| 249 | const renderRow = (_index, row) => { |
| 250 | if (row.type === "group") { |
| 251 | return ( |
| 252 | <td className="rt-group-cell" colSpan={columns.length}> |
| 253 | <span className="rt-group-name">{row.programID}</span> |
| 254 | <Tooltip title="添加申请记录" arrow> |
| 255 | <IconButton |
| 256 | size="small" |
| 257 | aria-label="添加申请记录" |
| 258 | className="rt-group-add" |
| 259 | onClick={() => navigate(`/profile/new-record`, {state: {programID: row.programID, from: location.pathname}})} |
| 260 | > |
| 261 | <ControlPoint sx={{fontSize: "0.95rem"}}/> |
| 262 | </IconButton> |
| 263 | </Tooltip> |
| 264 | <span className="rt-group-count">{row.count}</span> |
| 265 | </td> |
| 266 | ); |
| 267 | } |
| 268 | const r = row.record; |
| 269 | return columns.map((col) => ( |
| 270 | <td key={col.key} className="rt-td" style={{width: col.width, minWidth: col.width, textAlign: col.align}}> |
| 271 | {renderCell(col.key, r)} |
| 272 | </td> |
| 273 | )); |
| 274 | }; |
| 275 | |
| 276 | const renderCell = (key, r) => { |
| 277 | switch (key) { |
nothing calls this directly
no test coverage detected