-
Notifications
You must be signed in to change notification settings - Fork 8.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Disable custom templates for trialing teams #18748
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useHasPaidPlan
is used in other parts of the app that don't require an active team subscription so let's create a new hook to only check for an active team plan
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Skipped Deployments
|
Graphite Automations"Add consumer team as reviewer" took an action on this PR • (01/19/25)1 reviewer was added to this PR based on Keith Williams's automation. |
E2E results are ready! |
id: input.teamId, | ||
members: { | ||
some: { | ||
userId: userId, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should also add accepted: true
My main concern with this approach is that we're introducing a Stripe overhead in the check. I'd recommend an alternative approach where we check the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's merge 👍
* Create `checkIfTeamHasActivePlan` method on `stripe-billing-service` * Add `checkIfTeamPlanIsActive` to `InternalTeamBilling` * Create `hasActiveTeamPlan` trpc endpoint * Check for active team plan when updating workflows * Create `useHasActiveTeamPlan` hook * Use `useHasActiveTeamPlan` on workflow edit page * Type fixes * Type fix * Add `accepted` to team query
const { step, form, reload, setReload, teamId } = props; | ||
const { data: _verifiedNumbers } = trpc.viewer.workflows.getVerifiedNumbers.useQuery( | ||
{ teamId }, | ||
{ enabled: !!teamId } | ||
); | ||
|
||
const { hasActiveTeamPlan } = useHasActiveTeamPlan(teamId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@joeauyeung Now we only allow custom templates on team workflows but not on User workflows for user's that are part of a team or org
What does this PR do?
Builds off of #18635
https://www.loom.com/share/3701b3a6ab5f4632b2420072f00b0c7d
Mandatory Tasks (DO NOT REMOVE)
How should this be tested?
Checklist