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:
@@ -158,12 +158,12 @@ export default function ShopIncomePage() {
|
||||
<TableRow key={transaction.id}>
|
||||
<TableCell>
|
||||
<div className="flex items-center gap-2">
|
||||
{transaction.amount > 0 ? (
|
||||
{Number(transaction.amount) > 0 ? (
|
||||
<ArrowDownLeft className="h-4 w-4 text-green-500" />
|
||||
) : (
|
||||
<ArrowUpRight className="h-4 w-4 text-red-500" />
|
||||
)}
|
||||
<Badge variant={transaction.amount > 0 ? "default" : "secondary"}>
|
||||
<Badge variant={Number(transaction.amount) > 0 ? "default" : "secondary"}>
|
||||
{transaction.type === "topup"
|
||||
? "充值"
|
||||
: transaction.type === "payment"
|
||||
@@ -178,9 +178,9 @@ export default function ShopIncomePage() {
|
||||
</TableCell>
|
||||
<TableCell>{transaction.description}</TableCell>
|
||||
<TableCell
|
||||
className={transaction.amount > 0 ? "text-green-600" : "text-red-600"}
|
||||
className={Number(transaction.amount) > 0 ? "text-green-600" : "text-red-600"}
|
||||
>
|
||||
{transaction.amount > 0 ? "+" : ""}
|
||||
{Number(transaction.amount) > 0 ? "+" : ""}
|
||||
{transaction.amount}
|
||||
</TableCell>
|
||||
<TableCell>{new Date(transaction.createdAt).toLocaleString()}</TableCell>
|
||||
|
||||
Reference in New Issue
Block a user