Integrate Finance routes and sidebar into the dashboard layout
- Added FinanceRoutes to App component for navigation. - Included FinanceSidebar in DashboardLayout to support finance-related views. - Updated layout logic to handle finance-specific paths.
This commit is contained in:
parent
cabc68c932
commit
c03a47a833
@ -31,6 +31,7 @@ import AuthCallback from './components/App/AuthCallback.jsx'
|
||||
import {
|
||||
ProductionRoutes,
|
||||
InventoryRoutes,
|
||||
FinanceRoutes,
|
||||
ManagementRoutes,
|
||||
DeveloperRoutes
|
||||
} from './routes'
|
||||
@ -96,6 +97,7 @@ const AppContent = () => {
|
||||
>
|
||||
{ProductionRoutes}
|
||||
{InventoryRoutes}
|
||||
{FinanceRoutes}
|
||||
{ManagementRoutes}
|
||||
{DeveloperRoutes}
|
||||
</Route>
|
||||
|
||||
@ -4,6 +4,7 @@ import { Layout, Flex } from 'antd'
|
||||
import { useLocation } from 'react-router-dom'
|
||||
import ProductionSidebar from './Production/ProductionSidebar'
|
||||
import InventorySidebar from './Inventory/InventorySidebar'
|
||||
import FinanceSidebar from './Finance/FinanceSidebar'
|
||||
import ManagementSidebar from './Management/ManagementSidebar'
|
||||
import DashboardNavigation from './common/DashboardNavigation'
|
||||
import DashboardBreadcrumb from './common/DashboardBreadcrumb'
|
||||
@ -17,6 +18,7 @@ const DashboardLayout = ({ children }) => {
|
||||
const location = useLocation()
|
||||
const isProduction = location.pathname.startsWith('/dashboard/production')
|
||||
const isInventory = location.pathname.startsWith('/dashboard/inventory')
|
||||
const isFinance = location.pathname.startsWith('/dashboard/finance')
|
||||
const isManagement = location.pathname.startsWith('/dashboard/management')
|
||||
const isDeveloper = location.pathname.startsWith('/dashboard/developer')
|
||||
|
||||
@ -34,6 +36,8 @@ const DashboardLayout = ({ children }) => {
|
||||
<ProductionSidebar />
|
||||
) : isInventory ? (
|
||||
<InventorySidebar />
|
||||
) : isFinance ? (
|
||||
<FinanceSidebar />
|
||||
) : isManagement ? (
|
||||
<ManagementSidebar />
|
||||
) : isDeveloper ? (
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user