Skip to content

Commit

Permalink
Merge pull request #48381 from Shahidullah-Muffakir/fix/47818
Browse files Browse the repository at this point in the history
Disable Required Toggle When No Subtags Are Enabled
  • Loading branch information
puneetlath authored Sep 4, 2024
2 parents f890c73 + ec5e76e commit d67d3d0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/pages/workspace/tags/WorkspaceViewTagsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,10 @@ function WorkspaceViewTagsPage({route}: WorkspaceViewTagsProps) {
);
};

if (!!currentPolicyTag?.required && !Object.values(currentPolicyTag?.tags ?? {}).some((tag) => tag.enabled)) {
Tag.setPolicyTagsRequired(policyID, false, route.params.orderWeight);
}

const navigateToEditTag = () => {
Navigation.navigate(ROUTES.WORKSPACE_EDIT_TAGS.getRoute(route.params.policyID, currentPolicyTag?.orderWeight));
};
Expand Down

0 comments on commit d67d3d0

Please sign in to comment.