From 25e2b1a2937a3870226b06ffcba469fd60f9add6 Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Tue, 23 Jan 2024 14:38:25 +0530 Subject: [PATCH] fix: show SLA time taken in Status Badge to save space --- frontend/src/components/SLASection.vue | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/frontend/src/components/SLASection.vue b/frontend/src/components/SLASection.vue index ba3acf3a..297d0e2b 100644 --- a/frontend/src/components/SLASection.vue +++ b/frontend/src/components/SLASection.vue @@ -54,15 +54,6 @@ const { communicationStatuses } = statusesStore() let slaSection = computed(() => { let sections = [] - if (data.value.first_responded_on) { - sections.push({ - label: 'Fulfilled In', - type: 'Duration', - value: formatTime(data.value.first_response_time), - tooltipText: dateFormat(data.value.first_responded_on, dateTooltipFormat), - }) - } - let status = data.value.sla_status let tooltipText = status let color = @@ -84,6 +75,9 @@ let slaSection = computed(() => { status = 'less than a minute ago' } } + } else if (["Fulfilled", "Failed"].includes(status)) { + status = status + " in " + formatTime(data.value.first_response_time) + tooltipText = dateFormat(data.value.first_responded_on, dateTooltipFormat) } sections.push(