-
Notifications
You must be signed in to change notification settings - Fork 208
Remove: BillingPlan hardcoded constant #2737
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
base: billing-sdk-refactor
Are you sure you want to change the base?
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Console (appwrite/console)Project ID: Tip HTTPS and SSL certificates are handled automatically for all your Sites |
lohanidamodar
left a comment
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.
Gone through probably 30% of the files
looks generally good.
Let's also make sure to replace organization.billingPlan with organization.billingPlanId so that later migration is easier .
| </script> | ||
|
|
||
| {#if $organization?.$id && $organization?.billingPlan === BillingPlan.FREE && $readOnly && !hideBillingHeaderRoutes.includes(page.url.pathname)} | ||
| {#if $organization?.$id && !$organization?.billingPlanDetails.usage && $readOnly && !hideBillingHeaderRoutes.includes(page.url.pathname)} |
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 make sure properly with test that negation in conditions are all tested correctly. these are all very complex conditions
| let badgeType: 'success' | undefined; | ||
| $: badgeType = | ||
| $organization && $organization.billingPlan !== BillingPlan.FREE ? 'success' : undefined; | ||
| $organization && $organization.billingPlanDetails.price > 0 ? 'success' : undefined; |
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.
can't we use group here? what's the logic?
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.
yeah we can use groups here 👍

What does this PR do?
Removes the hardcoded checks.
Test Plan
N/A.
Related PRs and Issues
Have you read the Contributing Guidelines on issues?
Yes.