2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-28 11:36:44 +00:00

Remove quick actions (#9222)

* Remove placeholder components

- No function
- Cleanup for 1.0.0

* Remove Placeholder.tsx
This commit is contained in:
Oliver 2025-03-04 17:54:36 +11:00 committed by GitHub
parent 8cee2e36ca
commit 8bca48dbdd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 15 additions and 72 deletions

View File

@ -1,38 +0,0 @@
import { Trans, t } from '@lingui/macro';
import { Alert, Badge, Stack, Text, Tooltip } from '@mantine/core';
import { IconInfoCircle } from '@tabler/icons-react';
/**
* Small badge to indicate that a feature is a placeholder.
*/
export function PlaceholderPill() {
return (
<Tooltip
multiline
w={220}
withArrow
label={t`This feature/button/site is a placeholder for a feature that is not implemented, only partial or intended for testing.`}
>
<Badge color='teal' variant='outline'>
<Trans>PLH</Trans>
</Badge>
</Tooltip>
);
}
/**
* Placeholder panel for use in a PanelGroup.
*/
export function PlaceholderPanel() {
return (
<Stack>
<Alert
color='teal'
title={t`This panel is a placeholder.`}
icon={<IconInfoCircle />}
>
<Text c='gray'>This panel has not yet been implemented</Text>
</Alert>
</Stack>
);
}

View File

@ -1,5 +1,5 @@
import { Trans, t } from '@lingui/macro';
import { Paper, SimpleGrid, Skeleton, Stack, Text, Title } from '@mantine/core';
import { t } from '@lingui/macro';
import { Stack } from '@mantine/core';
import {
IconClipboardCheck,
IconCoins,
@ -21,7 +21,6 @@ import {
import { lazy, useMemo } from 'react';
import PermissionDenied from '../../../../components/errors/PermissionDenied';
import { PlaceholderPill } from '../../../../components/items/Placeholder';
import PageTitle from '../../../../components/nav/PageTitle';
import { SettingsHeader } from '../../../../components/nav/SettingsHeader';
import type { PanelType } from '../../../../components/panels/Panel';
@ -215,33 +214,6 @@ export default function AdminCenter() {
];
}, []);
const QuickAction = () => (
<Stack gap={'xs'} ml={'sm'}>
<Title order={5}>
<Trans>Quick Actions</Trans>
</Title>
<SimpleGrid cols={3}>
<Paper shadow='xs' p='sm' withBorder>
<Text>
<Trans>Add a new user</Trans>
</Text>
</Paper>
<Paper shadow='xs' p='sm' withBorder>
<PlaceholderPill />
</Paper>
<Paper shadow='xs' p='sm' withBorder>
<PlaceholderPill />
</Paper>
</SimpleGrid>
</Stack>
);
if (!user.isLoggedIn()) {
return <Skeleton />;
}
return (
<>
<PageTitle title={t`Admin Center`} />
@ -252,7 +224,6 @@ export default function AdminCenter() {
title={t`Admin Center`}
subtitle={t`Advanced Options`}
/>
<QuickAction />
<PanelGroup
pageKey='admin-center'
panels={adminCenterPanels}

View File

@ -1,11 +1,12 @@
import { t } from '@lingui/macro';
import { Skeleton, Stack } from '@mantine/core';
import { Alert, Skeleton, Stack, Text } from '@mantine/core';
import {
IconBellCog,
IconCategory,
IconCurrencyDollar,
IconFileAnalytics,
IconFingerprint,
IconInfoCircle,
IconPackages,
IconQrcode,
IconServerCog,
@ -18,7 +19,6 @@ import {
import { useMemo } from 'react';
import PermissionDenied from '../../../components/errors/PermissionDenied';
import { PlaceholderPanel } from '../../../components/items/Placeholder';
import PageTitle from '../../../components/nav/PageTitle';
import { SettingsHeader } from '../../../components/nav/SettingsHeader';
import type { PanelType } from '../../../components/panels/Panel';
@ -110,7 +110,17 @@ export default function SystemSettings() {
name: 'notifications',
label: t`Notifications`,
icon: <IconBellCog />,
content: <PlaceholderPanel />
content: (
<Stack>
<Alert
color='teal'
title={t`This panel is a placeholder.`}
icon={<IconInfoCircle />}
>
<Text c='gray'>This panel has not yet been implemented</Text>
</Alert>
</Stack>
)
},
{
name: 'pricing',