CLASSROOMIO-T-133: Send welcome email after onboarding
Co-authored-by: Rotimi Best <rotimiibitoyeemma@gmail.com> Merge-request: CLASSROOMIO-MR-55 Merged-by: Best Admin <best@digdippa.com>
This commit is contained in:
committed by
Space Cloud
co-authored by
Rotimi Best
parent
b979da3db1
commit
7a5d341865
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user