Skip to content

Commit

Permalink
fix(console): hide org resource scopes tab from 3rd-party app modal (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoyijun authored May 6, 2024
1 parent b4b8015 commit c1c8410
Showing 1 changed file with 21 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,21 +47,28 @@ function ApplicationScopesAssignmentModal({ isOpen, onClose, applicationId }: Pr

const tabs = useMemo(
() =>
Object.values(permissionTabs).map(({ title, key }) => {
const selectedDataCount = scopesAssignment[key].selectedData.length;
Object.values(permissionTabs)
/**
* Hide the organization resource scopes tab since the feature is not ready.
* We don't need the `isDevFeaturesEnabled` flag since the feature will change the UI.
* Todo @xiaoyijun Implement the new organization resource scopes feature. LOG-8823
*/
.filter(({ key }) => key !== ApplicationUserConsentScopeType.OrganizationResourceScopes)
.map(({ title, key }) => {
const selectedDataCount = scopesAssignment[key].selectedData.length;

return (
<TabNavItem
key={key}
isActive={key === activeTab}
onClick={() => {
setActiveTab(key);
}}
>
{`${t(title)}${selectedDataCount ? ` (${selectedDataCount})` : ''}`}
</TabNavItem>
);
}),
return (
<TabNavItem
key={key}
isActive={key === activeTab}
onClick={() => {
setActiveTab(key);
}}
>
{`${t(title)}${selectedDataCount ? ` (${selectedDataCount})` : ''}`}
</TabNavItem>
);
}),
[activeTab, scopesAssignment, setActiveTab, t]
);

Expand Down

0 comments on commit c1c8410

Please sign in to comment.