Skip to content

Commit

Permalink
fix(workspace-settings-page): remove unnecessary workspace settings
Browse files Browse the repository at this point in the history
  • Loading branch information
sijav committed Oct 14, 2024
1 parent b3a3fe4 commit 8e4536b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 71 deletions.
13 changes: 3 additions & 10 deletions src/locales/de-DE/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,6 @@ msgstr ""
#: src/pages/panel/inventory-search/inventory-form/InventoryFormAccount.tsx:57
#: src/pages/panel/inventory-search/inventory-form/utils/getAutoCompleteFromKey.tsx:125
#: src/pages/panel/inventory-search/InventoryTable.error.tsx:73
#: src/pages/panel/workspace-settings/WorkspaceSettingsPage.tsx:57
#: src/shared/language-button/LanguageButton.stories.tsx:20
msgid "Accounts"
msgstr "Konten"
Expand Down Expand Up @@ -402,7 +401,7 @@ msgstr ""
msgid "Age"
msgstr "Alter"

#: src/pages/panel/workspace-settings/WorkspaceSettingsPage.tsx:36
#: src/pages/panel/workspace-settings/WorkspaceSettingsPage.tsx:30
msgid "Alerting Settings"
msgstr "Benachrichtigungseinstellungen"

Expand Down Expand Up @@ -609,7 +608,6 @@ msgid "Benchmarks"
msgstr "Benchmarks"

#: src/pages/panel/workspace-settings-billing/WorkspaceSettingsBillingPage.tsx:51
#: src/pages/panel/workspace-settings/WorkspaceSettingsPage.tsx:80
#: src/shared/layouts/panel-layout/useBreadcrumbs.ts:21
#: src/shared/layouts/panel-layout/UserButton.tsx:48
msgid "Billing"
Expand Down Expand Up @@ -934,7 +932,7 @@ msgstr "Verbinden Sie Teams"
msgid "Connected Accounts"
msgstr "Verbundene Konten"

#: src/pages/panel/workspace-settings/WorkspaceSettingsPage.tsx:29
#: src/pages/panel/workspace-settings/WorkspaceSettingsPage.tsx:23
msgid "Connected Services"
msgstr "Vernetzte Dienste"

Expand Down Expand Up @@ -2073,10 +2071,6 @@ msgstr "Verwaiste Volumes"
msgid "Other {0} accounts"
msgstr ""

#: src/pages/panel/workspace-settings/WorkspaceSettingsPage.tsx:45
msgid "Other Workspace Settings"
msgstr "Andere Arbeitsbereichseinstellungen"

#: src/pages/panel/inventory-old/InventoryInfoResourcesPerAccountTimeline.tsx:139
#: src/pages/panel/inventory-old/InventoryInfoResourcesPerAccountTimeline.tsx:162
msgid "Others"
Expand Down Expand Up @@ -2915,7 +2909,6 @@ msgid "User Settings Notification"
msgstr "Benachrichtigung über Benutzereinstellungen"

#: src/pages/panel/workspace-settings-external-directory/WorkspaceSettingsExternalDirectoryPage.tsx:27
#: src/pages/panel/workspace-settings/WorkspaceSettingsPage.tsx:68
#: src/shared/layouts/panel-layout/useBreadcrumbs.ts:17
msgid "Users"
msgstr "Benutzer"
Expand Down Expand Up @@ -3035,7 +3028,7 @@ msgstr "Workspace Id"
msgid "Workspace Name"
msgstr "Arbeitsbereichsname"

#: src/pages/panel/workspace-settings/WorkspaceSettingsPage.tsx:20
#: src/pages/panel/workspace-settings/WorkspaceSettingsPage.tsx:14
#: src/shared/layouts/panel-layout/useBreadcrumbs.ts:7
#: src/shared/layouts/panel-layout/UserButton.tsx:33
msgid "Workspace Settings"
Expand Down
13 changes: 3 additions & 10 deletions src/locales/en-US/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,6 @@ msgstr "accounts"
#: src/pages/panel/inventory-search/inventory-form/InventoryFormAccount.tsx:57
#: src/pages/panel/inventory-search/inventory-form/utils/getAutoCompleteFromKey.tsx:125
#: src/pages/panel/inventory-search/InventoryTable.error.tsx:73
#: src/pages/panel/workspace-settings/WorkspaceSettingsPage.tsx:57
#: src/shared/language-button/LanguageButton.stories.tsx:20
msgid "Accounts"
msgstr "Accounts"
Expand Down Expand Up @@ -402,7 +401,7 @@ msgstr "Affected resources"
msgid "Age"
msgstr "Age"

#: src/pages/panel/workspace-settings/WorkspaceSettingsPage.tsx:36
#: src/pages/panel/workspace-settings/WorkspaceSettingsPage.tsx:30
msgid "Alerting Settings"
msgstr "Alerting Settings"

Expand Down Expand Up @@ -609,7 +608,6 @@ msgid "Benchmarks"
msgstr "Benchmarks"

