fix(pages): adapt all pages to backend-aligned types

Replace removed fields with available data sources throughout UI:
- order pages: use service.title instead of consumer/player names
- chat: look up sender from session.participants, remove readonly
- community: simplify post cards, keep pinned icon
- post detail: keep pinned/linkedOrderId display
- shop rules: use string commissionValue
- dashboard: parse string amounts for income display
- dispute/review: remove initiator/avatar references
This commit is contained in:
zetaloop
2026-04-23 21:15:28 +08:00
parent 12284290cc
commit 4d8877f588
17 changed files with 153 additions and 238 deletions
+2 -6
View File
@@ -213,10 +213,8 @@ export default function DisputePage({ params }: { params: Promise<{ id: string }
}
if (existingDispute) {
const isInitiator = userId === existingDispute.initiatorId
const canRespond =
isParticipant &&
!isInitiator &&
!existingDispute.respondentReason &&
(existingDispute.status === "open" || existingDispute.status === "reviewing")
const canAppeal =
@@ -246,7 +244,7 @@ export default function DisputePage({ params }: { params: Promise<{ id: string }
<div className="flex items-center gap-2 text-sm">
<FileText className="h-4 w-4 text-muted-foreground" />
<span className="text-muted-foreground">:</span>
{existingDispute.initiatorName}
</div>
<div className="flex items-center gap-2 text-sm">
<Clock className="h-4 w-4 text-muted-foreground" />
@@ -480,9 +478,7 @@ export default function DisputePage({ params }: { params: Promise<{ id: string }
<AlertTriangle className="h-5 w-5 text-yellow-500" />
</CardTitle>
<p className="text-sm text-muted-foreground">
{order.service.title} · {order.playerName}
</p>
<p className="text-sm text-muted-foreground">{order.service.title}</p>
</CardHeader>
<CardContent className="space-y-4">
<div className="space-y-2">