feat: order cancel button and reorder link on order detail page

This commit is contained in:
zetaloop
2026-02-20 18:50:53 +08:00
parent 07754069c1
commit 922d656056
+10 -1
View File
@@ -6,6 +6,7 @@ import {
MessageSquare,
RefreshCw,
Star,
XCircle,
} from "lucide-react"
import Link from "next/link"
import { notFound } from "next/navigation"
@@ -205,6 +206,12 @@ export default async function OrderDetailPage({ params }: { params: Promise<{ id
)}
<div className="flex gap-2 flex-wrap">
{order.status === "pending_accept" && (
<Button variant="outline">
<XCircle className="mr-1 h-4 w-4" />
</Button>
)}
{(order.status === "in_progress" || order.status === "pending_close") && chatSession && (
<Button asChild>
<Link href={`/chat/${chatSession.id}`}>
@@ -230,9 +237,11 @@ export default async function OrderDetailPage({ params }: { params: Promise<{ id
</Button>
)}
{order.status === "completed" && (
<Button variant="outline">
<Button variant="outline" asChild>
<Link href={`/order/new?serviceId=${order.service.id}`}>
<RefreshCw className="mr-1 h-4 w-4" />
</Link>
</Button>
)}
</div>