feat: order cancel button and reorder link on order detail page
This commit is contained in:
@@ -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">
|
||||
<RefreshCw className="mr-1 h-4 w-4" />
|
||||
再来一单
|
||||
<Button variant="outline" asChild>
|
||||
<Link href={`/order/new?serviceId=${order.service.id}`}>
|
||||
<RefreshCw className="mr-1 h-4 w-4" />
|
||||
再来一单
|
||||
</Link>
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user