CLASSROOMIO-T-150: Add teacher to course + linear lesson content

clean up

CLASSROOMIO-T-150: Notify teacher they have been added

Make lesson content be linear on preview mode

CLASSROOMIO-T-150: Add teachers with a dropdown to course


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


Merge-request: CLASSROOMIO-MR-69
Merged-by: Best Admin <[email protected]>
This commit is contained in:
Rotimi Best
2023-09-07 10:47:25 +00:00
committed by Space Cloud
co-authored by Rotimi Best
parent b075bbc5de
commit 7523e6c3e7
23 changed files with 511 additions and 192 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
export function toggleBodyByTheme(isDark) {
export function toggleBodyByMode(isDark) {
if (!document) return;
if (isDark) {
+1
View File
@@ -9,5 +9,6 @@ export function setTheme(theme: string) {
// In case theme already exists in dom, don't add
if (document.body.className.includes(theme)) return;
localStorage.setItem('theme', theme);
document.body.className = document.body.className.concat(' ', theme);
}
+6 -4
View File
@@ -1,5 +1,6 @@
import get from 'lodash/get';
import isEmpty from 'lodash/isEmpty';
import { get } from 'svelte/store';
import { goto } from '$app/navigation';
import { supabase } from '$lib/utils/functions/supabase';
import { orgs, currentOrg, orgAudience, orgTeam } from '$lib/utils/store/org';
@@ -30,9 +31,10 @@ export async function getOrgTeam(orgId) {
data.forEach((teamMember) => {
team.push({
id: teamMember.id,
email: teamMember?.profile?.email || teamMember?.email,
verified: teamMember?.verified,
email: teamMember?.profile?.email || teamMember.email,
verified: teamMember.verified,
profileId: teamMember?.profile?.id,
fullname: teamMember?.profile?.fullname || '',
role: ROLE_LABEL[teamMember?.role_id] || '',
isAdmin: teamMember?.role_id === ROLE.ADMIN
});
@@ -42,7 +44,7 @@ export async function getOrgTeam(orgId) {
}
return {
team,
team: get(orgTeam),
error
};
}
+1 -1
View File
@@ -3,7 +3,7 @@ import type { MailService } from '@sendgrid/mail';
import { SENDGRID_API_KEY } from '$env/static/private';
export const SENDGRID_FROM = 'Rotimi Best <[email protected]>';
export const SENDGRID_FROM_HELP = 'ClassroomIO <help@classroomio.com>';
export const SENDGRID_FROM_NOTIFY = 'ClassroomIO <notify@classroomio.com>';
export let sendgrid: MailService;
+2 -2
View File
@@ -1,7 +1,7 @@
import { writable, derived } from 'svelte/store';
import { STEPS } from '../constants/quiz';
import type { Writable } from 'svelte/store';
import type { CurrentOrg } from '../types/org';
import type { CurrentOrg, OrgTeamMember } from '../types/org';
export const orgs = writable([]);
export const currentOrg: Writable<CurrentOrg> = writable({
@@ -16,7 +16,7 @@ export const currentOrg: Writable<CurrentOrg> = writable({
theme: ''
});
export const orgAudience = writable([]);
export const orgTeam = writable([]);
export const orgTeam = writable<OrgTeamMember[]>([]);
export const currentOrgPath = derived(currentOrg, ($currentOrg) =>
$currentOrg.siteName ? `/org/${$currentOrg.siteName}` : ''
);
+10
View File
@@ -9,3 +9,13 @@ export interface CurrentOrg {
landingpage: {};
theme: string;
}
export interface OrgTeamMember {
id: number;
email: string;
verified: boolean;
profileId?: string;
fullname: string;
role: string;
isAdmin: boolean;
}