From 53a352358bf96a0188e95dd48b855bd986dd9d13 Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Fri, 16 Aug 2024 19:50:19 +0530 Subject: [PATCH] fix: capture sla status change event --- frontend/src/components/SLASection.vue | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/frontend/src/components/SLASection.vue b/frontend/src/components/SLASection.vue index 4ec2af41..4c728b8a 100644 --- a/frontend/src/components/SLASection.vue +++ b/frontend/src/components/SLASection.vue @@ -5,7 +5,9 @@ :key="s.label" class="flex items-center gap-2 text-base leading-5" > -
{{ __(s.label) }}
+
+ {{ __(s.label) }} +
@@ -43,6 +45,7 @@ import { Dropdown, Tooltip } from 'frappe-ui' import { timeAgo, dateFormat, formatTime, dateTooltipFormat } from '@/utils' import { statusesStore } from '@/stores/statuses' +import { capture } from '@/telemetry' import { computed, defineModel } from 'vue' const data = defineModel() @@ -58,8 +61,8 @@ let slaSection = computed(() => { data.value.sla_status == 'Failed' ? 'red' : data.value.sla_status == 'Fulfilled' - ? 'green' - : 'orange' + ? 'green' + : 'orange' if (status == 'First Response Due') { status = timeAgo(data.value.response_by) @@ -94,11 +97,13 @@ let slaSection = computed(() => { options: communicationStatuses.data?.map((status) => ({ label: status.name, value: status.name, - onClick: () => - emit('updateField', 'communication_status', status.name), + onClick: () => { + capture('sla_status_change') + emit('updateField', 'communication_status', status.name) + }, })), }, - ] + ], ) return sections })