diff --git a/apps/web/app/[locale]/(public)/pricing/page.tsx b/apps/web/app/[locale]/(public)/pricing/page.tsx
index 186b934..eefb66e 100644
--- a/apps/web/app/[locale]/(public)/pricing/page.tsx
+++ b/apps/web/app/[locale]/(public)/pricing/page.tsx
@@ -87,10 +87,13 @@ function getFeatureValue(
key: string,
): boolean | number | string {
if (key === 'maxListings') {
- return plan.maxListings === -1 ? 'Không giới hạn' : plan.maxListings;
+ // null and -1 both signal "unlimited" (seed uses null, business logic uses -1)
+ return plan.maxListings == null || plan.maxListings === -1
+ ? 'Không giới hạn'
+ : plan.maxListings;
}
if (key === 'maxSavedSearches') {
- return plan.maxSavedSearches === -1
+ return plan.maxSavedSearches == null || plan.maxSavedSearches === -1
? 'Không giới hạn'
: plan.maxSavedSearches;
}
@@ -300,17 +303,19 @@ export default function PricingPage() {
- {plan.maxListings === -1
+ {plan.maxListings == null || plan.maxListings === -1
? t('unlimited')
- : `${plan.maxListings} ${t('listingsCount')}`}
+ : `${plan.maxListings}`}{' '}
+ {t('listingsCount')}
- {plan.maxSavedSearches === -1
+ {plan.maxSavedSearches == null || plan.maxSavedSearches === -1
? t('unlimited')
- : `${plan.maxSavedSearches} ${t('savedSearchesCount')}`}
+ : `${plan.maxSavedSearches}`}{' '}
+ {t('savedSearchesCount')}
diff --git a/apps/web/lib/subscription-api.ts b/apps/web/lib/subscription-api.ts
index 115ed78..eee3a88 100644
--- a/apps/web/lib/subscription-api.ts
+++ b/apps/web/lib/subscription-api.ts
@@ -6,8 +6,8 @@ export interface PlanDto {
name: string;
priceMonthlyVND: string;
priceYearlyVND: string;
- maxListings: number;
- maxSavedSearches: number;
+ maxListings: number | null; // null = unlimited (ENTERPRISE tier)
+ maxSavedSearches: number | null;
features: Record;
isActive: boolean;
}