CLASSROOMIO-T-152: Extra improvements
This commit is contained in:
@@ -42,7 +42,6 @@
|
||||
formatter = getCurrencyFormatter(currency);
|
||||
}
|
||||
|
||||
$: console.log('courseData.currency', courseData.currency);
|
||||
$: setFormatter(courseData.currency);
|
||||
$: discount = get(courseData, 'metadata.discount', 0);
|
||||
$: calculatedCost = calcDisc(discount, courseData.cost || 0);
|
||||
|
||||
@@ -82,7 +82,8 @@ export let landingPageSettings: Writable<OrgLandingPageJson> = writable({
|
||||
title: 'Our Story',
|
||||
content:
|
||||
'Lorem ipsum dolor sit, amet consectetur adipisicing elit. Repudiandae, quaerat cum. Ullam similique quae dicta ipsum atque quam fugit iusto eligendi magni voluptatum aut, exercitationem deserunt vitae iste rem sunt!\nLorem ipsum, dolor sit amet consectetur adipisicing elit. Maiores obcaecati veritatis tenetur in, nihil repellat quasi cumque sed molestias id reiciendis harum doloremque minus fugit quia cum dolores quas pariatur.',
|
||||
imageUrl: '',
|
||||
imageUrl:
|
||||
'https://koxqonvbkeakwvmdegcf.supabase.co/storage/v1/object/public/avatars/landingpage/riverside.jpeg',
|
||||
show: true
|
||||
},
|
||||
courses: {
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
<input
|
||||
style="display:none"
|
||||
type="file"
|
||||
accept=".jpg, .jpeg, .png"
|
||||
accept=".jpg, .jpeg, .png, .webp"
|
||||
on:change={(e) => onFileSelected(e)}
|
||||
bind:this={fileinput}
|
||||
/>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
>
|
||||
<Editor {courseId} bind:course={courseData} />
|
||||
<div class="rightBar">
|
||||
<CourseLandingPage bind:courseData />
|
||||
<CourseLandingPage bind:courseData editMode={true} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
import { SIGNUP_FIELDS } from '$lib/utils/constants/authentication';
|
||||
import AuthUI from '$lib/components/AuthUI/index.svelte';
|
||||
import { profile } from '$lib/utils/store/user';
|
||||
import { currentOrg } from '$lib/utils/store/org';
|
||||
|
||||
let supabase = getSupabase();
|
||||
let fields = Object.assign({}, SIGNUP_FIELDS);
|
||||
@@ -53,7 +54,11 @@
|
||||
throw 'Error creating user';
|
||||
}
|
||||
|
||||
if (!$currentOrg.id) return;
|
||||
|
||||
const [regexUsernameMatch] = [...(authUser.email?.matchAll(/(.*)@/g) || [])];
|
||||
const response = await fetch('https://api.ipregistry.co/?key=tryout');
|
||||
const metadata = await response.json();
|
||||
|
||||
const profileRes = await supabase
|
||||
.from('profile')
|
||||
@@ -61,7 +66,8 @@
|
||||
id: authUser.id,
|
||||
username: regexUsernameMatch[1] + `${new Date().getTime()}`,
|
||||
fullname: regexUsernameMatch[1],
|
||||
email: authUser.email
|
||||
email: authUser.email,
|
||||
metadata
|
||||
})
|
||||
.select();
|
||||
console.log('profileRes', profileRes);
|
||||
@@ -77,12 +83,10 @@
|
||||
if (redirect) {
|
||||
goto(redirect);
|
||||
} else {
|
||||
goto('/');
|
||||
goto('/login');
|
||||
}
|
||||
|
||||
formRef?.reset();
|
||||
|
||||
// return goto('/login' + $page.url.search);
|
||||
success = true;
|
||||
fields = Object.assign({}, SIGNUP_FIELDS);
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user