Selaa lähdekoodia

将 client/admin/pages_xunlian_codes.tsx 加入 路由和菜单

yourname 7 kuukautta sitten
vanhempi
sitoutus
14172f16ef
2 muutettua tiedostoa jossa 13 lisäystä ja 0 poistoa
  1. 7 0
      client/admin/menu.tsx
  2. 6 0
      client/admin/routes.tsx

+ 7 - 0
client/admin/menu.tsx

@@ -171,6 +171,13 @@ export const useMenu = () => {
       icon: <FileTextOutlined />,
       path: '/admin/submission-records',
       permission: 'data:view'
+    },
+    {
+      key: 'xunlian-codes',
+      label: '训练代码',
+      icon: <FileTextOutlined />,
+      path: '/admin/xunlian-codes',
+      permission: 'content:manage'
     }
   ];
 

+ 6 - 0
client/admin/routes.tsx

@@ -17,6 +17,7 @@ import { LoginPage } from './pages_login_reg.tsx';
 import { ClassroomDataPage } from './pages_classroom_data.tsx';
 import { DateNotesPage } from './pages_date_notes.tsx';
 import { SubmissionRecordsPage } from './pages_submission_records.tsx';
+import { XunlianCodePage } from './pages_xunlian_codes.tsx';
 
 export const router = createBrowserRouter([
   {
@@ -99,6 +100,11 @@ export const router = createBrowserRouter([
         element: <SubmissionRecordsPage />,
         errorElement: <ErrorPage />
       },
+      {
+        path: 'xunlian-codes',
+        element: <XunlianCodePage />,
+        errorElement: <ErrorPage />
+      },
       {
         path: '*',
         element: <NotFoundPage />,