Fixing PLans page
This commit is contained in:
@@ -655,7 +655,8 @@ export async function getAvailablePaymentMethods(): Promise<{
|
||||
const response = await fetchAPI('/v1/billing/payment-methods/');
|
||||
// Frontend guard: only allow the simplified set we currently support
|
||||
const allowed = new Set(['bank_transfer', 'manual']);
|
||||
const filtered = (response.results || []).filter((m: PaymentMethod) => allowed.has(m.type));
|
||||
const results = Array.isArray(response.results) ? response.results : [];
|
||||
const filtered = results.filter((m: PaymentMethod) => allowed.has(m.type));
|
||||
return { results: filtered, count: filtered.length };
|
||||
}
|
||||
|
||||
@@ -830,6 +831,8 @@ export interface Plan {
|
||||
interval?: 'month' | 'year';
|
||||
description?: string;
|
||||
is_active?: boolean;
|
||||
is_featured?: boolean;
|
||||
annual_discount_percent?: number;
|
||||
features?: string[];
|
||||
limits?: Record<string, any>;
|
||||
display_order?: number;
|
||||
|
||||
Reference in New Issue
Block a user