Skip to content

Commit

Permalink
fix(ui): hide "upgrade" menu item for variant studies or studies with…
Browse files Browse the repository at this point in the history
  • Loading branch information
laurent-laporte-pro authored Jun 11, 2024
1 parent 5555bab commit e4b76f6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion webapp/src/components/App/Singlestudy/NavHeader/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ function NavHeader({
const isLatestVersion = study?.version === latestVersion;
const isManaged = !!study?.managed;
const isArchived = !!study?.archived;
const isVariant = study?.type === "variantstudy";
const hasChildren = childrenTree && childrenTree.children.length > 0;

////////////////////////////////////////////////////////////////
// Event Handlers
Expand Down Expand Up @@ -154,7 +156,7 @@ function NavHeader({
key: "study.upgrade",
icon: UpgradeIcon,
action: () => setOpenUpgradeDialog(true),
condition: !isArchived && !isLatestVersion,
condition: !isArchived && !isLatestVersion && !isVariant && !hasChildren,
},
{
key: "global.export",
Expand Down

0 comments on commit e4b76f6

Please sign in to comment.