mirror of
https://github.com/frappe/lms.git
synced 2026-04-29 20:19:32 +03:00
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:
@@ -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'
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user