Skip to content
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

Add check to which plan the org is changing when applying the credits #1574

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ernstmul
Copy link
Contributor

What does this PR do?

Applying credits can make an organisation switch plans. This additional check prevents an organisation from downgrading when applying credits.

Have you read the Contributing Guidelines on issues?

@coolify-appwrite-org
Copy link

coolify-appwrite-org bot commented Dec 20, 2024

The preview deployment is ready. 🟢

Open Preview | Open Build Logs

Last updated at: 2024-12-20 10:28:30 CET

@coolify-appwrite-org
Copy link

coolify-appwrite-org bot commented Dec 20, 2024

The preview deployment is ready. 🟢

Open Preview | Open Build Logs

Last updated at: 2024-12-20 10:28:38 CET

@coolify-appwrite-org
Copy link

coolify-appwrite-org bot commented Dec 20, 2024

The preview deployment is ready. 🟢

Open Preview | Open Build Logs

Last updated at: 2024-12-20 10:28:34 CET

@ernstmul ernstmul requested a review from stnguyen90 December 20, 2024 10:12
@coolify-appwrite-org
Copy link

coolify-appwrite-org bot commented Dec 20, 2024

The preview deployment is ready. 🟢

Open Preview | Open Build Logs

Last updated at: 2024-12-20 10:28:42 CET

}
}

$: billingPlan = getNewBillingPlan(selectedOrg);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ArmanNik and @TorstenDittmann might now more on Svelte best practices, but I don't think we need to create a new function for this. You can put an if statement directly here like:

$: if (execution?.errors) {
selectedResponse = 'errors';
}

Comment on lines +194 to +195
if (organization?.billingPlan === BillingPlan.SCALE) {
return BillingPlan.SCALE;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm still a bit hesitant to hardcode stuff here. For example, enterprise plans will run into a problem with this logic.

Maybe we can rely on the plan order (after it gets fixed for the education plan)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants