-
-
-
-
{this.studyResources.component}
+
+
+
+
+
+
{this.studyResources.component}
+
+
+
+
+ Patient and Sample Resources
+
+
+
+
);
}
diff --git a/src/shared/api/urls.ts b/src/shared/api/urls.ts
index b54dd9179ea..771af857233 100644
--- a/src/shared/api/urls.ts
+++ b/src/shared/api/urls.ts
@@ -120,6 +120,15 @@ export function getSampleViewUrl(
studyId: string,
sampleId: string,
navIds?: { patientId: string; studyId: string }[]
+) {
+ return getSampleViewUrlWithPathname(studyId, sampleId, 'patient', navIds);
+}
+
+export function getSampleViewUrlWithPathname(
+ studyId: string,
+ sampleId: string,
+ pathname: string = 'patient',
+ navIds?: { patientId: string; studyId: string }[]
) {
let hash: any = undefined;
if (navIds) {
@@ -127,8 +136,9 @@ export function getSampleViewUrl(
.map(id => `${id.studyId}:${id.patientId}`)
.join(',')}`;
}
- return buildCBioPortalPageUrl('patient', { sampleId, studyId }, hash);
+ return buildCBioPortalPageUrl(pathname, { sampleId, studyId }, hash);
}
+
export function getPatientViewUrl(
studyId: string,
caseId: string,
@@ -140,7 +150,22 @@ export function getPatientViewUrl(
.map(id => `${id.studyId}:${id.patientId}`)
.join(',')}`;
}
- return buildCBioPortalPageUrl('patient', { studyId, caseId }, hash);
+ return getPatientViewUrlWithPathname(studyId, caseId, 'patient', navIds);
+}
+
+export function getPatientViewUrlWithPathname(
+ studyId: string,
+ caseId: string,
+ pathname: string = 'patient',
+ navIds?: { patientId: string; studyId: string }[]
+) {
+ let hash: any = undefined;
+ if (navIds) {
+ hash = `navCaseIds=${navIds
+ .map(id => `${id.studyId}:${id.patientId}`)
+ .join(',')}`;
+ }
+ return buildCBioPortalPageUrl(pathname, { studyId, caseId }, hash);
}
export function getComparisonUrl(params: Partial
) {
diff --git a/src/shared/components/resources/ResourceTable.tsx b/src/shared/components/resources/ResourceTable.tsx
index 2939bb7c33d..53e20061e9a 100644
--- a/src/shared/components/resources/ResourceTable.tsx
+++ b/src/shared/components/resources/ResourceTable.tsx
@@ -58,38 +58,48 @@ const ResourceTable = observer(
Resource |
|
- Description |
+ {resourceTable.data.length > 0 && Description | }
- {resourceTable.data.map(resource => (
+ {resourceTable.data.length === 0 ? (
-
- openResource(resource)}>
- {icon(resource)}
- {resource.resourceDefinition.displayName ||
- resource.url}
-
+ |
+ There are no results
|
-
-
-
- Open in new window
-
- |
- {resource.resourceDefinition.description} |
- ))}
+ ) : (
+ resourceTable.data.map(resource => (
+
+
+ openResource(resource)}>
+ {icon(resource)}
+ {resource.resourceDefinition
+ .displayName || resource.url}
+
+ |
+
+
+
+ Open in new window
+
+ |
+
+ {resource.resourceDefinition.description}
+ |
+
+ ))
+ )}
);