fix: check persona_captured after details get saved

This commit is contained in:
Jannat Patel
2025-04-22 15:02:21 +05:30
parent 780dfb8966
commit f1b383f0b7
5 changed files with 66 additions and 45 deletions

View File

@@ -162,8 +162,21 @@ const setCategories = (data) => {
}
}
const identifyUserPersona = () => {
if (user.data?.is_system_manager) {
const isPersonaCaptured = async () => {
let persona = await call('frappe.client.get_single_value', {
doctype: 'LMS Settings',
field: 'persona_captured',
})
return persona
}
const identifyUserPersona = async () => {
let personaCaptured = await isPersonaCaptured()
if (
user.data?.is_system_manager &&
!user.data?.developer_mode &&
!personaCaptured
) {
call('frappe.client.get_count', {
doctype: 'LMS Course',
}).then((data) => {