From 9454bad856cc9615e8e8082899cb0b742f6a8bf7 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Sun, 8 Jun 2025 11:45:16 +0000 Subject: [PATCH] close handler --- .../enterpriseTrial.svelte | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/routes/(console)/organization-[organization]/enterpriseTrial.svelte b/src/routes/(console)/organization-[organization]/enterpriseTrial.svelte index 5cc94bde5..dff0c9f84 100644 --- a/src/routes/(console)/organization-[organization]/enterpriseTrial.svelte +++ b/src/routes/(console)/organization-[organization]/enterpriseTrial.svelte @@ -6,13 +6,22 @@ import { base } from '$app/paths'; import GradientBanner from '$lib/components/billing/gradientBanner.svelte'; import { Badge, Typography } from '@appwrite.io/pink-svelte'; + import { activeHeaderAlert } from '../store'; $: upgradeUrl = `${base}/organization-${$organization?.$id}/change-plan`; $: remainingDays = calculateEnterpriseTrial($organization); + + let show = true; + + function handleClose() { + show = false; + const now = new Date().getTime(); + localStorage.setItem($activeHeaderAlert.id, now.toString()); + } -{#if $organization?.$id && remainingDays > 0 && !hideBillingHeaderRoutes.includes(page.url.pathname)} - +{#if $organization?.$id && remainingDays > 0 && !hideBillingHeaderRoutes.includes(page.url.pathname) && show} +