diff --git a/apps/web/src/features/platform-admin/platform-admin-page.tsx b/apps/web/src/features/platform-admin/platform-admin-page.tsx index 799b8ca4..31fd0522 100644 --- a/apps/web/src/features/platform-admin/platform-admin-page.tsx +++ b/apps/web/src/features/platform-admin/platform-admin-page.tsx @@ -885,16 +885,6 @@ export function PlatformAdminRoutePage() { () => new Intl.NumberFormat(locale, { style: 'currency', currency: 'VND' }), [locale], ); - const compactCurrency = useMemo( - () => - new Intl.NumberFormat(locale, { - style: 'currency', - currency: 'VND', - notation: 'compact', - maximumFractionDigits: 1, - }), - [locale], - ); const dateTime = useMemo( () => new Intl.DateTimeFormat(locale, { dateStyle: 'medium', timeStyle: 'short' }), [locale], @@ -965,7 +955,7 @@ export function PlatformAdminRoutePage() { {[ [ text.revenue, - compactCurrency.format(totals.settledRevenueVnd), + currency.format(totals.settledRevenueVnd), `${number.format(totals.paidOrders)} ${text.paidOrders.toLowerCase()}`, ], [ @@ -1012,7 +1002,7 @@ export function PlatformAdminRoutePage() { BUA

{text.revenueTrend}

- {compactCurrency.format(totals.settledRevenueVnd)} + {currency.format(totals.settledRevenueVnd)} = validOverview, +) { vi.stubGlobal( 'fetch', vi.fn(async (input: RequestInfo | URL) => { @@ -211,7 +214,7 @@ function stubPlatformAdminServer(feedbacks = serverFeedbacks) { status: 200, headers: { 'content-type': 'application/json' }, }); - return new Response(JSON.stringify(validOverview), { + return new Response(JSON.stringify(overview), { status: 200, headers: { 'content-type': 'application/json' }, }); @@ -234,6 +237,20 @@ function renderPlatformAdmin(initialEntry: string) { } describe('platform admin feedbacks & reviews [WEB-025, WEB-027, IAM-026]', () => { + it('shows the full settled revenue amount in every overview summary', async () => { + const overview = { + ...validOverview, + totals: { + ...(validOverview['totals'] as Record), + settledRevenueVnd: 3_129_000, + }, + }; + stubPlatformAdminServer(serverFeedbacks, overview); + renderPlatformAdmin('/vi-VN/platform-admin'); + + expect(await screen.findAllByText('3.129.000 ₫')).toHaveLength(2); + }); + it('renders navigation links with the server-authoritative feedback count badge', async () => { stubPlatformAdminServer(); renderPlatformAdmin('/vi-VN/platform-admin');