The Open Source DocuSign Alternative.
TypeScript digital-signaturedocument-signingdocusign-alternativee-signatureesignesignaturenext-authnextjsopen-sourcepades-standardpdfpdf-signpdf-signaturepostgresqlprismaself-hostedsigningtypescript
fix: update plans on the billing page
Mythiee62fa6cc92da
diff --git a/apps/web/src/app/(dashboard)/admin/users/page.tsx b/apps/web/src/app/(dashboard)/admin/users/page.tsxindex 1a5d2f554..78a192117 100644--- a/apps/web/src/app/(dashboard)/admin/users/page.tsx+++ b/apps/web/src/app/(dashboard)/admin/users/page.tsx@@ -19,7 +19,7 @@ export default async function AdminManageUsers({ searchParams = {} }: AdminManagconst [{ users, totalPages }, individualPrices] = await Promise.all([search(searchString, page, perPage),- getPricesByPlan(STRIPE_PLAN_TYPE.COMMUNITY).catch(() => []),+ getPricesByPlan([STRIPE_PLAN_TYPE.REGULAR, STRIPE_PLAN_TYPE.COMMUNITY]).catch(() => []),]);const individualPriceIds = individualPrices.map((price) => price.id);diff --git a/apps/web/src/app/(dashboard)/settings/billing/page.tsx b/apps/web/src/app/(dashboard)/settings/billing/page.tsxindex 7865e2b5c..e686256e0 100644--- a/apps/web/src/app/(dashboard)/settings/billing/page.tsx+++ b/apps/web/src/app/(dashboard)/settings/billing/page.tsx@@ -39,7 +39,7 @@ export default async function BillingSettingsPage() {const [subscriptions, prices, primaryAccountPlanPrices] = await Promise.all([getSubscriptionsByUserId({ userId: user.id }),- getPricesByInterval({ plan: STRIPE_PLAN_TYPE.COMMUNITY }),+ getPricesByInterval({ plan: STRIPE_PLAN_TYPE.REGULAR }),getPrimaryAccountPlanPrices(),]);diff --git a/packages/ee/server-only/stripe/get-prices-by-interval.ts b/packages/ee/server-only/stripe/get-prices-by-interval.tsindex 1b528706a..94363e5b2 100644--- a/packages/ee/server-only/stripe/get-prices-by-interval.ts+++ b/packages/ee/server-only/stripe/get-prices-by-interval.ts@@ -1,6 +1,7 @@import type Stripe from 'stripe';import { stripe } from '@documenso/lib/server-only/stripe';+import type { STRIPE_PLAN_TYPE } from '@documenso/lib/constants/billing';// Utility type to handle usage of the `expand` option.type PriceWithProduct = Stripe.Price & { product: Stripe.Product };@@ -11,7 +12,7 @@ export type GetPricesByIntervalOptions = {/*** Filter products by their meta 'plan' attribute.*/- plan?: 'community';+ plan?: STRIPE_PLAN_TYPE.COMMUNITY | STRIPE_PLAN_TYPE.REGULAR;};export const getPricesByInterval = async ({ plan }: GetPricesByIntervalOptions = {}) => {