fix: exclude demo course count before showing persona

(cherry picked from commit 711d89b603)

# Conflicts:
#	frontend/src/pages/Home/Home.vue
This commit is contained in:
Jannat Patel
2026-03-06 17:51:40 +05:30
committed by Mergify
parent eda72b7cff
commit 2ae2618ce4
3 changed files with 32 additions and 4 deletions
+27
View File
@@ -71,6 +71,33 @@ const isAdmin = computed(() => {
)
})
<<<<<<< HEAD
=======
const isPersonaCaptured = async () => {
let persona = await call('frappe.client.get_single_value', {
doctype: 'LMS Settings',
field: 'persona_captured',
})
return persona
}
const identifyUserPersona = async () => {
if (user.data?.is_system_manager && !user.data?.developer_mode) {
let personaCaptured = await isPersonaCaptured()
if (personaCaptured) return
let courseCount = await call('frappe.client.get_count', {
doctype: 'LMS Course',
filters: {
title: ['not like', '%A guide to Frappe Learning%'],
},
})
if (!courseCount) {
router.push({ name: 'PersonaForm' })
}
}
}
>>>>>>> 711d89b6 (fix: exclude demo course count before showing persona)
onMounted(() => {
if (isAdmin.value) {
currentTab.value = 'instructor'
+4 -3
View File
@@ -154,7 +154,8 @@
"fieldname": "source",
"fieldtype": "Link",
"label": "Source",
"options": "LMS Source"
"options": "LMS Source",
"reqd": 1
},
{
"default": "0",
@@ -202,8 +203,8 @@
"link_fieldname": "payment"
}
],
"modified": "2026-02-03 10:54:12.361407",
"modified_by": "sayali@frappe.io",
"modified": "2026-03-06 17:38:02.235044",
"modified_by": "Administrator",
"module": "LMS",
"name": "LMS Payment",
"owner": "Administrator",
@@ -499,7 +499,7 @@
"issingle": 1,
"links": [],
"modified": "2026-03-05 13:57:56.303744",
"modified_by": "sayali@frappe.io",
"modified_by": "Administrator",
"module": "LMS",
"name": "LMS Settings",
"owner": "Administrator",