fix: update onboarding status when first note is created
This commit is contained in:
parent
c07aa03c47
commit
11790586da
@ -65,6 +65,7 @@
|
||||
<script setup>
|
||||
import ArrowUpRightIcon from '@/components/Icons/ArrowUpRightIcon.vue'
|
||||
import { capture } from '@/telemetry'
|
||||
import { useOnboarding } from '@/composables/onboarding'
|
||||
import { TextEditor, call } from 'frappe-ui'
|
||||
import { ref, nextTick, watch } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
@ -91,6 +92,8 @@ const emit = defineEmits(['after'])
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
const { updateOnboardingStep } = useOnboarding()
|
||||
|
||||
const title = ref(null)
|
||||
const editMode = ref(false)
|
||||
let _note = ref({})
|
||||
@ -123,6 +126,7 @@ async function updateNote() {
|
||||
},
|
||||
})
|
||||
if (d.name) {
|
||||
updateOnboardingStep('create_first_note')
|
||||
capture('note_created')
|
||||
notes.value?.reload()
|
||||
emit('after', d, true)
|
||||
|
||||
@ -86,6 +86,19 @@ const steps = reactive([
|
||||
title: 'Create your first note',
|
||||
icon: markRaw(NoteIcon),
|
||||
completed: false,
|
||||
onClick: async () => {
|
||||
minimize.value = true
|
||||
let dealName = await call('crm.api.onboarding.get_first_deal')
|
||||
if (dealName) {
|
||||
router.push({
|
||||
name: 'Deal',
|
||||
params: { dealId: dealName },
|
||||
hash: '#notes',
|
||||
})
|
||||
} else {
|
||||
router.push({ name: 'Notes' })
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'add_first_comment',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user