feat: auto enroll into org as student and oauth improvements

This commit is contained in:
Rotimi Best
2026-05-20 08:32:56 +01:00
parent d21d89f250
commit 71fbb2101c
18 changed files with 482 additions and 21 deletions
@@ -4,8 +4,13 @@
import { currentOrg } from '$lib/utils/store/org';
import { Badge } from '@cio/ui/base/badge';
import { PLAN_NAMES, PLAN } from '@cio/utils/plans';
import { BRAND_ROOT_DOMAIN, TENANT_ROOT_DOMAIN } from '@cio/utils/constants';
const plan = $derived($currentOrg.plans?.[0]?.planName || PLAN.BASIC);
const utmSource = $derived(
$currentOrg.customDomain ||
($currentOrg.siteName ? `${$currentOrg.siteName}.${TENANT_ROOT_DOMAIN}` : BRAND_ROOT_DOMAIN)
);
</script>
<Sidebar.Menu>
@@ -16,7 +21,7 @@
>
{#snippet child({ props })}
<a
href="https://classroomio.com?utm_source={$currentOrg.siteName}.classroomio.com"
href="https://{BRAND_ROOT_DOMAIN}?utm_source={utmSource}"
target="_blank"
rel="noopener noreferrer"
{...props}