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:
@@ -226,7 +226,7 @@ export default function WalletPage() {
|
||||
) : filteredTransactions.length > 0 ? (
|
||||
filteredTransactions.map((tx) => {
|
||||
const Icon = typeIcons[tx.type]
|
||||
const isIncome = tx.amount > 0
|
||||
const isIncome = Number(tx.amount) > 0
|
||||
return (
|
||||
<div key={tx.id} className="flex items-center justify-between">
|
||||
<div className="flex items-center gap-3">
|
||||
@@ -242,7 +242,7 @@ export default function WalletPage() {
|
||||
</div>
|
||||
<div className="text-right">
|
||||
<p className={`text-sm font-medium ${isIncome ? "text-green-600" : ""}`}>
|
||||
{isIncome ? "+" : ""}¥{Math.abs(tx.amount).toFixed(2)}
|
||||
{isIncome ? "+" : ""}¥{Math.abs(Number(tx.amount)).toFixed(2)}
|
||||
</p>
|
||||
<Badge variant="outline" className="text-[10px]">
|
||||
{typeLabels[tx.type]}
|
||||
|
||||
Reference in New Issue
Block a user