fix: capture sla status change event
This commit is contained in:
parent
b8cde2a465
commit
53a352358b
@ -5,7 +5,9 @@
|
|||||||
:key="s.label"
|
:key="s.label"
|
||||||
class="flex items-center gap-2 text-base leading-5"
|
class="flex items-center gap-2 text-base leading-5"
|
||||||
>
|
>
|
||||||
<div class="sm:w-[106px] w-36 text-sm text-gray-600">{{ __(s.label) }}</div>
|
<div class="sm:w-[106px] w-36 text-sm text-gray-600">
|
||||||
|
{{ __(s.label) }}
|
||||||
|
</div>
|
||||||
<div class="grid min-h-[28px] items-center">
|
<div class="grid min-h-[28px] items-center">
|
||||||
<Tooltip v-if="s.tooltipText" :text="__(s.tooltipText)">
|
<Tooltip v-if="s.tooltipText" :text="__(s.tooltipText)">
|
||||||
<div class="ml-2 cursor-pointer">
|
<div class="ml-2 cursor-pointer">
|
||||||
@ -43,6 +45,7 @@
|
|||||||
import { Dropdown, Tooltip } from 'frappe-ui'
|
import { Dropdown, Tooltip } from 'frappe-ui'
|
||||||
import { timeAgo, dateFormat, formatTime, dateTooltipFormat } from '@/utils'
|
import { timeAgo, dateFormat, formatTime, dateTooltipFormat } from '@/utils'
|
||||||
import { statusesStore } from '@/stores/statuses'
|
import { statusesStore } from '@/stores/statuses'
|
||||||
|
import { capture } from '@/telemetry'
|
||||||
import { computed, defineModel } from 'vue'
|
import { computed, defineModel } from 'vue'
|
||||||
|
|
||||||
const data = defineModel()
|
const data = defineModel()
|
||||||
@ -58,8 +61,8 @@ let slaSection = computed(() => {
|
|||||||
data.value.sla_status == 'Failed'
|
data.value.sla_status == 'Failed'
|
||||||
? 'red'
|
? 'red'
|
||||||
: data.value.sla_status == 'Fulfilled'
|
: data.value.sla_status == 'Fulfilled'
|
||||||
? 'green'
|
? 'green'
|
||||||
: 'orange'
|
: 'orange'
|
||||||
|
|
||||||
if (status == 'First Response Due') {
|
if (status == 'First Response Due') {
|
||||||
status = timeAgo(data.value.response_by)
|
status = timeAgo(data.value.response_by)
|
||||||
@ -94,11 +97,13 @@ let slaSection = computed(() => {
|
|||||||
options: communicationStatuses.data?.map((status) => ({
|
options: communicationStatuses.data?.map((status) => ({
|
||||||
label: status.name,
|
label: status.name,
|
||||||
value: status.name,
|
value: status.name,
|
||||||
onClick: () =>
|
onClick: () => {
|
||||||
emit('updateField', 'communication_status', status.name),
|
capture('sla_status_change')
|
||||||
|
emit('updateField', 'communication_status', status.name)
|
||||||
|
},
|
||||||
})),
|
})),
|
||||||
},
|
},
|
||||||
]
|
],
|
||||||
)
|
)
|
||||||
return sections
|
return sections
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user