diff --git a/frontend/src/components/AppSidebar.vue b/frontend/src/components/AppSidebar.vue
index 49f33da6..1b796b20 100644
--- a/frontend/src/components/AppSidebar.vue
+++ b/frontend/src/components/AppSidebar.vue
@@ -100,7 +100,7 @@ import { ChevronRight, Plus } from 'lucide-vue-next'
import { createResource, Button } from 'frappe-ui'
import PageModal from '@/components/Modals/PageModal.vue'
-const { user } = sessionStore()
+const { user, sidebarSettings } = sessionStore()
const { userResource } = usersStore()
const socket = inject('$socket')
const unreadCount = ref(0)
@@ -115,6 +115,20 @@ onMounted(() => {
unreadNotifications.reload()
})
addNotifications()
+ sidebarSettings.reload(
+ {},
+ {
+ onSuccess(data) {
+ Object.keys(data).forEach((key) => {
+ if (!parseInt(data[key])) {
+ sidebarLinks.value = sidebarLinks.value.filter(
+ (link) => link.label.toLowerCase().split(' ').join('_') !== key
+ )
+ }
+ })
+ },
+ }
+ )
})
const unreadNotifications = createResource({
@@ -153,21 +167,6 @@ const addNotifications = () => {
}
}
-const sidebarSettings = createResource({
- url: 'lms.lms.api.get_sidebar_settings',
- cache: 'Sidebar Settings',
- auto: true,
- onSuccess(data) {
- Object.keys(data).forEach((key) => {
- if (!parseInt(data[key])) {
- sidebarLinks.value = sidebarLinks.value.filter(
- (link) => link.label.toLowerCase().split(' ').join('_') !== key
- )
- }
- })
- },
-})
-
const openPageModal = (link) => {
showPageModal.value = true
pageToEdit.value = link
diff --git a/frontend/src/components/CourseOutline.vue b/frontend/src/components/CourseOutline.vue
index 2a7ff7c2..e5d3a98b 100644
--- a/frontend/src/components/CourseOutline.vue
+++ b/frontend/src/components/CourseOutline.vue
@@ -50,7 +50,7 @@