Move CurrencyTable to admin center (#6484)

This commit is contained in:
Oliver 2024-02-15 01:49:24 +11:00 committed by GitHub
parent 0e1923a90c
commit 5ca007a184
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 13 additions and 5 deletions

View File

@ -1,6 +1,7 @@
import { Trans, t } from '@lingui/macro';
import { Divider, Paper, SimpleGrid, Stack, Text, Title } from '@mantine/core';
import {
IconCoins,
IconCpu,
IconDevicesPc,
IconExclamationCircle,
@ -50,6 +51,10 @@ const PartParameterTemplateTable = Loadable(
lazy(() => import('../../../../tables/part/PartParameterTemplateTable'))
);
const CurrencyTable = Loadable(
lazy(() => import('../../../../tables/settings/CurrencyTable'))
);
export default function AdminCenter() {
const adminCenterPanels: PanelType[] = useMemo(() => {
return [
@ -71,6 +76,12 @@ export default function AdminCenter() {
icon: <IconExclamationCircle />,
content: <ErrorReportTable />
},
{
name: 'currencies',
label: t`Currencies`,
icon: <IconCoins />,
content: <CurrencyTable />
},
{
name: 'projectcodes',
label: t`Project Codes`,

View File

@ -1,5 +1,5 @@
import { Trans, t } from '@lingui/macro';
import { Divider, Stack } from '@mantine/core';
import { Stack } from '@mantine/core';
import {
IconBellCog,
IconCategory,
@ -24,7 +24,6 @@ import { PanelGroup, PanelType } from '../../../components/nav/PanelGroup';
import { SettingsHeader } from '../../../components/nav/SettingsHeader';
import { GlobalSettingList } from '../../../components/settings/SettingList';
import { useServerApiState } from '../../../states/ApiState';
import { CurrencyTable } from '../../../tables/settings/CurrencyTable';
/**
* System settings page
@ -134,8 +133,6 @@ export default function SystemSettings() {
keys={['CURRENCY_UPDATE_PLUGIN', 'CURRENCY_UPDATE_INTERVAL']}
/>
<StylishText size="xl">{t`Exchange Rates`}</StylishText>
<Divider />
<CurrencyTable />
</>
)
},

View File

@ -13,7 +13,7 @@ import { InvenTreeTable } from '../InvenTreeTable';
/*
* Table for displaying available currencies
*/
export function CurrencyTable() {
export default function CurrencyTable() {
const table = useTable('currency');
const columns = useMemo(() => {