CLASSROOMIO-T-126: Invite teacher and teacher can login

This commit is contained in:
Rotimi Best
2023-09-01 15:28:47 +01:00
parent 9d0fd56f05
commit 929edea63c
29 changed files with 498 additions and 74 deletions
+4 -1
View File
@@ -54,6 +54,7 @@ export async function getOrganizations(userId) {
`
id,
profile_id,
role_id,
organization!organizationmember_organization_id_fkey (
id,
name,
@@ -67,6 +68,7 @@ export async function getOrganizations(userId) {
.eq('profile_id', userId);
const orgsArray = [];
if (Array.isArray(data) && data.length) {
data.forEach((orgMember) => {
orgsArray.push({
@@ -77,6 +79,7 @@ export async function getOrganizations(userId) {
theme: orgMember?.organization?.theme,
avatar_url: orgMember?.organization?.avatar_url,
memberId: orgMember?.id,
role_id: orgMember?.role_id,
landingpage: orgMember?.organization?.landingpage
});
});
@@ -173,7 +176,7 @@ export async function getCurrentOrg(siteName, justGet = false) {
if (!justGet) {
currentOrg.set(data[0]);
} else {
} else if (!isEmpty(data)) {
return data[0];
}
}
+1
View File
@@ -3,6 +3,7 @@ import type { MailService } from '@sendgrid/mail';
import { SENDGRID_API_KEY } from '$env/static/private';
export const SENDGRID_FROM = 'Rotimi Best <best@classroomio.com>';
export const SENDGRID_FROM_HELP = 'ClassroomIO <help@classroomio.com>';
export let sendgrid: MailService;