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 <best@classroomio.com>
This commit is contained in:
Em_Dev
2024-05-17 01:28:59 +01:00
committed by GitHub
co-authored by Rotimi Best
parent 78db68fa51
commit 73eb0ad4b1
30 changed files with 1013 additions and 200 deletions
@@ -11,11 +11,13 @@
import { NavClasses } from '$lib/utils/constants/reusableClass';
import { sideBar } from '$lib/components/Org/store';
import { t } from '$lib/utils/functions/translations';
import { currentOrg } from '$lib/utils/store/org';
interface sideLinks {
name: string;
icon: any;
link: string;
show?: () => boolean;
}
function isActive(pagePath: string, itemPath: string) {
@@ -45,14 +47,21 @@
{
name: $t('lms_navigation.exercise'),
icon: LicenseDraft,
link: '/lms/exercises'
link: '/lms/exercises',
show() {
return $currentOrg?.customization?.dashboard?.exercise;
}
},
{
name: $t('lms_navigation.community'),
icon: CommunityIcon,
link: '/lms/community'
link: '/lms/community',
show() {
return $currentOrg?.customization?.dashboard?.community;
}
}
];
].filter((link) => (link.show ? link.show() : true));
const toggleSidebar = () => {
$sideBar.hidden = !$sideBar.hidden;
};