2022-12-27 21:33:49 +08:00
|
|
|
import {Routes, Route} from "react-router-dom";
|
|
|
|
import {createBrowserHistory} from "history";
|
2022-12-26 17:44:46 +08:00
|
|
|
import LoginView from "../pages/login/LoginView";
|
2022-12-23 23:00:44 +08:00
|
|
|
import HomeView from "../pages/HomeView";
|
2022-12-26 17:44:46 +08:00
|
|
|
import InvoiceListView from "../pages/Invoice/mine/InvoiceListView";
|
|
|
|
import MyReimbursement from "../pages/reimbursement/mine/MyReimbursement";
|
2022-12-27 21:33:49 +08:00
|
|
|
import {BrowserRouter} from "./BrowserRouter"
|
2022-12-29 15:20:09 +08:00
|
|
|
import InvoiceManagement from "../pages/Invoice/management/InvoiceManagement";
|
|
|
|
import ReimbursementApproval from "../pages/reimbursement/approval/ReimbursementApproval";
|
|
|
|
import StatView from "../pages/stat/StatView";
|
2023-01-05 12:45:20 +08:00
|
|
|
import Configuration from "../pages/configuration/Configuration";
|
2022-12-23 23:00:44 +08:00
|
|
|
|
2022-12-27 21:33:49 +08:00
|
|
|
export const history = createBrowserHistory()
|
2022-12-24 11:50:11 +08:00
|
|
|
|
2022-12-27 21:33:49 +08:00
|
|
|
function CustomRouter() {
|
|
|
|
return (
|
|
|
|
<BrowserRouter history={history}>
|
|
|
|
<Routes>
|
|
|
|
<Route path="/" element={<HomeView/>}>
|
|
|
|
<Route path="invoice/mine" element={<InvoiceListView/>}></Route>
|
|
|
|
<Route path="reimbursement/mine" element={<MyReimbursement/>}></Route>
|
2022-12-29 15:20:09 +08:00
|
|
|
<Route path="invoice/management" element={<InvoiceManagement/>}></Route>
|
|
|
|
<Route path="reimbursement/approval" element={<ReimbursementApproval/>}></Route>
|
|
|
|
<Route path="stat" element={<StatView/>}></Route>
|
2023-01-05 12:45:20 +08:00
|
|
|
<Route path="config" element={<Configuration/>}></Route>
|
2022-12-27 21:33:49 +08:00
|
|
|
</Route>
|
|
|
|
<Route path="/login" element={<LoginView/>}></Route>
|
|
|
|
</Routes>
|
|
|
|
</BrowserRouter>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
export default CustomRouter
|