CLASSROOMIO-T-133: Send welcome email after onboarding

Co-authored-by: Rotimi Best <[email protected]>


Merge-request: CLASSROOMIO-MR-55
Merged-by: Best Admin <[email protected]>
This commit is contained in:
Rotimi Best
2023-08-26 11:58:57 +00:00
committed by Space Cloud
co-authored by Rotimi Best
parent b979da3db1
commit 7a5d341865
11 changed files with 352 additions and 45 deletions
+6
View File
@@ -10,6 +10,7 @@
import { blockedSubdomain } from '$lib/utils/constants/app';
import { welcomeModalStore } from '$lib/components/WelcomeModal/store';
import { getOrganizations } from '$lib/utils/services/org';
import { sendWelcomeEmail } from './utils';
interface OnboardingField {
fullname?: string;
@@ -80,6 +81,7 @@
const payload = await response.json();
fields.metadata = payload;
}
function setOrgSiteName(orgName: string | undefined, isTouched: boolean) {
if (!orgName || isTouched) return;
let inputElement = event?.target as HTMLInputElement;
@@ -177,6 +179,10 @@
.match({ id: $profile.id });
loading = false;
if (fields.fullname) {
sendWelcomeEmail($profile.email, fields.fullname);
}
console.log('data', data);
console.log('error', error);
$welcomeModalStore.open = true;