reports update

This commit is contained in:
joshikannan
2025-11-14 18:42:26 +05:30
parent b27c27a444
commit 12df2e9dc4
15 changed files with 2159 additions and 633 deletions

View File

@@ -4,7 +4,8 @@ import { lazy } from 'react';
import MainLayout from 'layout/MainLayout';
import CommonLayout from 'layout/CommonLayout';
import Loadable from 'components/Loadable';
// import AuthGuard from 'utils/route-guard/AuthGuard';
import AuthGuard from 'utils/route-guard/AuthGuard';
import { element } from 'prop-types';
// pages routing
const MaintenanceError = Loadable(lazy(() => import('pages/maintenance/404')));
@@ -15,7 +16,6 @@ const MaintenanceComingSoon = Loadable(lazy(() => import('pages/maintenance/comi
// render - sample page
const SamplePage = Loadable(lazy(() => import('pages/extra-pages/sample-page')));
const Login = Loadable(lazy(() => import('pages/nearle/login')));
const Dashboard = Loadable(lazy(() => import('pages/nearle/dashboard')));
const Customers = Loadable(lazy(() => import('pages/nearle/clients/customers')));
@@ -25,12 +25,15 @@ const Details = Loadable(lazy(() => import('pages/nearle/orders/details')));
const Accountsettings = Loadable(lazy(() => import('pages/nearle/accountsettings')));
// const Createorder = Loadable(lazy(() => import('pages/nearle/orders/createorder')));
const Createclient = Loadable(lazy(() => import('pages/nearle/clients/createCustomer')));
const CreateCustomer = Loadable(lazy(() => import('pages/nearle/clients/createCustomer')));
const Createorder1 = Loadable(lazy(() => import('pages/nearle/orders/createorder1')));
const MultipleOrders = Loadable(lazy(() => import('pages/nearle/orders/multipleOrders')));
const OrderSummary = Loadable(lazy(() => import('pages/nearle/reports/orderSummary')));
const OrdersDetails = Loadable(lazy(() => import('pages/nearle/reports/ordersDetails')));
const RiderSummary = Loadable(lazy(() => import('pages/nearle/reports/ridersummary')));
const RiderLogs = Loadable(lazy(() => import('pages/nearle/reports/riderLogs')));
const Invoice = Loadable(lazy(() => import('pages/nearle/invoice/invoice')));
const InvoicePreview = Loadable(lazy(() => import('../pages/nearle/invoice/invoicePreview')));
@@ -49,48 +52,81 @@ const MainRoutes = {
),
children: [
{
path: 'dashboard',
element: <Dashboard />
},
{
path: 'customers',
element: <Customers />
},
{
path: 'orders',
element: <Orders />
path: 'nearle',
children: [
{
path: 'orders',
element: <Orders />,
children: [
// use Outlet in orders page to render the child, because order render in app, but chidren createorder, multipleorder have nowhere, outlet make parent as to render
{
path: 'create',
element: <Createorder1 />
},
{
path: 'createorders',
element: <MultipleOrders />
}
]
},
{
path: 'customers',
children: [
{
path: '',
element: <Customers />
},
{
path: 'create',
element: <CreateCustomer />
}
]
},
{
path: 'reports',
children: [
{
path: 'ordersummary',
element: <OrderSummary />
},
{
path: 'ordersdetails',
element: <OrdersDetails />
},
{
path: 'ridersummary',
element: <RiderSummary />
},
{
path: 'riderlogs',
element: <RiderLogs />
}
]
},
{
path: 'invoice',
children: [
{
path: '',
element: <Invoice />
},
{
path: 'preview',
element: <InvoicePreview />
}
]
}
]
},
{
path: 'accountsettings',
element: <Accountsettings />
},
{
path: 'orders/create',
element: <Createorder1 />
},
{
path: 'orders/createorders',
element: <MultipleOrders />
},
{
path: 'orders/details',
element: <Details />
},
{
path: 'customers/create',
element: <Createclient />
},
{
path: 'reports/ordersdetails',
element: <OrdersDetails />
},
{
path: 'invoice',
element: <Invoice />
},
{
path: 'invoice/preview',
element: <InvoicePreview />
}
]
},