#: src/pages/panel/workspace-settings-billing/WorkspaceSettingsBillingPage.tsx:51
#: src/pages/panel/workspace-settings/WorkspaceSettingsPage.tsx:80
#: src/shared/layouts/panel-layout/useBreadcrumbs.ts:21
#: src/shared/layouts/panel-layout/UserButton.tsx:48
msgid "Billing"
Expand Down Expand Up @@ -934,7 +932,7 @@ msgstr "Connect Teams"
msgid "Connected Accounts"
msgstr "Connected Accounts"

#: src/pages/panel/workspace-settings/WorkspaceSettingsPage.tsx:29
#: src/pages/panel/workspace-settings/WorkspaceSettingsPage.tsx:23
msgid "Connected Services"
msgstr "Connected Services"

Expand Down Expand Up @@ -2073,10 +2071,6 @@ msgstr "Orphaned Volumes"
msgid "Other {0} accounts"
msgstr "Other {0} accounts"

#: src/pages/panel/workspace-settings/WorkspaceSettingsPage.tsx:45
msgid "Other Workspace Settings"
msgstr "Other Workspace Settings"

#: src/pages/panel/inventory-old/InventoryInfoResourcesPerAccountTimeline.tsx:139
#: src/pages/panel/inventory-old/InventoryInfoResourcesPerAccountTimeline.tsx:162
msgid "Others"
Expand Down Expand Up @@ -2915,7 +2909,6 @@ msgid "User Settings Notification"
msgstr "User Settings Notification"

#: src/pages/panel/workspace-settings-external-directory/WorkspaceSettingsExternalDirectoryPage.tsx:27
#: src/pages/panel/workspace-settings/WorkspaceSettingsPage.tsx:68
#: src/shared/layouts/panel-layout/useBreadcrumbs.ts:17
msgid "Users"
msgstr "Users"
Expand Down Expand Up @@ -3035,7 +3028,7 @@ msgstr "Workspace Id"
msgid "Workspace Name"
msgstr "Workspace Name"

#: src/pages/panel/workspace-settings/WorkspaceSettingsPage.tsx:20
#: src/pages/panel/workspace-settings/WorkspaceSettingsPage.tsx:14
#: src/shared/layouts/panel-layout/useBreadcrumbs.ts:7
#: src/shared/layouts/panel-layout/UserButton.tsx:33
msgid "Workspace Settings"
Expand Down
53 changes: 2 additions & 51 deletions src/pages/panel/workspace-settings/WorkspaceSettingsPage.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
import { Trans } from '@lingui/macro'
import CloudIcon from '@mui/icons-material/Cloud'
import PeopleIcon from '@mui/icons-material/People'
import ReceiptIcon from '@mui/icons-material/Receipt'
import { Button, Divider, Stack, Typography } from '@mui/material'
import { useAbsoluteNavigate } from 'src/shared/absolute-navigate'
import { useHasAccountsCheck, usePermissionCheck } from 'src/shared/layouts/panel-layout'
import { Divider, Stack, Typography } from '@mui/material'
import { useHasAccountsCheck } from 'src/shared/layouts/panel-layout'
import { WorkspaceSettingsForm } from './WorkspaceSettingsForm'
import { WorkspaceAlertingSettings } from './workspace-alerting-settings'
import { WorkspaceSettingsConnectedServices } from './workspace-settings-services'

export default function WorkspaceSettingsPage() {
const navigate = useAbsoluteNavigate()
const { doesNotHaveAccount, haveError, paymentOnHold } = useHasAccountsCheck()
const hasReadBillingPermission = usePermissionCheck('readBilling')

return (
<Stack direction="column" spacing={2}>
Expand Down Expand Up @@ -41,49 +35,6 @@ export default function WorkspaceSettingsPage() {
</Stack>
</>
) : null}
<Typography variant="h3">
<Trans>Other Workspace Settings</Trans>
</Typography>
<Stack direction={{ xs: 'column', sm: 'row' }} spacing={1} alignItems="start">
<Button
variant="outlined"
href="workspace-settings/accounts"
onClick={(e) => {
e.preventDefault()
navigate('workspace-settings/accounts')
}}
startIcon={<CloudIcon />}
>
<Trans>Accounts</Trans>
</Button>
<Button
variant="outlined"
href="workspace-settings/users"
onClick={(e) => {
e.preventDefault()
navigate('workspace-settings/users')
}}
startIcon={<PeopleIcon />}
>
<Trans>Users</Trans>
</Button>
{hasReadBillingPermission ? (
<Button
variant="outlined"
href="workspace-settings/billing-receipts"
onClick={(e) => {
e.preventDefault()
navigate('workspace-settings/billing-receipts')
}}
startIcon={<ReceiptIcon />}
>
<Trans>Billing</Trans>
</Button>
) : null}
{/* <Button variant="outlined" onClick={() => navigate('workspace-settings/external-directories')} startIcon={<FolderCopyIcon />}>
<Trans>External Directories</Trans>
</Button> */}
</Stack>
</Stack>
)
}

0 comments on commit 8e4536b

Please sign in to comment.