Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hide ogranization settings and fix tag button color inheritance #46

Merged
merged 1 commit into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Box from "@mui/material/Box";
import DeleteOrganization from "components/DeleteOrganization";
import OrganizationInfoSetting from "components/OrganizationInfoSetting";
import { useIsAllowed } from "hooks/useAllowedActions";

Expand All @@ -11,7 +10,8 @@ const OrganizationSettings = () => {
<Box mb={isDeleteOrganizationAllowed ? 2 : 0}>
<OrganizationInfoSetting />
</Box>
{isDeleteOrganizationAllowed && <DeleteOrganization />}
{/* MTP_TODO: disabled to meet BDR requirements */}
{/* {isDeleteOrganizationAllowed && <DeleteOrganization />} */}
</>
);
};
Expand Down
17 changes: 9 additions & 8 deletions ngui/ui/src/components/SideModalManager/SideModals/PoolModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ import PoolSummary from "components/PoolSummary";
import TabsWrapper from "components/TabsWrapper";
import PoolAssignmentRulesContainer from "containers/PoolAssignmentRulesContainer";
import PoolConstraintsContainer from "containers/PoolConstraintsContainer";
import ShareSettingsContainer from "containers/ShareSettingsContainer";
import PoolsService from "services/PoolsService";
import { EDIT_POOL_TAB_QUERY } from "urls";
import BaseSideModal from "./BaseSideModal";

export const POOL_TABS = Object.freeze({
GENERAL: "general",
SHARE: "share",
CONSTRAINTS: "constraints",
ASSIGNMENT_RULES: "assignmentRules"
// MTP_TODO: disabled to meet BDR requirements
// SHARE: "share"
});

const Pool = ({ onSuccess, id }) => {
Expand All @@ -26,7 +26,7 @@ const Pool = ({ onSuccess, id }) => {
const parentPool = allPools.find(({ id: poolId }) => poolId === pool.parent_id) ?? {};
const childPools = allPools.filter(({ parent_id: parentId }) => parentId === pool.id);

const { id: poolId, name: poolName, purpose: poolPurpose, expenses_export_link: initialLink } = pool;
const { id: poolId } = pool;

const tabs = [
{
Expand All @@ -43,12 +43,13 @@ const Pool = ({ onSuccess, id }) => {
title: POOL_TABS.ASSIGNMENT_RULES,
dataTestId: "tab_assignment",
node: <PoolAssignmentRulesContainer poolId={poolId} />
},
{
title: POOL_TABS.SHARE,
dataTestId: "tab_share",
node: <ShareSettingsContainer poolId={poolId} poolName={poolName} poolPurpose={poolPurpose} initialLink={initialLink} />
}
// MTP_TODO: disabled to meet BDR requirements
// {
// title: POOL_TABS.SHARE,
// dataTestId: "tab_share",
// node: <ShareSettingsContainer poolId={poolId} poolName={poolName} poolPurpose={poolPurpose} initialLink={initialLink} />
// }
];
return (
<TabsWrapper
Expand Down
45 changes: 22 additions & 23 deletions ngui/ui/src/pages/Settings/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ import OrganizationSettings from "components/OrganizationSettings";
import PageContentWrapper from "components/PageContentWrapper";
import TabsWrapper from "components/TabsWrapper";
import InvitationsContainer from "containers/InvitationsContainer";
import ModeContainer from "containers/ModeContainer";
import SshSettingsContainer from "containers/SshSettingsContainer";
import { useIsOptScaleModeEnabled } from "hooks/useIsOptScaleModeEnabled";
import { OPTSCALE_MODE } from "utils/constants";

const actionBarDefinition = {
title: {
Expand All @@ -17,13 +13,15 @@ const actionBarDefinition = {

export const SETTINGS_TABS = Object.freeze({
ORGANIZATION: "organization",
INVITATIONS: "invitations",
MODE: "mode",
SSH: "sshKeys"
INVITATIONS: "invitations"
// MTP_TODO: disabled to meet BDR requirements
// MODE: "mode",
// SSH: "sshKeys"
});

const Settings = () => {
const isFinOpsModeEnabled = useIsOptScaleModeEnabled(OPTSCALE_MODE.FINOPS);
// MTP_TODO: disabled to meet BDR requirements
// const isFinOpsModeEnabled = useIsOptScaleModeEnabled(OPTSCALE_MODE.FINOPS);

const tabs = [
{
Expand All @@ -35,21 +33,22 @@ const Settings = () => {
title: SETTINGS_TABS.INVITATIONS,
dataTestId: `tab_${SETTINGS_TABS.INVITATIONS}`,
node: <InvitationsContainer />
},
{
title: SETTINGS_TABS.MODE,
dataTestId: `tab_${SETTINGS_TABS.MODE}`,
node: <ModeContainer />
},
...(isFinOpsModeEnabled
? [
{
title: SETTINGS_TABS.SSH,
dataTestId: `tab_${SETTINGS_TABS.SSH}`,
node: <SshSettingsContainer />
}
]
: [])
}
// MTP_TODO: disabled to meet BDR requirements
// {
// title: SETTINGS_TABS.MODE,
// dataTestId: `tab_${SETTINGS_TABS.MODE}`,
// node: <ModeContainer />
// },
// ...(isFinOpsModeEnabled
// ? [
// {
// title: SETTINGS_TABS.SSH,
// dataTestId: `tab_${SETTINGS_TABS.SSH}`,
// node: <SshSettingsContainer />
// }
// ]
// : [])
];

return (
Expand Down
1 change: 0 additions & 1 deletion ngui/ui/src/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,6 @@ const getThemeConfig = (settings = {}) => {
root: {
borderRadius: "4px",
"& .MuiChip-label > .MuiTypography-root": {
color: MPT_BRAND_WHITE,
fontSize: "13px"
}
}
Expand Down
Loading