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

Console Feat: make budget cap nullable #1675

Merged
merged 6 commits into from
Feb 23, 2025
Merged

Conversation

lohanidamodar
Copy link
Member

What does this PR do?

  • Makes budget cap nullable and allows 0 as valid budget cap
  • Makes budget alert's enabled when when budget cap is enabled and set to > 0

Test Plan

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)

Related PRs and Issues

(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)

Have you read the Contributing Guidelines on issues?

YES

@ItzNotABug ItzNotABug self-requested a review February 18, 2025 06:18
@@ -168,7 +168,7 @@

trackEvent(Submit.OrganizationCreate, {
plan: tierToPlan(billingPlan)?.name,
budget_cap_enabled: !!billingBudget,
budget_cap_enabled: billingBudget != null,
Copy link
Member

Choose a reason for hiding this comment

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

lets use strict inequality


let capActive = false;
let budget: number;

onMount(() => {
budget = $organization?.billingBudget;
capActive = !!$organization?.billingBudget;
capActive = $organization?.billingBudget != null;
Copy link
Member

Choose a reason for hiding this comment

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

same here

Copy link
Member

Choose a reason for hiding this comment

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

!= null will be true for 0 as well

@christyjacob4 christyjacob4 merged commit 7f23bb4 into main Feb 23, 2025
5 checks passed
@christyjacob4 christyjacob4 deleted the feat-budget-nullable branch February 23, 2025 06:12
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.

3 participants