+
+
+
+ 品牌管理
+
+
+ 维护品牌名录。可重命名、删除未被引用的品牌,或将重复品牌合并到一起。
+
+
+
+
+
+ {error && (
+
{error}
+ )}
+
+
+
+ setQuery(e.target.value)}
+ placeholder="筛选品牌名"
+ className="w-full rounded border border-gray-300 py-2 pl-8 pr-3 text-sm focus:border-emerald-500 focus:outline-none"
+ />
+
+
+ {creating && (
+
+
新建品牌
+
+
+
+
+
+
+ )}
+
+ {merge && (
+
+
+ 合并品牌
+
+
+ 把「{merge.source.name}」({merge.source.product_count} 个商品)合并到下面选择的品牌,源品牌将被删除。
+
+
+
+
+
+
+
+ )}
+
+
+
+ );
+}
diff --git a/admin-frontend/src/components/ProductList.tsx b/admin-frontend/src/components/ProductList.tsx
index 409a30e..bfe43b0 100644
--- a/admin-frontend/src/components/ProductList.tsx
+++ b/admin-frontend/src/components/ProductList.tsx
@@ -1,7 +1,7 @@
import { useEffect, useState } from "react";
-import { api } from "../api";
-import { FIELD_LABELS, ProductRow } from "../types";
-import { Search, AlertCircle } from "lucide-react";
+import { api, ApiError } from "../api";
+import { Brand, Category, FIELD_LABELS, ProductRow } from "../types";
+import { Search, AlertCircle, Plus } from "lucide-react";
const STATUS_LABEL: Record