feat(admin): 品牌管理 + 新建商品
品牌管理:列出品牌及引用商品数,支持改名、合并重复品牌(把源品牌的商品并入目标后删除源)、删除未被引用的品牌。新建商品:商品列表新增「新建商品」入口,填写名称/条码/品牌/品类后创建并进入详情页继续补全。 Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
@@ -6,9 +6,10 @@ import ProductDetail from "./components/ProductDetail";
|
||||
import SubmissionsPage from "./components/SubmissionsPage";
|
||||
import ApiKeysPage from "./components/ApiKeysPage";
|
||||
import CategoriesPage from "./components/CategoriesPage";
|
||||
import { FolderTree, Inbox, KeyRound, LogOut, Package } from "lucide-react";
|
||||
import BrandsPage from "./components/BrandsPage";
|
||||
import { FolderTree, Inbox, KeyRound, LogOut, Package, Tag } from "lucide-react";
|
||||
|
||||
type Tab = "products" | "submissions" | "categories" | "keys";
|
||||
type Tab = "products" | "submissions" | "categories" | "brands" | "keys";
|
||||
type View = { name: "list" } | { name: "detail"; id: string };
|
||||
|
||||
export default function App() {
|
||||
@@ -114,6 +115,16 @@ export default function App() {
|
||||
>
|
||||
<FolderTree className="h-4 w-4" /> 分类管理
|
||||
</button>
|
||||
<button
|
||||
onClick={() => setTab("brands")}
|
||||
className={`px-3 py-1.5 rounded-md flex items-center gap-1.5 ${
|
||||
tab === "brands"
|
||||
? "bg-emerald-50 text-emerald-700"
|
||||
: "text-gray-600 hover:bg-gray-100"
|
||||
}`}
|
||||
>
|
||||
<Tag className="h-4 w-4" /> 品牌管理
|
||||
</button>
|
||||
<button
|
||||
onClick={() => setTab("keys")}
|
||||
className={`px-3 py-1.5 rounded-md flex items-center gap-1.5 ${
|
||||
@@ -141,6 +152,8 @@ export default function App() {
|
||||
<ApiKeysPage />
|
||||
) : tab === "categories" ? (
|
||||
<CategoriesPage />
|
||||
) : tab === "brands" ? (
|
||||
<BrandsPage />
|
||||
) : tab === "submissions" ? (
|
||||
<SubmissionsPage onPending={setPending} />
|
||||
) : view.name === "list" ? (
|
||||
|
||||
Reference in New Issue
Block a user