From 8ea80f8c8097770907d85c204675b66a15eec2db Mon Sep 17 00:00:00 2001 From: que01 Date: Sat, 19 Sep 2026 18:56:12 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E5=92=A8=E8=AF=A2?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E8=AF=A6=E6=83=85=E6=8A=BD=E5=B1=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/features/inquiries/InquiriesPage.tsx | 52 ++++++++++++++++++- 1 file changed, 50 insertions(+), 2 deletions(-) diff --git a/apps/admin/src/features/inquiries/InquiriesPage.tsx b/apps/admin/src/features/inquiries/InquiriesPage.tsx index 0673d22..eae6131 100644 --- a/apps/admin/src/features/inquiries/InquiriesPage.tsx +++ b/apps/admin/src/features/inquiries/InquiriesPage.tsx @@ -1,4 +1,15 @@ -import { Badge, Button, Card, Select, Space, Table, Tag, message } from "antd"; +import { + Badge, + Button, + Card, + Descriptions, + Drawer, + Select, + Space, + Table, + Tag, + message, +} from "antd"; import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"; import type { AdminBooking } from "@personal-brand/api-client"; import { createApiClient } from "../../lib/api.js"; @@ -17,6 +28,7 @@ export function InquiriesPage() { const client = createApiClient(); const queryClient = useQueryClient(); const [status, setStatus] = useState(); + const [selectedId, setSelectedId] = useState(); const query = useQuery({ queryKey: ["admin-bookings", status], queryFn: () => client.listAdminBookings(status ? { status: status as never } : {}), @@ -33,6 +45,11 @@ export function InquiriesPage() { mutationFn: (id: string) => client.markAdminBookingRead(id), onSuccess: () => void queryClient.invalidateQueries({ queryKey: ["admin-bookings"] }), }); + const detail = useQuery({ + queryKey: ["admin-booking", selectedId], + queryFn: () => client.getAdminBooking(selectedId!), + enabled: Boolean(selectedId), + }); return ( ( + + ), + }, { title: "联系人", dataIndex: "customerName" }, { title: "提交时间", @@ -91,6 +116,29 @@ export function InquiriesPage() { }, ]} /> + setSelectedId(undefined)} + loading={detail.isLoading} + width={520} + > + {detail.data && ( + + {detail.data.bookingNo} + {detail.data.customerName} + + {labels[detail.data.status] ?? detail.data.status} + + + {new Date(detail.data.createdAt).toLocaleString("zh-CN")} + + + {detail.data.adminNote || "暂无"} + + + )} + ); }