diff --git a/app/(dashboard)/dashboard/shop/employees/page.tsx b/app/(dashboard)/dashboard/shop/employees/page.tsx index 4efbde6..bb16c60 100644 --- a/app/(dashboard)/dashboard/shop/employees/page.tsx +++ b/app/(dashboard)/dashboard/shop/employees/page.tsx @@ -1,8 +1,125 @@ +import { MoreHorizontal, Star, UserPlus } from "lucide-react" +import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar" +import { Badge } from "@/components/ui/badge" +import { Button } from "@/components/ui/button" +import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card" +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuTrigger, +} from "@/components/ui/dropdown-menu" +import { Input } from "@/components/ui/input" +import { + Table, + TableBody, + TableCell, + TableHead, + TableHeader, + TableRow, +} from "@/components/ui/table" +import { mockPlayers } from "@/lib/mock-data" + +const shopPlayers = mockPlayers.filter((p) => p.shopId === "shop1") + +const statusLabels: Record = { + available: "在线", + busy: "忙碌", + offline: "离线", +} + +const statusVariants: Record = { + available: "default", + busy: "secondary", + offline: "outline", +} + export default function EmployeesPage() { return ( -
-

员工管理

-

邀请、移除打手,设置抽成

+
+
+

员工管理

+ +
+ + + +
+ 签约打手 ({shopPlayers.length}) + +
+
+ + + + + 打手 + 擅长游戏 + 评分 + 完成率 + 状态 + 操作 + + + + {shopPlayers.map((player) => ( + + +
+ + + {player.user.nickname[0]} + +
+

{player.user.nickname}

+

{player.totalOrders} 单

+
+
+
+ +
+ {player.games.map((game) => ( + + {game} + + ))} +
+
+ +
+ + {player.rating} +
+
+ {(player.completionRate * 100).toFixed(0)}% + + + {statusLabels[player.status]} + + + + + + + + + 查看详情 + 调整抽成 + 移除打手 + + + +
+ ))} +
+
+
+
) } diff --git a/app/(dashboard)/dashboard/shop/page.tsx b/app/(dashboard)/dashboard/shop/page.tsx index f06a87a..f947856 100644 --- a/app/(dashboard)/dashboard/shop/page.tsx +++ b/app/(dashboard)/dashboard/shop/page.tsx @@ -1,8 +1,140 @@ +import { DollarSign, Edit, ExternalLink, ListOrdered, Star, Users } from "lucide-react" +import Link from "next/link" +import { Badge } from "@/components/ui/badge" +import { Button } from "@/components/ui/button" +import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card" +import { Input } from "@/components/ui/input" +import { Label } from "@/components/ui/label" +import { Separator } from "@/components/ui/separator" +import { Textarea } from "@/components/ui/textarea" +import { mockShops } from "@/lib/mock-data" + export default function ShopManagementPage() { + const shop = mockShops[0] + return ( -
-

店铺管理

-

店铺信息、活动、订单总览、收入统计

+
+
+

店铺管理

+ +
+ +
+ + + 总订单 + + + +
{shop.totalOrders}
+
+
+ + + 评分 + + + +
{shop.rating}
+
+
+ + + 签约打手 + + + +
{shop.playerCount}
+
+
+ + + 抽成比例 + + + +
+ {shop.commissionType === "percentage" + ? `${shop.commissionValue}%` + : `¥${shop.commissionValue}`} +
+
+
+
+ + + + 基本信息 + + +
+ + +
+
+ +