From d232fb5e92488ee1a9b32f48cb00fe8c272ea314 Mon Sep 17 00:00:00 2001
From: ernstmul
Date: Mon, 16 Dec 2024 14:23:03 +0100
Subject: [PATCH] Set todo's for changeing
---
src/lib/components/support.svelte | 2 ++
src/lib/layout/containerButton.svelte | 1 +
.../organization-[organization]/billing/budgetCap.svelte | 1 +
.../(console)/project-[project]/auth/templates/+page.svelte | 1 +
.../databases/database-[database]/backups/+page.svelte | 2 ++
5 files changed, 7 insertions(+)
diff --git a/src/lib/components/support.svelte b/src/lib/components/support.svelte
index 66d922d41..1f57ba233 100644
--- a/src/lib/components/support.svelte
+++ b/src/lib/components/support.svelte
@@ -13,6 +13,7 @@
export let show = false;
+ // TODO: fix to use plan details with 'premiumSupport' property
$: isPaid =
$organization?.billingPlan === BillingPlan.PRO ||
$organization?.billingPlan === BillingPlan.SCALE;
@@ -30,6 +31,7 @@
{/if}
+
{#if $organization?.billingPlan === BillingPlan.FREE}
+
{#if $organization?.billingPlan === BillingPlan.FREE}
diff --git a/src/routes/(console)/project-[project]/auth/templates/+page.svelte b/src/routes/(console)/project-[project]/auth/templates/+page.svelte
index 369080543..6b10dc048 100644
--- a/src/routes/(console)/project-[project]/auth/templates/+page.svelte
+++ b/src/routes/(console)/project-[project]/auth/templates/+page.svelte
@@ -268,6 +268,7 @@
-->
+
{#if isCloud && $organization?.billingPlan === BillingPlan.FREE}
{/if}
diff --git a/src/routes/(console)/project-[project]/databases/database-[database]/backups/+page.svelte b/src/routes/(console)/project-[project]/databases/database-[database]/backups/+page.svelte
index a8837be15..d449d5a32 100644
--- a/src/routes/(console)/project-[project]/databases/database-[database]/backups/+page.svelte
+++ b/src/routes/(console)/project-[project]/databases/database-[database]/backups/+page.svelte
@@ -24,12 +24,14 @@
let policyCreateError: string;
let totalPolicies: UserBackupPolicy[] = [];
+ // TODO: check the plan to see if the custom policies are disabled
let isDisabled = isSelfHosted || (isCloud && $organization?.billingPlan === BillingPlan.FREE);
export let data: PageData;
$: hasPolicyCreationLimitations = () => {
// allow when on Pro and no policy exists
+ // TODO: check the plan to see if the custom policies are disabled and limitations
if ($organization?.billingPlan === BillingPlan.PRO) {
return data.policies.total > 0;
} else if ($organization?.billingPlan === BillingPlan.SCALE) {