From 39b1b4e6a296b127fafd105bab4ac8e1a6df8eca Mon Sep 17 00:00:00 2001 From: Arman Date: Wed, 18 Oct 2023 18:43:53 +0200 Subject: [PATCH] fix: upgrade/ downgrade mesasage --- src/routes/console/changeOrganizationTierCloud.svelte | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/routes/console/changeOrganizationTierCloud.svelte b/src/routes/console/changeOrganizationTierCloud.svelte index 1e630243c..e0429dbe2 100644 --- a/src/routes/console/changeOrganizationTierCloud.svelte +++ b/src/routes/console/changeOrganizationTierCloud.svelte @@ -26,6 +26,7 @@ async function upgrade() { try { + const isUpgrade = $changeOrganizationTier.billingPlan > $organization.billingPlan; const org = await sdk.forConsole.billing.updatePlan( $organization.$id, $changeOrganizationTier.billingPlan, @@ -60,8 +61,12 @@ type: 'success', isHtml: true, message: ` - Your organization has been upgraded - Make the most of your increased resource capacity and continue building great things with Appwrite.` + Your organization has been ${isUpgrade ? 'upgraded' : 'downgraded'} + ${ + isUpgrade + ? 'Make the most of your increased resource capacity and continue building great things with Appwrite.' + : '' + }` }); trackEvent(Submit.OrganizationCreate, { customId: !!$changeOrganizationTier.id