118 lines
3.0 KiB
JavaScript
118 lines
3.0 KiB
JavaScript
import { lazy } from "react";
|
|
import { lazyRetry } from "../utils/lazyRetry";
|
|
import {
|
|
ROUTE_INSPECTOR_ARCHIVED_REQUESTS,
|
|
ROUTE_INSPECTOR_FILE_ROUTE,
|
|
ROUTE_INSPECTOR_REJECTED_REQUESTS,
|
|
ROUTE_INSPECTOR_REQUESTS,
|
|
ROUTE_INSPECTOR_REQUESTS_NEW_REQUESTS,
|
|
ROUTE_PROVINCE_CAR_MANAGEMENT,
|
|
ROUTE_PROVINCE_INSPECTOR_REPORTING,
|
|
ROUTE_PROVINCE_INSPECTOR_TICKET,
|
|
ROUTE_PROVINCE_INSPECTOR_VIEW_TICKET,
|
|
ROUTE_PROVINCE_USER_FILE_ROUTE,
|
|
ROUTE_PROVINCE_USER_MANAGEMENT,
|
|
ROUTE_PROVINCE_INSPECTOR_AWAITING_PAYMENT_REQUESTS,
|
|
ROUTE_PROVINCE_INSPECTOR_AWAITING_INSPECTION_REQUESTS,
|
|
ROUTE_INSPECTOR_STATICS,
|
|
ROUTE_PROVINCE_INSPECTOR_PRICING,
|
|
ROUTE_INSPECTOR_ASSIGN_VET_FARM,
|
|
} from "./routes";
|
|
|
|
const Inspector = lazy(() => lazyRetry(() => import("../pages/Inspector")));
|
|
// const File = lazy(() => import("../pages/File"));
|
|
const NewFile = lazy(() => lazyRetry(() => import("../pages/NewFile")));
|
|
const CarManagement = lazy(() =>
|
|
lazyRetry(() => import("../pages/CarManagement"))
|
|
);
|
|
const UserManagement = lazy(() =>
|
|
lazyRetry(() => import("../pages/ProvinceUserManagement"))
|
|
);
|
|
const UserFile = lazy(() =>
|
|
lazyRetry(() => import("../pages/ProvinceUserFile"))
|
|
);
|
|
const Tickets = lazy(() => lazyRetry(() => import("../pages/Tickets")));
|
|
const Reporting = lazy(() =>
|
|
lazyRetry(() => import("../pages/InspectorReporting"))
|
|
);
|
|
const Statics = lazy(() => lazyRetry(() => import("../pages/AdminStatics")));
|
|
|
|
const InspectorPricing = lazy(() =>
|
|
lazyRetry(() => import("../pages/ProvinceManagePricing"))
|
|
);
|
|
const ManageFarm = lazy(() => lazyRetry(() => import("../pages/ManageFarm")));
|
|
|
|
export const inspectorRouting = [
|
|
{
|
|
path: [
|
|
ROUTE_INSPECTOR_REQUESTS,
|
|
ROUTE_INSPECTOR_REJECTED_REQUESTS,
|
|
ROUTE_INSPECTOR_REQUESTS_NEW_REQUESTS,
|
|
ROUTE_INSPECTOR_ARCHIVED_REQUESTS,
|
|
ROUTE_PROVINCE_INSPECTOR_AWAITING_PAYMENT_REQUESTS,
|
|
ROUTE_PROVINCE_INSPECTOR_AWAITING_INSPECTION_REQUESTS,
|
|
],
|
|
Page: Inspector,
|
|
exact: false,
|
|
props: {},
|
|
},
|
|
{
|
|
path: [ROUTE_INSPECTOR_FILE_ROUTE],
|
|
Page: NewFile,
|
|
exact: false,
|
|
props: {},
|
|
},
|
|
{
|
|
path: [ROUTE_PROVINCE_CAR_MANAGEMENT],
|
|
Page: CarManagement,
|
|
exact: false,
|
|
props: {},
|
|
},
|
|
|
|
{
|
|
path: [ROUTE_PROVINCE_USER_MANAGEMENT],
|
|
Page: UserManagement,
|
|
exact: false,
|
|
props: {},
|
|
},
|
|
{
|
|
path: [ROUTE_INSPECTOR_ASSIGN_VET_FARM],
|
|
Page: ManageFarm,
|
|
exact: false,
|
|
props: {},
|
|
},
|
|
{
|
|
path: [ROUTE_PROVINCE_USER_FILE_ROUTE],
|
|
Page: UserFile,
|
|
exact: false,
|
|
props: {},
|
|
},
|
|
{
|
|
path: [
|
|
ROUTE_PROVINCE_INSPECTOR_VIEW_TICKET,
|
|
ROUTE_PROVINCE_INSPECTOR_TICKET,
|
|
],
|
|
Page: Tickets,
|
|
exact: false,
|
|
props: {},
|
|
},
|
|
{
|
|
path: [ROUTE_PROVINCE_INSPECTOR_REPORTING],
|
|
Page: Reporting,
|
|
exact: false,
|
|
props: {},
|
|
},
|
|
{
|
|
path: [ROUTE_INSPECTOR_STATICS],
|
|
Page: Statics,
|
|
exact: false,
|
|
props: {},
|
|
},
|
|
{
|
|
path: [ROUTE_PROVINCE_INSPECTOR_PRICING],
|
|
Page: InspectorPricing,
|
|
exact: false,
|
|
props: {},
|
|
},
|
|
];
|