Skip to content

Commit

Permalink
feat: add basic atlas tasks column (#232) (#244)
Browse files Browse the repository at this point in the history
* feat: add basic atlas tasks column (#232)

* feat: make atlas status column thinner (#232)
  • Loading branch information
hunterckx authored May 29, 2024
1 parent 2bacc58 commit 240ac19
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,19 @@ export const buildTaskBioNetworks = (
};
};

/**
* Build props for the task counts cell component.
* @param atlas - Atlas entity.
* @returns Props to be used for the cell.
*/
export const buildTaskCounts = (
atlas: HCAAtlasTrackerListAtlas
): React.ComponentProps<typeof C.Cell> => {
return {
value: `${atlas.completedTaskCount}/${atlas.taskCount}`,
};
};

/**
* Build props for the Cell component.
* @param task - Task entity.
Expand Down
1 change: 1 addition & 0 deletions site-config/hca-atlas-tracker/category.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export const HCA_ATLAS_TRACKER_CATEGORY_LABEL = {
SOURCE_DATASET_COUNT: "Source Datasets",
SYSTEM: "System",
TARGET_COMPLETION_DATE: "Target Completion",
TASK_COUNTS: "Tasks",
TASK_STATUS: "Status",
TISSUE: "Tissue",
TITLE: "Title",
Expand Down
10 changes: 9 additions & 1 deletion site-config/hca-atlas-tracker/local/index/atlasEntityConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,15 @@ export const atlasEntityConfig: EntityConfig = {
} as ComponentConfig<typeof C.StatusBadge, HCAAtlasTrackerListAtlas>,
header: HCA_ATLAS_TRACKER_CATEGORY_LABEL.PUBLICATION_STATUS,
id: HCA_ATLAS_TRACKER_CATEGORY_KEY.PUBLICATION_STATUS,
width: { max: "1fr", min: "136px" },
width: { max: "0.5fr", min: "68px" },
},
{
componentConfig: {
component: C.Cell,
viewBuilder: V.buildTaskCounts,
} as ComponentConfig<typeof C.Cell, HCAAtlasTrackerListAtlas>,
header: HCA_ATLAS_TRACKER_CATEGORY_LABEL.TASK_COUNTS,
width: { max: "0.5fr", min: "68px" },
},
{
componentConfig: {
Expand Down

0 comments on commit 240ac19

Please sign in to comment.