Skip to content

Commit 31ac533

Browse files
committed
use supportPlan instead of billingPlan for support tickets
1 parent cf53184 commit 31ac533

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

apps/dashboard/src/@/api/team.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export type Team = {
2424
image?: string;
2525
billingPlan: "pro" | "growth" | "free" | "starter";
2626
billingStatus: "validPayment" | (string & {}) | null;
27+
supportPlan: "pro" | "growth" | "free" | "starter";
2728
billingEmail: string | null;
2829
growthTrialEligible: false;
2930
enabledScopes: EnabledTeamScope[];

apps/dashboard/src/app/(dashboard)/support/create-ticket/components/create-ticket.action.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,10 @@ export async function createTicketAction(
9898
loginRedirect("/support");
9999
}
100100

101-
const customerId = isValidPlan(team.billingPlan)
102-
? planToCustomerId[team.billingPlan]
103-
: undefined;
101+
const customerId = isValidPlan(team.supportPlan)
102+
? planToCustomerId[team.supportPlan]
103+
: // fallback to "free" tier
104+
planToCustomerId.free;
104105

105106
const product = formData.get("product")?.toString() || "";
106107
const problemArea = formData.get("extraInfo_Problem_Area")?.toString() || "";

0 commit comments

Comments
 (0)