From 46e12bdda4e5ee94bba8d3425dd4c0d7760b9eb7 Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Fri, 16 Aug 2024 19:29:35 +0530 Subject: [PATCH] fix: capture bulk actions event --- frontend/src/components/ListBulkActions.vue | 4 ++++ frontend/src/components/Modals/AssignmentModal.vue | 3 ++- frontend/src/components/Modals/EditValueModal.vue | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/ListBulkActions.vue b/frontend/src/components/ListBulkActions.vue index b58c02e6..e37b36c9 100644 --- a/frontend/src/components/ListBulkActions.vue +++ b/frontend/src/components/ListBulkActions.vue @@ -21,6 +21,7 @@ import EditValueModal from '@/components/Modals/EditValueModal.vue' import AssignmentModal from '@/components/Modals/AssignmentModal.vue' import { setupListActions, createToast } from '@/utils' import { globalStore } from '@/stores/global' +import { capture } from '@/telemetry' import { call } from 'frappe-ui' import { ref, onMounted } from 'vue' import { useRouter } from 'vue-router' @@ -69,6 +70,7 @@ function convertToDeal(selections, unselectAll) { label: __('Convert'), variant: 'solid', onClick: (close) => { + capture('bulk_convert_to_deal') Array.from(selections).forEach((name) => { call('crm.fcrm.doctype.crm_lead.crm_lead.convert_to_deal', { lead: name, @@ -103,6 +105,7 @@ function deleteValues(selections, unselectAll) { variant: 'solid', theme: 'red', onClick: (close) => { + capture('bulk_delete') call('frappe.desk.reportview.delete_items', { items: JSON.stringify(Array.from(selections)), doctype: props.doctype, @@ -145,6 +148,7 @@ function clearAssignemnts(selections, unselectAll) { variant: 'solid', theme: 'red', onClick: (close) => { + capture('bulk_clear_assignment') call('frappe.desk.form.assign_to.remove_multiple', { doctype: props.doctype, names: JSON.stringify(Array.from(selections)), diff --git a/frontend/src/components/Modals/AssignmentModal.vue b/frontend/src/components/Modals/AssignmentModal.vue index 7eb54e19..d11663fa 100644 --- a/frontend/src/components/Modals/AssignmentModal.vue +++ b/frontend/src/components/Modals/AssignmentModal.vue @@ -161,8 +161,8 @@ function updateAssignees() { } if (addedAssignees.length) { - capture('assign_to', { doctype: props.doctype }) if (props.docs.size) { + capture('bulk_assign_to', { doctype: props.doctype }) call('frappe.desk.form.assign_to.add_multiple', { doctype: props.doctype, name: JSON.stringify(Array.from(props.docs)), @@ -173,6 +173,7 @@ function updateAssignees() { emit('reload') }) } else { + capture('assign_to', { doctype: props.doctype }) call('frappe.desk.form.assign_to.add', { doctype: props.doctype, name: props.doc.name, diff --git a/frontend/src/components/Modals/EditValueModal.vue b/frontend/src/components/Modals/EditValueModal.vue index 039f4eca..9a39e3af 100644 --- a/frontend/src/components/Modals/EditValueModal.vue +++ b/frontend/src/components/Modals/EditValueModal.vue @@ -36,6 +36,7 @@