Skip to content

Commit

Permalink
add creation action type
Browse files Browse the repository at this point in the history
  • Loading branch information
austenem committed Sep 26, 2024
1 parent 167b193 commit 02ebae5
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export type ProcessedDatasetDetails = ProcessedDatasetInfo &
| 'metadata'
| 'protocol_url' // TODO: This is present for non-dataset entities, but not for datasets.
| 'dataset_type'
| 'creation_action'
| 'mapped_consortium'
>;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,24 @@
import { CreationAction } from 'js/components/types';
import { renderHook } from 'test-utils/functions';
import { useSortedSearchHits, createdByCentralProcess, datasetIsPublished } from './hooks';

const testDatasets = [
const testDatasets: {
_id: string;
_index: string;
_score: number;
_source: {
assay_display_name: string[];
created_timestamp: number;
creation_action: CreationAction;
entity_type: string;
hubmap_id: string;
pipeline: string;
status: string;
uuid: string;
visualization: boolean;
};
_type: string;
}[] = [
{
_id: 'c1fc38a4a6139a4830b8b2aec7227a8e',
_index: 'hm_prod_consortium_portal',
Expand Down
9 changes: 9 additions & 0 deletions context/app/static/js/components/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,14 @@ export interface Sample extends Entity {
origin_samples: Sample[];
}

export type CreationAction =
| 'Create Dataset Activity'
| 'Central Process'
| 'Multi-Assay Split'
| 'Lab Process'
| 'Create Publication Activity'
| 'External Process';

export interface Dataset extends Entity {
entity_type: 'Dataset';
processing: 'raw' | 'processed';
Expand All @@ -93,6 +101,7 @@ export interface Dataset extends Entity {
assay_modality: 'single' | 'multiple';
donor: Donor;
mapped_data_access_level: 'Public' | 'Protected' | 'Consortium';
creation_action: CreationAction;
origin_samples: Sample[];
origin_samples_unique_mapped_organs: string[];
mapped_data_types: string[];
Expand Down

0 comments on commit 02ebae5

Please sign in to comment.