mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-30 20:55:42 +00:00 
			
		
		
		
	Move CurrencyTable to admin center (#6484)
This commit is contained in:
		| @@ -1,6 +1,7 @@ | |||||||
| import { Trans, t } from '@lingui/macro'; | import { Trans, t } from '@lingui/macro'; | ||||||
| import { Divider, Paper, SimpleGrid, Stack, Text, Title } from '@mantine/core'; | import { Divider, Paper, SimpleGrid, Stack, Text, Title } from '@mantine/core'; | ||||||
| import { | import { | ||||||
|  |   IconCoins, | ||||||
|   IconCpu, |   IconCpu, | ||||||
|   IconDevicesPc, |   IconDevicesPc, | ||||||
|   IconExclamationCircle, |   IconExclamationCircle, | ||||||
| @@ -50,6 +51,10 @@ const PartParameterTemplateTable = Loadable( | |||||||
|   lazy(() => import('../../../../tables/part/PartParameterTemplateTable')) |   lazy(() => import('../../../../tables/part/PartParameterTemplateTable')) | ||||||
| ); | ); | ||||||
|  |  | ||||||
|  | const CurrencyTable = Loadable( | ||||||
|  |   lazy(() => import('../../../../tables/settings/CurrencyTable')) | ||||||
|  | ); | ||||||
|  |  | ||||||
| export default function AdminCenter() { | export default function AdminCenter() { | ||||||
|   const adminCenterPanels: PanelType[] = useMemo(() => { |   const adminCenterPanels: PanelType[] = useMemo(() => { | ||||||
|     return [ |     return [ | ||||||
| @@ -71,6 +76,12 @@ export default function AdminCenter() { | |||||||
|         icon: <IconExclamationCircle />, |         icon: <IconExclamationCircle />, | ||||||
|         content: <ErrorReportTable /> |         content: <ErrorReportTable /> | ||||||
|       }, |       }, | ||||||
|  |       { | ||||||
|  |         name: 'currencies', | ||||||
|  |         label: t`Currencies`, | ||||||
|  |         icon: <IconCoins />, | ||||||
|  |         content: <CurrencyTable /> | ||||||
|  |       }, | ||||||
|       { |       { | ||||||
|         name: 'projectcodes', |         name: 'projectcodes', | ||||||
|         label: t`Project Codes`, |         label: t`Project Codes`, | ||||||
|   | |||||||
| @@ -1,5 +1,5 @@ | |||||||
| import { Trans, t } from '@lingui/macro'; | import { Trans, t } from '@lingui/macro'; | ||||||
| import { Divider, Stack } from '@mantine/core'; | import { Stack } from '@mantine/core'; | ||||||
| import { | import { | ||||||
|   IconBellCog, |   IconBellCog, | ||||||
|   IconCategory, |   IconCategory, | ||||||
| @@ -24,7 +24,6 @@ import { PanelGroup, PanelType } from '../../../components/nav/PanelGroup'; | |||||||
| import { SettingsHeader } from '../../../components/nav/SettingsHeader'; | import { SettingsHeader } from '../../../components/nav/SettingsHeader'; | ||||||
| import { GlobalSettingList } from '../../../components/settings/SettingList'; | import { GlobalSettingList } from '../../../components/settings/SettingList'; | ||||||
| import { useServerApiState } from '../../../states/ApiState'; | import { useServerApiState } from '../../../states/ApiState'; | ||||||
| import { CurrencyTable } from '../../../tables/settings/CurrencyTable'; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * System settings page |  * System settings page | ||||||
| @@ -134,8 +133,6 @@ export default function SystemSettings() { | |||||||
|               keys={['CURRENCY_UPDATE_PLUGIN', 'CURRENCY_UPDATE_INTERVAL']} |               keys={['CURRENCY_UPDATE_PLUGIN', 'CURRENCY_UPDATE_INTERVAL']} | ||||||
|             /> |             /> | ||||||
|             <StylishText size="xl">{t`Exchange Rates`}</StylishText> |             <StylishText size="xl">{t`Exchange Rates`}</StylishText> | ||||||
|             <Divider /> |  | ||||||
|             <CurrencyTable /> |  | ||||||
|           </> |           </> | ||||||
|         ) |         ) | ||||||
|       }, |       }, | ||||||
|   | |||||||
| @@ -13,7 +13,7 @@ import { InvenTreeTable } from '../InvenTreeTable'; | |||||||
| /* | /* | ||||||
|  * Table for displaying available currencies |  * Table for displaying available currencies | ||||||
|  */ |  */ | ||||||
| export function CurrencyTable() { | export default function CurrencyTable() { | ||||||
|   const table = useTable('currency'); |   const table = useTable('currency'); | ||||||
|  |  | ||||||
|   const columns = useMemo(() => { |   const columns = useMemo(() => { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user