diff --git a/assets/icons/clienticon.svg b/assets/icons/clienticon.svg new file mode 100644 index 0000000..cbf4d00 --- /dev/null +++ b/assets/icons/clienticon.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/assets/icons/listingicon.svg b/assets/icons/listingicon.svg new file mode 100644 index 0000000..25fc30b --- /dev/null +++ b/assets/icons/listingicon.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/assets/icons/salesicon.svg b/assets/icons/salesicon.svg new file mode 100644 index 0000000..01207be --- /dev/null +++ b/assets/icons/salesicon.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/App.jsx b/src/App.jsx index fbee6a5..a4fcfc6 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -32,6 +32,7 @@ import { ProductionRoutes, InventoryRoutes, FinanceRoutes, + SalesRoutes, ManagementRoutes, DeveloperRoutes } from './routes' @@ -98,6 +99,7 @@ const AppContent = () => { {ProductionRoutes} {InventoryRoutes} {FinanceRoutes} + {SalesRoutes} {ManagementRoutes} {DeveloperRoutes} diff --git a/src/components/Dashboard/Layout.jsx b/src/components/Dashboard/Layout.jsx index 54f1d8f..56160aa 100644 --- a/src/components/Dashboard/Layout.jsx +++ b/src/components/Dashboard/Layout.jsx @@ -5,6 +5,7 @@ import { useLocation } from 'react-router-dom' import ProductionSidebar from './Production/ProductionSidebar' import InventorySidebar from './Inventory/InventorySidebar' import FinanceSidebar from './Finance/FinanceSidebar' +import SalesSidebar from './Sales/SalesSidebar' import ManagementSidebar from './Management/ManagementSidebar' import DashboardNavigation from './common/DashboardNavigation' import DashboardBreadcrumb from './common/DashboardBreadcrumb' @@ -19,6 +20,7 @@ const DashboardLayout = ({ children }) => { const isProduction = location.pathname.startsWith('/dashboard/production') const isInventory = location.pathname.startsWith('/dashboard/inventory') const isFinance = location.pathname.startsWith('/dashboard/finance') + const isSales = location.pathname.startsWith('/dashboard/sales') const isManagement = location.pathname.startsWith('/dashboard/management') const isDeveloper = location.pathname.startsWith('/dashboard/developer') @@ -38,6 +40,8 @@ const DashboardLayout = ({ children }) => { ) : isFinance ? ( + ) : isSales ? ( + ) : isManagement ? ( ) : isDeveloper ? ( diff --git a/src/components/Dashboard/Sales/Clients.jsx b/src/components/Dashboard/Sales/Clients.jsx new file mode 100644 index 0000000..49c799f --- /dev/null +++ b/src/components/Dashboard/Sales/Clients.jsx @@ -0,0 +1,95 @@ +import { useState, useRef } from 'react' +import { Button, Flex, Space, Modal, Dropdown } from 'antd' +import NewClient from './Clients/NewClient' +import ObjectTable from '../common/ObjectTable' +import PlusIcon from '../../Icons/PlusIcon' +import ReloadIcon from '../../Icons/ReloadIcon' +import useColumnVisibility from '../hooks/useColumnVisibility' +import GridIcon from '../../Icons/GridIcon' +import ListIcon from '../../Icons/ListIcon' +import useViewMode from '../hooks/useViewMode' +import ColumnViewButton from '../common/ColumnViewButton' + +const Clients = () => { + const [newClientOpen, setNewClientOpen] = useState(false) + const tableRef = useRef() + + const [viewMode, setViewMode] = useViewMode('client') + + const [columnVisibility, setColumnVisibility] = useColumnVisibility('client') + + const actionItems = { + items: [ + { + label: 'New Client', + key: 'newClient', + icon: + }, + { type: 'divider' }, + { + label: 'Reload List', + key: 'reloadList', + icon: + } + ], + onClick: ({ key }) => { + if (key === 'reloadList') { + tableRef.current?.reload() + } else if (key === 'newClient') { + setNewClientOpen(true) + } + } + } + + return ( + <> + + + + + + + + + + + + + + +