Tom Butcher 044abf32a8 Refactor Dashboard Overview Components for Enhanced Layout and Functionality
- Introduced DashboardOverviewPage and DashboardOverviewFlexColumns components to streamline the layout and management of dashboard sections, improving overall organization and usability.
- Replaced individual collapsible sections in Finance, Inventory, Production, and Sales overviews with a unified structure, enhancing maintainability and consistency across the dashboard.
- Added ActionsButton component for improved action handling and keyboard shortcuts, enhancing user interaction capabilities.
- Updated styles in App.css to support new drag-and-drop functionality and layout features, ensuring a cohesive visual experience.
- Refactored existing components to utilize the new structure, improving code clarity and reducing redundancy.
2026-08-25 01:19:17 +01:00

85 lines
1.8 KiB
JavaScript

import DashboardOverviewPage from '../common/DashboardOverviewPage'
import StatsDisplay from '../common/StatsDisplay'
import ModelHistoryDisplay from '../common/ModelHistoryDisplay'
import ObjectTable from '../common/ObjectTable'
const collapseDefaults = {
printerStats: true,
printerHistory: true,
onlinePrinters: true,
jobStats: true,
productionStats: true,
jobStatsDetails: true,
jobHistory: true,
queuedJobs: true
}
const sections = [
{
key: 'printerStats',
title: 'Printer Statistics',
className: 'no-t-padding-collapse',
content: <StatsDisplay objectType='printer' />
},
{
key: 'jobStats',
title: 'Job Statistics',
className: 'no-t-padding-collapse',
content: <StatsDisplay objectType='job' />
},
{
key: 'printerAndJobHistoryRow',
type: 'row',
columns: [
[
{
key: 'printerHistory',
title: 'Printer History',
content: <ModelHistoryDisplay objectType='printer' />
}
],
[
{
key: 'jobHistory',
title: 'Job History',
content: <ModelHistoryDisplay objectType='job' />
}
]
]
},
{
key: 'onlinePrintersAndQueuedJobsRow',
type: 'row',
columns: [
[
{
key: 'onlinePrinters',
title: 'Online Printers',
content: (
<ObjectTable type='printer' masterFilter={{ online: true }} />
)
}
],
[
{
key: 'queuedJobs',
title: 'Queued Jobs',
content: <ObjectTable type='job' masterFilter={{ state: 'queued' }} />
}
]
]
}
]
const ProductionOverview = () => {
return (
<DashboardOverviewPage
pageName='ProductionOverview'
collapseDefaults={collapseDefaults}
sections={sections}
/>
)
}
export default ProductionOverview