Skip to content

Commit

Permalink
credit support from plan
Browse files Browse the repository at this point in the history
  • Loading branch information
lohanidamodar committed Dec 24, 2024
1 parent 723da2c commit 3c1c4ed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/lib/sdk/billing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ export type Plan = {
backupsEnabled: boolean;
backupPolicies: number;
emailBranding: boolean;
supportsCredit: boolean;
};

export type PlansInfo = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
</CollapsibleItem>
{/if}

{#if $organization?.billingPlan !== BillingPlan.FREE && availableCredit > 0}
{#if currentPlan.supportsCredit && availableCredit > 0}
<CollapsibleItem noContent gap={4}>
<span class="body-text-2 u-flex u-cross-center u-gap-2"
><svg
Expand Down Expand Up @@ -206,7 +206,7 @@
<div class="u-flex u-gap-16 u-flex-wrap">
<Button
text
disabled={$organization?.markedForDeletion}
disabled={($organization?.markedForDeletion || $organization.billingPlanDowngrade !== null)}
href={$upgradeURL}
on:click={() =>
trackEvent('click_organization_plan_update', {
Expand Down

0 comments on commit 3c1c4ed

Please sign in to comment.