+
{title}
diff --git a/frontend/packages/data-portal/app/constants/filterQueryParams.ts b/frontend/packages/data-portal/app/constants/filterQueryParams.ts
index 9117747e1..186fadec8 100644
--- a/frontend/packages/data-portal/app/constants/filterQueryParams.ts
+++ b/frontend/packages/data-portal/app/constants/filterQueryParams.ts
@@ -1,12 +1,10 @@
import { QueryParams } from './query'
-export const DATASET_FILTERS = [
+const COMMON_DATASET_FILTERS = [
QueryParams.GroundTruthAnnotation,
QueryParams.AvailableFiles,
QueryParams.NumberOfRuns,
QueryParams.DatasetId,
- QueryParams.EmpiarId,
- QueryParams.EmdbId,
QueryParams.AuthorName,
QueryParams.AuthorOrcid,
QueryParams.Organism,
@@ -20,6 +18,13 @@ export const DATASET_FILTERS = [
QueryParams.ObjectShapeType,
] as const
+export const DATASET_FILTERS = [
+ ...COMMON_DATASET_FILTERS,
+ QueryParams.EmpiarId,
+ QueryParams.EmdbId,
+ QueryParams.DepositionId,
+] as const
+
export const RUN_FILTERS = [
QueryParams.GroundTruthAnnotation,
QueryParams.QualityScore,
@@ -27,6 +32,7 @@ export const RUN_FILTERS = [
QueryParams.TiltRangeMax,
QueryParams.ObjectName,
QueryParams.ObjectShapeType,
+ QueryParams.DepositionId,
] as const
export const ANNOTATION_FILTERS = [
@@ -38,3 +44,8 @@ export const ANNOTATION_FILTERS = [
QueryParams.MethodType,
QueryParams.AnnotationSoftware,
] as const
+
+export const DEPOSITION_FILTERS = [
+ ...COMMON_DATASET_FILTERS,
+ QueryParams.ObjectId,
+] as const
diff --git a/frontend/packages/data-portal/app/constants/query.ts b/frontend/packages/data-portal/app/constants/query.ts
index 1e4d85f88..fb303ce0d 100644
--- a/frontend/packages/data-portal/app/constants/query.ts
+++ b/frontend/packages/data-portal/app/constants/query.ts
@@ -1,12 +1,13 @@
export enum QueryParams {
AnnotationId = 'annotation_id',
- AnnotationsPage = 'annotations-page',
AnnotationSoftware = 'annotation-software',
+ AnnotationsPage = 'annotations-page',
AuthorName = 'author',
AuthorOrcid = 'author_orcid',
AvailableFiles = 'files',
CameraManufacturer = 'camera_manufacturer',
DatasetId = 'dataset_id',
+ DepositionId = 'deposition-id',
DownloadConfig = 'download-config',
DownloadStep = 'download-step',
DownloadTab = 'download-tab',
diff --git a/frontend/packages/data-portal/app/graphql/getDatasetById.server.ts b/frontend/packages/data-portal/app/graphql/getDatasetById.server.ts
index 8b789f5f4..9b40d3556 100644
--- a/frontend/packages/data-portal/app/graphql/getDatasetById.server.ts
+++ b/frontend/packages/data-portal/app/graphql/getDatasetById.server.ts
@@ -16,6 +16,7 @@ const GET_DATASET_BY_ID = gql(`
$run_limit: Int,
$run_offset: Int,
$filter: runs_bool_exp,
+ $deposition_id: Int,
) {
datasets(where: { id: { _eq: $id } }) {
s3_prefix
@@ -149,6 +150,11 @@ const GET_DATASET_BY_ID = gql(`
}
}
}
+
+ deposition: datasets(where: { id: { _eq: $deposition_id } }) {
+ id
+ title
+ }
}
`)
@@ -221,11 +227,13 @@ function getFilter(filterState: FilterState) {
export async function getDatasetById({
client,
+ depositionId = -1,
id,
page = 1,
params = new URLSearchParams(),
}: {
client: ApolloClient