From 73eb0ad4b1b4dd5d2d64579968d650c6a0e4ba69 Mon Sep 17 00:00:00 2001 From: Em_Dev Date: Fri, 17 May 2024 01:28:59 +0100 Subject: [PATCH] feat: customize the LMS from dashboard (#304) * Done with the customization of the LMS task * generated custom_lms migration file * updated the migration file * copy improvements * update wording * made updates based on reviews,i hope i didnt miss anything * updated the translations and migration files * refactoring * disabled improvements for apps * more improvements * more custom improvements * pr refactoring --------- Co-authored-by: Rotimi Best --- .../src/lib/components/Apps/index.svelte | 24 ++- .../Course/components/Navigation/index.svelte | 12 +- .../Courses/components/Card/index.svelte | 9 +- .../lib/components/IconButton/index.svelte | 9 +- .../src/lib/components/LMS/SideBar.svelte | 15 +- .../Org/Settings/CustomizeLms.svelte | 184 ++++++++++++++++++ .../Org/Settings/LandingpageSettings.svelte | 4 +- .../Org/Settings/OrgSettings.svelte | 22 +++ .../src/lib/components/Org/Settings/store.ts | 1 + apps/dashboard/src/lib/utils/redirect.ts | 11 ++ .../src/lib/utils/services/org/index.ts | 3 + apps/dashboard/src/lib/utils/store/org.ts | 5 + .../src/lib/utils/translations/de.json | 69 ++++++- .../src/lib/utils/translations/en.json | 36 +++- .../src/lib/utils/translations/es.json | 69 ++++++- .../src/lib/utils/translations/fr.json | 73 ++++++- .../src/lib/utils/translations/hi.json | 69 ++++++- .../src/lib/utils/translations/pt.json | 69 ++++++- .../src/lib/utils/translations/ru.json | 69 ++++++- .../src/lib/utils/translations/vi.json | 73 ++++++- apps/dashboard/src/lib/utils/types/org.ts | 18 ++ apps/dashboard/src/routes/+layout.svelte | 17 +- .../src/routes/courses/[id]/+page.svelte | 129 ++++++------ .../routes/courses/[id]/lessons/+page.svelte | 2 +- .../lessons/[...lessonParams]/+page.svelte | 15 +- .../routes/courses/[id]/marks/+page.svelte | 162 +++++++-------- apps/dashboard/src/routes/lms/+page.svelte | 14 +- .../settings/customize-lms/+page.svelte | 24 +++ .../org/[slug]/settings/domains/+page.svelte | 5 +- .../20240516092053_customization.sql | 1 + 30 files changed, 1013 insertions(+), 200 deletions(-) create mode 100644 apps/dashboard/src/lib/components/Org/Settings/CustomizeLms.svelte create mode 100644 apps/dashboard/src/lib/utils/redirect.ts create mode 100644 apps/dashboard/src/routes/org/[slug]/settings/customize-lms/+page.svelte create mode 100644 supabase/migrations/20240516092053_customization.sql diff --git a/apps/dashboard/src/lib/components/Apps/index.svelte b/apps/dashboard/src/lib/components/Apps/index.svelte index 1dffafab..b474fe1a 100644 --- a/apps/dashboard/src/lib/components/Apps/index.svelte +++ b/apps/dashboard/src/lib/components/Apps/index.svelte @@ -17,6 +17,8 @@ import { browser } from '$app/environment'; import { course } from '$lib/components/Course/store'; import { lesson } from '$lib/components/Course/components/Lesson/store/lessons'; + import { currentOrg } from '$lib/utils/store/org'; + import { t } from '$lib/utils/functions/translations'; let appBarRef: HTMLDivElement; let appContentRef: HTMLDivElement; @@ -80,10 +82,18 @@
+
+
diff --git a/apps/dashboard/src/routes/courses/[id]/lessons/[...lessonParams]/+page.svelte b/apps/dashboard/src/routes/courses/[id]/lessons/[...lessonParams]/+page.svelte index 4a00ecea..a7921aef 100644 --- a/apps/dashboard/src/routes/courses/[id]/lessons/[...lessonParams]/+page.svelte +++ b/apps/dashboard/src/routes/courses/[id]/lessons/[...lessonParams]/+page.svelte @@ -231,6 +231,12 @@ } function handleAppClick(appName: string) { + if ($apps.selectedApp === appName) { + $apps.selectedApp = undefined; + $apps.open = false; + return; + } + $apps.selectedApp = appName; $apps.open = true; } @@ -345,7 +351,7 @@ {isStudent} /> - {#if isStudent} + {/if} -
+
@@ -390,8 +396,9 @@ {/if}