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 -2
View File
@@ -25,7 +25,7 @@ export default async function ShopPage({ params }: PageProps) {
const [shopPlayers, allServices] = await Promise.all([listPlayersByShop(shop.id), listServices()])
const playerIds = shopPlayers.map((p) => p.id)
const shopServices = allServices.filter((s) => playerIds.includes(s.playerId))
const shopReviews = (await listReviews()).filter((r) => playerIds.includes(r.toUserId))
const shopReviews = await listReviews()
const sortedSections = [...shop.templateConfig.sections]
.filter((s) => s.enabled)
.sort((a, b) => a.order - b.order)
@@ -234,7 +234,7 @@ export default async function ShopPage({ params }: PageProps) {
<CardContent className="pt-6">
<div className="flex gap-4">
<Avatar>
<AvatarImage src={review.fromUserAvatar} />
<AvatarImage src="" />
<AvatarFallback>{review.fromUserName[0]}</AvatarFallback>
</Avatar>
<div className="flex-1 space-y-1">