瀏覽代碼

♻️ refactor(deps): update package dependencies and imports

- replace @d8d/user-management-ui with @d8d/user-management-ui-mt
- replace @d8d/area-management-ui with @d8d/area-management-ui-mt
- remove @d8d/geo-areas dependency

💄 style(menu): comment out unused menu items

- comment out "快递公司" menu item
- comment out "代理商管理" menu item
- comment out "卡券管理" menu item and its children
yourname 1 月之前
父節點
當前提交
0b9047a0d9

+ 2 - 3
packages/delivery-address-management-ui-mt/package.json

@@ -43,9 +43,8 @@
     "@d8d/shared-types": "workspace:*",
     "@d8d/shared-ui-components": "workspace:*",
     "@d8d/delivery-address-module-mt": "workspace:*",
-    "@d8d/geo-areas": "workspace:*",
-    "@d8d/user-management-ui": "workspace:*",
-    "@d8d/area-management-ui": "workspace:*",
+    "@d8d/user-management-ui-mt": "workspace:*",
+    "@d8d/area-management-ui-mt": "workspace:*",
     "@hookform/resolvers": "^5.2.1",
     "@tanstack/react-query": "^5.90.9",
     "axios": "^1.7.9",

+ 2 - 2
packages/delivery-address-management-ui-mt/src/components/DeliveryAddressManagement.tsx

@@ -19,8 +19,8 @@ import { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, For
 import { Switch } from '@d8d/shared-ui-components/components/ui/switch';
 import { Skeleton } from '@d8d/shared-ui-components/components/ui/skeleton';
 import { DataTablePagination } from '@d8d/shared-ui-components/components/admin/DataTablePagination';
-import { UserSelector } from '@d8d/user-management-ui/components';
-import { AreaSelect4Level } from '@d8d/area-management-ui/components';
+import { UserSelector } from '@d8d/user-management-ui-mt/components';
+import { AreaSelect4Level } from '@d8d/area-management-ui-mt/components';
 import type { DeliveryAddressQueryParams } from '../types/delivery-address';
 import { DeliveryAddressState, DefaultAddressState } from '../types/delivery-address';
 

+ 33 - 33
web/src/client/admin/menu.tsx

@@ -148,12 +148,12 @@ export const useMenu = () => {
           path: '/admin/goods-categories',
           permission: 'goods:manage'
         },
-        {
-          key: 'express-companies',
-          label: '快递公司',
-          path: '/admin/express-companies',
-          permission: 'goods:manage'
-        },
+        // {
+        //   key: 'express-companies',
+        //   label: '快递公司',
+        //   path: '/admin/express-companies',
+        //   permission: 'goods:manage'
+        // },
       ]
     },
     {
@@ -184,13 +184,13 @@ export const useMenu = () => {
       path: '/admin/merchants',
       permission: 'merchant:manage'
     },
-    {
-      key: 'agents',
-      label: '代理商管理',
-      icon: <UserCheck className="h-4 w-4" />,
-      path: '/admin/agents',
-      permission: 'agent:manage'
-    },
+    // {
+    //   key: 'agents',
+    //   label: '代理商管理',
+    //   icon: <UserCheck className="h-4 w-4" />,
+    //   path: '/admin/agents',
+    //   permission: 'agent:manage'
+    // },
     {
       key: 'delivery-addresses',
       label: '收货地址',
@@ -198,26 +198,26 @@ export const useMenu = () => {
       path: '/admin/delivery-addresses',
       permission: 'user:manage'
     },
-    {
-      key: 'cards',
-      label: '卡券管理',
-      icon: <CreditCard className="h-4 w-4" />,
-      permission: 'card:manage',
-      children: [
-        {
-          key: 'user-cards',
-          label: '用户卡管理',
-          path: '/admin/user-cards',
-          permission: 'card:manage'
-        },
-        {
-          key: 'user-card-balance-records',
-          label: '余额记录',
-          path: '/admin/user-card-balance-records',
-          permission: 'card:manage'
-        }
-      ]
-    },
+    // {
+    //   key: 'cards',
+    //   label: '卡券管理',
+    //   icon: <CreditCard className="h-4 w-4" />,
+    //   permission: 'card:manage',
+    //   children: [
+    //     {
+    //       key: 'user-cards',
+    //       label: '用户卡管理',
+    //       path: '/admin/user-cards',
+    //       permission: 'card:manage'
+    //     },
+    //     {
+    //       key: 'user-card-balance-records',
+    //       label: '余额记录',
+    //       path: '/admin/user-card-balance-records',
+    //       permission: 'card:manage'
+    //     }
+    //   ]
+    // },
     {
       key: 'settings',
       label: '系统设置',