diff --git a/src/components/plans/PlanSettingsSection.tsx b/src/components/plans/PlanSettingsSection.tsx index ff698cd824..b77237808d 100644 --- a/src/components/plans/PlanSettingsSection.tsx +++ b/src/components/plans/PlanSettingsSection.tsx @@ -33,6 +33,7 @@ gql` description interval name + selfServe taxes { ...TaxForPlanSettingsSection } @@ -175,6 +176,15 @@ export const PlanSettingsSection = ({ )} + + {(field) => ( + + )} + + {canApplyChargesMonthly && ( <> {hasAnyFixedCharge && ( diff --git a/src/hooks/plans/usePlanForm.tsx b/src/hooks/plans/usePlanForm.tsx index 42cf6b604f..e6070a14ea 100644 --- a/src/hooks/plans/usePlanForm.tsx +++ b/src/hooks/plans/usePlanForm.tsx @@ -104,6 +104,9 @@ const buildDefaultValues = ( taxes: plan?.taxes || [], invoiceDisplayName: plan?.invoiceDisplayName || undefined, payInAdvance: plan?.payInAdvance || false, + // Default new plans to visible in the customer portal; false hides them + // from self-serve while keeping them operator-assignable. + selfServe: plan?.selfServe ?? true, amountCents: isNaN(plan?.amountCents) ? '0' : String(deserializeAmount(plan?.amountCents || 0, initialCurrency)), diff --git a/src/pages/CreatePlan.tsx b/src/pages/CreatePlan.tsx index 2ea9e60409..2a6aaf1f5d 100644 --- a/src/pages/CreatePlan.tsx +++ b/src/pages/CreatePlan.tsx @@ -81,6 +81,7 @@ gql` description interval payInAdvance + selfServe invoiceDisplayName amountCents amountCurrency