mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
Use constant
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
import { base } from '$app/paths';
|
||||
import { page } from '$app/stores';
|
||||
import { trackEvent } from '$lib/actions/analytics';
|
||||
import { BillingPlan } from '$lib/constants';
|
||||
import { BillingPlan, NEW_DEV_PRO_UPGRADE_CUPON } from '$lib/constants';
|
||||
import { Button } from '$lib/elements/forms';
|
||||
import { organization } from '$lib/stores/organization';
|
||||
import { activeHeaderAlert } from '$routes/(console)/store';
|
||||
@@ -29,7 +29,7 @@
|
||||
secondary
|
||||
fullWidthMobile
|
||||
class="u-line-height-1"
|
||||
href={`${base}/apply-credit?code=appw50&org=${$organization.$id}`}
|
||||
href={`${base}/apply-credit?code=${NEW_DEV_PRO_UPGRADE_CUPON}&org=${$organization.$id}`}
|
||||
on:click={() => {
|
||||
trackEvent('click_credits_redeem', {
|
||||
from: 'button',
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
export const PAGE_LIMIT = 12; // default page limit
|
||||
export const CARD_LIMIT = 6; // default card limit
|
||||
export const INTERVAL = 5 * 60000; // default interval to check for feedback
|
||||
export const NEW_DEV_PRO_UPGRADE_CUPON = 'appw50';
|
||||
|
||||
export enum Dependencies {
|
||||
FACTORS = 'dependency:factors',
|
||||
|
||||
@@ -22,7 +22,7 @@ import { goto } from '$app/navigation';
|
||||
import { base } from '$app/paths';
|
||||
import { activeHeaderAlert, orgMissingPaymentMethod } from '$routes/(console)/store';
|
||||
import MarkedForDeletion from '$lib/components/billing/alerts/markedForDeletion.svelte';
|
||||
import { BillingPlan } from '$lib/constants';
|
||||
import { BillingPlan, NEW_DEV_PRO_UPGRADE_CUPON } from '$lib/constants';
|
||||
import PaymentMandate from '$lib/components/billing/alerts/paymentMandate.svelte';
|
||||
import MissingPaymentMethod from '$lib/components/billing/alerts/missingPaymentMethod.svelte';
|
||||
import LimitReached from '$lib/components/billing/alerts/limitReached.svelte';
|
||||
@@ -465,7 +465,7 @@ export async function checkForNewDevUpgradePro(org: Organization) {
|
||||
if (isDismissed) return;
|
||||
// check if coupon already applied
|
||||
try {
|
||||
await sdk.forConsole.billing.getCoupon('appw50');
|
||||
await sdk.forConsole.billing.getCoupon(NEW_DEV_PRO_UPGRADE_CUPON);
|
||||
} catch (e) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user