fix: capture on lead/deal status change

This commit is contained in:
Shariq Ansari 2024-08-16 19:09:24 +05:30
parent 5f49744bd0
commit d77643b3e8

View File

@ -1,7 +1,8 @@
import IndicatorIcon from '@/components/Icons/IndicatorIcon.vue'
import { capture } from '@/telemetry'
import { defineStore } from 'pinia'
import { createListResource } from 'frappe-ui'
import { reactive, h } from 'vue'
import IndicatorIcon from '@/components/Icons/IndicatorIcon.vue'
export const statusesStore = defineStore('crm-statuses', () => {
let leadStatusesByName = reactive({})
@ -103,6 +104,7 @@ export const statusesStore = defineStore('crm-statuses', () => {
class: statusesByName[status].iconColorClass,
}),
onClick: () => {
capture('status_changed', { doctype, status })
action && action('status', statusesByName[status].name)
},
})