feat: order cancel button and reorder link on order detail page
This commit is contained in:
@@ -6,6 +6,7 @@ import {
|
|||||||
MessageSquare,
|
MessageSquare,
|
||||||
RefreshCw,
|
RefreshCw,
|
||||||
Star,
|
Star,
|
||||||
|
XCircle,
|
||||||
} from "lucide-react"
|
} from "lucide-react"
|
||||||
import Link from "next/link"
|
import Link from "next/link"
|
||||||
import { notFound } from "next/navigation"
|
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">
|
<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 && (
|
{(order.status === "in_progress" || order.status === "pending_close") && chatSession && (
|
||||||
<Button asChild>
|
<Button asChild>
|
||||||
<Link href={`/chat/${chatSession.id}`}>
|
<Link href={`/chat/${chatSession.id}`}>
|
||||||
@@ -230,9 +237,11 @@ export default async function OrderDetailPage({ params }: { params: Promise<{ id
|
|||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
{order.status === "completed" && (
|
{order.status === "completed" && (
|
||||||
<Button variant="outline">
|
<Button variant="outline" asChild>
|
||||||
<RefreshCw className="mr-1 h-4 w-4" />
|
<Link href={`/order/new?serviceId=${order.service.id}`}>
|
||||||
再来一单
|
<RefreshCw className="mr-1 h-4 w-4" />
|
||||||
|
再来一单
|
||||||
|
</Link>
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user