diff --git a/.gitignore b/.gitignore index 87930686c..a502a6d08 100644 --- a/.gitignore +++ b/.gitignore @@ -101,4 +101,5 @@ supabase/ # To load supabase # 1. Start supabase locally -# 2. Load files \ No newline at end of file +# 2. Load files +migration.sh \ No newline at end of file diff --git a/server/tests/attach/basic/basic2.ts b/server/tests/attach/basic/basic2.ts index 7bcfd4412..6e99007f8 100644 --- a/server/tests/attach/basic/basic2.ts +++ b/server/tests/attach/basic/basic2.ts @@ -45,7 +45,7 @@ describe(`${chalk.yellowBright("basic2: Testing attach pro")}`, () => { }); await completeCheckoutForm(checkout_url); - await timeout(10000); + await timeout(12000); }); it("should have correct product & entitlements", async function () { diff --git a/server/tests/attach/basic/basic9.ts b/server/tests/attach/basic/basic9.ts index 826c9553a..d9e24ea1a 100644 --- a/server/tests/attach/basic/basic9.ts +++ b/server/tests/attach/basic/basic9.ts @@ -9,7 +9,7 @@ import { compareMainProduct } from "tests/utils/compare.js"; const testCase = "basic9"; describe(`${chalk.yellowBright( - "basic9: attach monthly with one time prepaid, and quantity = 0", + "basic9: attach monthly with one time prepaid, and quantity = 0" )}`, () => { let customerId = testCase; @@ -40,7 +40,7 @@ describe(`${chalk.yellowBright( }); await completeCheckoutForm(res.checkout_url); - await timeout(10000); + await timeout(12000); }); it("should have correct main product and entitlements", async function () { diff --git a/shared/package.json b/shared/package.json index 41cac0732..05a3b7a04 100644 --- a/shared/package.json +++ b/shared/package.json @@ -19,7 +19,8 @@ "dev:bun": "bun ./index.ts --outdir dist --target bun --external zod --watch", "db:push": "bun db:generate && bun db:migrate", "db:generate": "cross-env NODE_OPTIONS=\"--import tsx\" bunx drizzle-kit generate --config drizzle.config.ts", - "db:migrate": "cross-env NODE_OPTIONS=\"--import tsx\" bunx drizzle-kit migrate --config drizzle.config.ts" + "db:migrate": "cross-env NODE_OPTIONS=\"--import tsx\" bunx drizzle-kit migrate --config drizzle.config.ts", + "db:studio": "cross-env NODE_OPTIONS=\"--import tsx\" bunx drizzle-kit studio --config drizzle.config.ts" }, "dependencies": { "date-fns": "^4.1.0", diff --git a/vite/src/utils/formatUtils/formatTextUtils.ts b/vite/src/utils/formatUtils/formatTextUtils.ts index 476a36155..99d121179 100644 --- a/vite/src/utils/formatUtils/formatTextUtils.ts +++ b/vite/src/utils/formatUtils/formatTextUtils.ts @@ -46,20 +46,22 @@ export const formatIntervalText = ({ interval, intervalCount, billingInterval, + isBillingInterval = false, }: { interval?: EntInterval; - billingInterval?: BillingInterval; intervalCount?: number; + isBillingInterval?: boolean; }) => { const finalInterval = interval ?? billingInterval; if (finalInterval == null) { return ""; } - if ( - finalInterval === EntInterval.Lifetime || - finalInterval === BillingInterval.OneOff - ) { + + if (finalInterval === BillingInterval.OneOff) { + return "one off"; + } + if (finalInterval === EntInterval.Lifetime) { return "no reset"; } if (intervalCount && intervalCount > 1) { diff --git a/vite/src/views/products/product/product-item/product-item-config/components/feature-price/SelectBillingCycle.tsx b/vite/src/views/products/product/product-item/product-item-config/components/feature-price/SelectBillingCycle.tsx index d49ce4425..171bae1cb 100644 --- a/vite/src/views/products/product/product-item/product-item-config/components/feature-price/SelectBillingCycle.tsx +++ b/vite/src/views/products/product/product-item/product-item-config/components/feature-price/SelectBillingCycle.tsx @@ -64,6 +64,7 @@ export const SelectCycle = () => { {formatIntervalText({ billingInterval: interval, intervalCount: item.interval_count, + isBillingInterval: true, })} ))}