diff --git a/src/routes/index.tsx b/src/routes/index.tsx
index 4a51d06..b0e60cc 100644
--- a/src/routes/index.tsx
+++ b/src/routes/index.tsx
@@ -20,6 +20,7 @@ import Loader from "@/components/loader.tsx";
import ManualIndex from "@/pages/manual/index.tsx";
import BillQuery from "@/pages/bill/query.tsx";
import BillReconciliation from "@/pages/bill/reconciliation.tsx";
+import ExternalCreate from "@/pages/bill/external_create.tsx";
const routes: RouteObject[] = [
@@ -48,6 +49,10 @@ const routes: RouteObject[] = [
path: 'pay/:result',
element:
},
+ {
+ path: 'bill/external_create',
+ element:
+ },
]
},
{
diff --git a/src/routes/layout/dashboard-layout.tsx b/src/routes/layout/dashboard-layout.tsx
index 190440d..5f09af8 100644
--- a/src/routes/layout/dashboard-layout.tsx
+++ b/src/routes/layout/dashboard-layout.tsx
@@ -1,6 +1,6 @@
import {Outlet, useLocation} from "react-router-dom";
import React, {useMemo} from "react";
-import {Avatar, Dropdown, Layout, Nav, Space, Typography} from "@douyinfe/semi-ui"
+import {Avatar, Button, Dropdown, Layout, Nav, Space, Typography} from "@douyinfe/semi-ui"
import {useTranslation} from "react-i18next";
import AuthGuard from "@/routes/layout/auth-guard.tsx";
@@ -11,6 +11,7 @@ import {AllDashboardMenu, DashboardNavigation} from "@/routes/layout/dashboard-n
import {IconExit, IconUser} from "@douyinfe/semi-icons";
import styled from "@emotion/styled";
import useConfig from "@/hooks/useConfig.ts";
+import {IconRoles} from "@/components/icons";
const {Header, Content, Sider} = Layout;
@@ -56,8 +57,36 @@ export const HeaderUserAvatar = () => {
)
}
+const RoleList = ['root', 'ro', 'fo','staff']
+const RoleSwitcher = ()=>{
+ const {user, updateUser} = useAuth()
+
+ return (<>
+ {AppMode !== 'production' && (
+ {RoleList.map((key) => (
+ updateUser({department: key})}
+ >{key.toUpperCase()}
+ ))}
+
+ }
+ >
+
+ ) }
+ >)
+}
export const CommonHeader: React.FC
= ({children, title, rightExtra}) => {
const {appName} = useConfig()
+
return (