mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-30 20:55:42 +00:00 
			
		
		
		
	Remove quick actions (#9222)
* Remove placeholder components - No function - Cleanup for 1.0.0 * Remove Placeholder.tsx
This commit is contained in:
		| @@ -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> | ||||
|   ); | ||||
| } | ||||
| @@ -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} | ||||
|   | ||||
| @@ -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', | ||||
|   | ||||
		Reference in New Issue
	
	Block a user