Skip to content

Commit

Permalink
cs/VDA-1639-optional-remove-review-button-overview (#1091)
Browse files Browse the repository at this point in the history
* Test turning off "Review individuals" button on the overview page

* Test turning off "Review individuals" button on the overview page

* Test turning off "Review individuals" button on the overview page

* Fixed logic per PR suggestion
  • Loading branch information
chenchals authored Dec 5, 2024
1 parent c4d31b3 commit 3b056b2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
17 changes: 10 additions & 7 deletions ui/src/overview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export function Overview() {
const backendCohort = useBackendCohort();
const params = useBaseParams();
const exit = useExitAction();
const underlay = useUnderlaySource().underlay;

const [renameTitleDialog, showRenameTitleDialog] = useTextInputDialog();
const [confirmDialog, showConfirmDialog] = useSimpleDialog();
Expand Down Expand Up @@ -150,13 +151,15 @@ export function Overview() {
<DemographicCharts
cohort={backendCohort}
extraControls={
<Button
variant="outlined"
component={RouterLink}
to={absoluteCohortReviewListURL(params, cohort.id)}
>
Review individuals
</Button>
!underlay.uiConfiguration.featureConfig?.disableCohortReview ? (
<Button
variant="outlined"
component={RouterLink}
to={absoluteCohortReviewListURL(params, cohort.id)}
>
Review individuals
</Button>
) : undefined
}
/>
{renameTitleDialog}
Expand Down
1 change: 1 addition & 0 deletions ui/src/underlaysSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export type UIConfiguration = {
};

export type FeatureConfig = {
disableCohortReview?: boolean;
disableExportButton?: boolean;
overrideExportButton?: boolean;
disableFeatureSets?: boolean;
Expand Down
3 changes: 2 additions & 1 deletion underlay/src/main/resources/config/underlay/emerge/ui.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"featureConfig": {
"disableFeatureSets": true
"disableFeatureSets": true,
"disableCohortReview": true
},
"demographicChartConfigs": {
"groupByAttributes": ["gender", "race", "age"],
Expand Down

0 comments on commit 3b056b2

Please sign in to comment.