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 {
|
import {
|
||||||
ProductionRoutes,
|
ProductionRoutes,
|
||||||
InventoryRoutes,
|
InventoryRoutes,
|
||||||
|
FinanceRoutes,
|
||||||
ManagementRoutes,
|
ManagementRoutes,
|
||||||
DeveloperRoutes
|
DeveloperRoutes
|
||||||
} from './routes'
|
} from './routes'
|
||||||
@ -96,6 +97,7 @@ const AppContent = () => {
|
|||||||
>
|
>
|
||||||
{ProductionRoutes}
|
{ProductionRoutes}
|
||||||
{InventoryRoutes}
|
{InventoryRoutes}
|
||||||
|
{FinanceRoutes}
|
||||||
{ManagementRoutes}
|
{ManagementRoutes}
|
||||||
{DeveloperRoutes}
|
{DeveloperRoutes}
|
||||||
</Route>
|
</Route>
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import { Layout, Flex } from 'antd'
|
|||||||
import { useLocation } from 'react-router-dom'
|
import { useLocation } from 'react-router-dom'
|
||||||
import ProductionSidebar from './Production/ProductionSidebar'
|
import ProductionSidebar from './Production/ProductionSidebar'
|
||||||
import InventorySidebar from './Inventory/InventorySidebar'
|
import InventorySidebar from './Inventory/InventorySidebar'
|
||||||
|
import FinanceSidebar from './Finance/FinanceSidebar'
|
||||||
import ManagementSidebar from './Management/ManagementSidebar'
|
import ManagementSidebar from './Management/ManagementSidebar'
|
||||||
import DashboardNavigation from './common/DashboardNavigation'
|
import DashboardNavigation from './common/DashboardNavigation'
|
||||||
import DashboardBreadcrumb from './common/DashboardBreadcrumb'
|
import DashboardBreadcrumb from './common/DashboardBreadcrumb'
|
||||||
@ -17,6 +18,7 @@ const DashboardLayout = ({ children }) => {
|
|||||||
const location = useLocation()
|
const location = useLocation()
|
||||||
const isProduction = location.pathname.startsWith('/dashboard/production')
|
const isProduction = location.pathname.startsWith('/dashboard/production')
|
||||||
const isInventory = location.pathname.startsWith('/dashboard/inventory')
|
const isInventory = location.pathname.startsWith('/dashboard/inventory')
|
||||||
|
const isFinance = location.pathname.startsWith('/dashboard/finance')
|
||||||
const isManagement = location.pathname.startsWith('/dashboard/management')
|
const isManagement = location.pathname.startsWith('/dashboard/management')
|
||||||
const isDeveloper = location.pathname.startsWith('/dashboard/developer')
|
const isDeveloper = location.pathname.startsWith('/dashboard/developer')
|
||||||
|
|
||||||
@ -34,6 +36,8 @@ const DashboardLayout = ({ children }) => {
|
|||||||
<ProductionSidebar />
|
<ProductionSidebar />
|
||||||
) : isInventory ? (
|
) : isInventory ? (
|
||||||
<InventorySidebar />
|
<InventorySidebar />
|
||||||
|
) : isFinance ? (
|
||||||
|
<FinanceSidebar />
|
||||||
) : isManagement ? (
|
) : isManagement ? (
|
||||||
<ManagementSidebar />
|
<ManagementSidebar />
|
||||||
) : isDeveloper ? (
|
) : isDeveloper ? (
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user