Skip to content

Commit

Permalink
[Upd 79] Records in record table are now links
Browse files Browse the repository at this point in the history
  • Loading branch information
LaChope committed Mar 26, 2024
1 parent 1bc4b96 commit a0c00fb
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/components/record/RecordRow.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import { RECORD_PHASE, ROLE } from "../../constants/DefaultConstants";
import { useI18n } from "../../hooks/useI18n";
import { IfGranted } from "react-authorization";
import PromiseTrackingMask from "../misc/PromiseTrackingMask";
import Routes from "../../constants/RoutesConstants.js";
import { Link } from "react-router-dom";

const StatusInfo = {};
StatusInfo[RECORD_PHASE.OPEN] = {
Expand Down Expand Up @@ -41,15 +43,11 @@ let RecordRow = (props) => {
<tr className="position-relative">
<IfGranted expected={ROLE.ADMIN} actual={props.currentUser.role}>
<td className="report-row">
<Button variant="link" size="sm" onClick={() => props.onEdit(record)}>
{record.key}
</Button>
<Link to={Routes.records.path + "/" + record.key}>{record.key}</Link>
</td>
</IfGranted>
<td className="report-row">
<Button variant="link" size="sm" onClick={() => props.onEdit(record)}>
{record.localName}
</Button>
<Link to={Routes.records.path + "/" + record.key}>{record.localName}</Link>
</td>
<IfGranted expected={ROLE.ADMIN} actual={props.currentUser.role}>
<td className="report-row">{record.institution.name}</td>
Expand Down

0 comments on commit a0c00fb

Please sign in to comment.