chore: debug join course
This commit is contained in:
+7
-3
@@ -2,8 +2,11 @@
|
|||||||
import get from 'lodash/get';
|
import get from 'lodash/get';
|
||||||
import PrimaryButton from '$lib/components/PrimaryButton/index.svelte';
|
import PrimaryButton from '$lib/components/PrimaryButton/index.svelte';
|
||||||
import getCurrencyFormatter from '$lib/utils/functions/getCurrencyFormatter';
|
import getCurrencyFormatter from '$lib/utils/functions/getCurrencyFormatter';
|
||||||
import { isCourseFree } from '$lib/utils/functions/course';
|
import {
|
||||||
import { getStudentInviteLink } from '$lib/utils/functions/course';
|
isCourseFree,
|
||||||
|
getStudentInviteLink,
|
||||||
|
calcCourseDiscount
|
||||||
|
} from '$lib/utils/functions/course';
|
||||||
import { currentOrg, currentOrgDomain } from '$lib/utils/store/org';
|
import { currentOrg, currentOrgDomain } from '$lib/utils/store/org';
|
||||||
import { goto } from '$app/navigation';
|
import { goto } from '$app/navigation';
|
||||||
import HtmlRender from '$lib/components/HTMLRender/HTMLRender.svelte';
|
import HtmlRender from '$lib/components/HTMLRender/HTMLRender.svelte';
|
||||||
@@ -12,7 +15,6 @@
|
|||||||
import { ROLE } from '$lib/utils/constants/roles';
|
import { ROLE } from '$lib/utils/constants/roles';
|
||||||
import { capturePosthogEvent } from '$lib/utils/services/posthog';
|
import { capturePosthogEvent } from '$lib/utils/services/posthog';
|
||||||
import { t } from '$lib/utils/functions/translations';
|
import { t } from '$lib/utils/functions/translations';
|
||||||
import { calcCourseDiscount } from '$lib/utils/functions/course';
|
|
||||||
|
|
||||||
export let className = '';
|
export let className = '';
|
||||||
export let editMode = false;
|
export let editMode = false;
|
||||||
@@ -35,8 +37,10 @@
|
|||||||
course_cost: courseData.cost,
|
course_cost: courseData.cost,
|
||||||
course_free: isFree
|
course_free: isFree
|
||||||
});
|
});
|
||||||
|
console.log('$currentOrg', $currentOrg);
|
||||||
if (isFree) {
|
if (isFree) {
|
||||||
const link = getStudentInviteLink(courseData, $currentOrg.siteName, $currentOrgDomain);
|
const link = getStudentInviteLink(courseData, $currentOrg.siteName, $currentOrgDomain);
|
||||||
|
console.log('link', link);
|
||||||
goto(link);
|
goto(link);
|
||||||
} else {
|
} else {
|
||||||
openModal = true;
|
openModal = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user