Merge UI into new screen

This commit is contained in:
Owen
2025-12-20 16:28:41 -05:00
committed by Owen Schwartz
parent 03d1f4bbb9
commit a9a0fbe244
5 changed files with 298 additions and 878 deletions

View File

@@ -1,22 +1,16 @@
import { build } from "@server/build";
import license from "@server/license/license";
import license from "#dynamic/license/license";
import { getOrgTierData } from "#dynamic/lib/billing";
import { TierId } from "./billing/tiers";
import { TierId } from "@server/lib/billing/tiers";
export async function isLicensedOrSubscribed(orgId: string): Promise<boolean> {
if (build === "enterprise") {
const isUnlocked = await license.isUnlocked();
if (!isUnlocked) {
return false;
}
return await license.isUnlocked();
}
if (build === "saas") {
const { tier } = await getOrgTierData(orgId);
const subscribed = tier === TierId.STANDARD;
if (!subscribed) {
return false;
}
return tier === TierId.STANDARD;
}
return true;