fix: don't update onboarding status if user is not system manager

This commit is contained in:
Jannat Patel
2025-04-10 15:37:59 +05:30
parent 8e405bc8eb
commit 1a5d8ce07e
17 changed files with 115 additions and 55 deletions

View File

@@ -9,15 +9,9 @@ export const useSettings = defineStore('settings', () => {
const activeTab = ref(null)
const learningPaths = createResource({
url: 'frappe.client.get_single_value',
makeParams(values) {
return {
doctype: 'LMS Settings',
field: 'enable_learning_paths',
}
},
auto: isLoggedIn ? true : false,
cache: ['learningPaths'],
url: 'lms.lms.api.is_learning_path_enabled',
auto: true,
cache: ['learningPath'],
})
const allowGuestAccess = createResource({
@@ -26,12 +20,6 @@ export const useSettings = defineStore('settings', () => {
cache: ['allowGuestAccess'],
})
/* const onboardingDetails = createResource({
url: 'lms.lms.utils.is_onboarding_complete',
auto: isLoggedIn ? true : false,
cache: ['onboardingDetails'],
}) */
return {
isSettingsOpen,
activeTab,