[PUI] Placeholder panels (#7850)

* Remove unused import

* Add "homepage" settings for user

Note: These will be replaced with "dashboard" settings in the future
This commit is contained in:
Oliver 2024-08-10 11:55:47 +10:00 committed by GitHub
parent 42183a3a3f
commit 7a97ecfc3d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 31 additions and 3 deletions

View File

@ -136,6 +136,10 @@ export function SettingList({
(s: any) => s.key === key
);
if (settingsState?.settings && !setting) {
console.error(`Setting ${key} not found`);
}
return (
<React.Fragment key={key}>
{setting ? (

View File

@ -11,7 +11,6 @@ import {
} from '@tabler/icons-react';
import { useMemo } from 'react';
import { PlaceholderPanel } from '../../../components/items/Placeholder';
import { PanelGroup, PanelType } from '../../../components/nav/PanelGroup';
import { SettingsHeader } from '../../../components/nav/SettingsHeader';
import { UserSettingList } from '../../../components/settings/SettingList';
@ -46,7 +45,33 @@ export default function UserSettings() {
name: 'dashboard',
label: t`Dashboard`,
icon: <IconDeviceDesktopAnalytics />,
content: <PlaceholderPanel />
content: (
<UserSettingList
keys={[
// TODO: These will be replaced with "dashboard" settings,
// once the new dashboard is implemented
'HOMEPAGE_HIDE_INACTIVE',
'HOMEPAGE_PART_STARRED',
'HOMEPAGE_CATEGORY_STARRED',
'HOMEPAGE_PART_LATEST',
'HOMEPAGE_BOM_REQUIRES_VALIDATION',
'HOMEPAGE_STOCK_RECENT',
'HOMEPAGE_STOCK_LOW',
'HOMEPAGE_SHOW_STOCK_DEPLETED',
'HOMEPAGE_BUILD_STOCK_NEEDED',
'HOMEPAGE_STOCK_EXPIRED',
'HOMEPAGE_STOCK_STALE',
'HOMEPAGE_BUILD_PENDING',
'HOMEPAGE_BUILD_OVERDUE',
'HOMEPAGE_PO_OUTSTANDING',
'HOMEPAGE_PO_OVERDUE',
'HOMEPAGE_SO_OUTSTANDING',
'HOMEPAGE_SO_OVERDUE',
'HOMEPAGE_SO_SHIPMENTS_PENDING',
'HOMEPAGE_NEWS'
]}
/>
)
},
{
name: 'display',

View File

@ -32,7 +32,6 @@ import {
UnlinkBarcodeAction,
ViewBarcodeAction
} from '../../components/items/ActionDropdown';
import { PlaceholderPanel } from '../../components/items/Placeholder';
import { StylishText } from '../../components/items/StylishText';
import InstanceDetail from '../../components/nav/InstanceDetail';
import NavigationTree from '../../components/nav/NavigationTree';