Skip to content

Commit

Permalink
Show techniques in dataset table
Browse files Browse the repository at this point in the history
  • Loading branch information
apdavison committed Mar 6, 2024
1 parent 11144eb commit eac7e30
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions apps/nar-v3/src/components/DatasetList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ function DatasetList(props) {
<TableHead>
<TableRow>
<TableCell component="th">Name</TableCell>
<TableCell component="th">Techniques</TableCell>
<TableCell component="th">Subjects</TableCell>
<TableCell component="th">Activities</TableCell>
</TableRow>
Expand All @@ -25,6 +26,7 @@ function DatasetList(props) {
{dataset.fullName || dataset.isVersionOf.fullName}
</RouterLink>
</TableCell>
<TableCell>{dataset.technique.join(", ")}</TableCell>
<TableCell>{dataset.studiedSpecimen.length}</TableCell>
<TableCell>{dataset.activities.length}</TableCell>
</TableRow>
Expand Down
1 change: 1 addition & 0 deletions apps/nar-v3/src/routes/dataset.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ const query = buildKGQuery("core/DatasetVersion", [
L("ethicsAssessment/name"),
L("license/shortName"),
S("releaseDate"),
L("technique/name", [], MULTIPLE),
L("custodian", actorQuery, MULTIPLE),
L("author", actorQuery, MULTIPLE),
R("isVersionOf", "hasVersion", [
Expand Down
5 changes: 4 additions & 1 deletion apps/nar-v3/src/routes/datasets.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import Navigation from "../components/Navigation";
import DatasetList from "../components/DatasetList";
import ProgressIndicator from "../components/ProgressIndicator";

const MULTIPLE = { expectSingle: false };

const query = buildKGQuery("core/DatasetVersion", [
S("@id"),
S("fullName"),
Expand All @@ -21,8 +23,9 @@ const query = buildKGQuery("core/DatasetVersion", [
R("isVersionOf", "hasVersion", [S("fullName"), S("description"), S("shortName")]),
L("accessibility/name", [], { filter: "free access", required: true }),
L("experimentalApproach/name", [], { filter: "electrophysiology", required: true }),
L("technique/name", [], MULTIPLE),
L("studiedSpecimen", [S("lookupLabel")], { type: "core/Subject", expectSingle: false }),
R("activities", "isPartOf", [S("@id"), S("@type")], { expectSingle: false }),
R("activities", "isPartOf", [S("@id"), S("@type")], MULTIPLE),
]);

export async function loader() {
Expand Down

0 comments on commit eac7e30

Please sign in to comment.