fix: BigInt JSON serialization, pricing table dark mode
- Add BigInt.prototype.toJSON polyfill in main.ts so Express can serialize Prisma BigInt fields (priceVND, revenue amounts) - Fix: admin/moderation and admin/revenue returning 500 Internal Error - Fix pricing compare table: Enterprise column text invisible in dark mode (bg-green-50 without dark variant → add dark:bg-green-950/40) Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,11 @@
|
|||||||
import './instrument';
|
import './instrument';
|
||||||
|
|
||||||
|
// BigInt cannot be serialized by JSON.stringify by default.
|
||||||
|
// Polyfill toJSON so Express/NestJS can serialize Prisma BigInt fields.
|
||||||
|
(BigInt.prototype as any).toJSON = function () {
|
||||||
|
return this.toString();
|
||||||
|
};
|
||||||
|
|
||||||
import { RequestMethod, ValidationPipe } from '@nestjs/common';
|
import { RequestMethod, ValidationPipe } from '@nestjs/common';
|
||||||
import { NestFactory } from '@nestjs/core';
|
import { NestFactory } from '@nestjs/core';
|
||||||
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';
|
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';
|
||||||
|
|||||||
@@ -525,7 +525,7 @@ export default function PricingPage() {
|
|||||||
className={cn(
|
className={cn(
|
||||||
'px-4 py-3 text-center text-sm font-semibold',
|
'px-4 py-3 text-center text-sm font-semibold',
|
||||||
plan.tier === 'AGENT_PRO' && 'bg-primary/5',
|
plan.tier === 'AGENT_PRO' && 'bg-primary/5',
|
||||||
isAuthenticated && plan.tier === currentTier && 'bg-green-50',
|
isAuthenticated && plan.tier === currentTier && 'bg-green-50 dark:bg-green-950/40',
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<span>{t(`tiers.${plan.tier}`)}</span>
|
<span>{t(`tiers.${plan.tier}`)}</span>
|
||||||
@@ -552,7 +552,7 @@ export default function PricingPage() {
|
|||||||
className={cn(
|
className={cn(
|
||||||
'px-4 py-3 text-center text-sm',
|
'px-4 py-3 text-center text-sm',
|
||||||
plan.tier === 'AGENT_PRO' && 'bg-primary/5',
|
plan.tier === 'AGENT_PRO' && 'bg-primary/5',
|
||||||
isAuthenticated && plan.tier === currentTier && 'bg-green-50',
|
isAuthenticated && plan.tier === currentTier && 'bg-green-50 dark:bg-green-950/40',
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{typeof val === 'boolean' ? (
|
{typeof val === 'boolean' ? (
|
||||||
|
|||||||
Reference in New Issue
Block a user