From aed156f359a1f0af2f451b5d01e9ef9412f53f99 Mon Sep 17 00:00:00 2001 From: Muhsin Keloth Date: Wed, 10 Apr 2024 12:49:38 +0530 Subject: [PATCH] feat: Better SLA missed events popover (#9215) * feat: SLA events component * feat: Add SLA event item component * Update SLAPopoverCard.vue * Update SLAPopoverCard.vue * fix: Translation * Update SLAEventItem.vue * feat: complete sticky nrt * chore: code cleanup * Update SLACardLabel.vue * chore: code cleanup * chore: away click fixes * feat: use tabular nums --------- Co-authored-by: Shivam Mishra --- .../conversation/components/SLACardLabel.vue | 6 +- .../conversation/components/SLAEventItem.vue | 35 ++++++ .../components/SLAPopoverCard.vue | 102 ++++++++++++------ app/javascript/dashboard/constants/globals.js | 5 + .../i18n/locale/en/conversation.json | 6 -- .../dashboard/i18n/locale/en/sla.json | 10 +- .../reports/components/SLA/SLAViewDetails.vue | 2 +- 7 files changed, 125 insertions(+), 41 deletions(-) create mode 100644 app/javascript/dashboard/components/widgets/conversation/components/SLAEventItem.vue diff --git a/app/javascript/dashboard/components/widgets/conversation/components/SLACardLabel.vue b/app/javascript/dashboard/components/widgets/conversation/components/SLACardLabel.vue index e5514910c33ec..bdffc7e7835a7 100644 --- a/app/javascript/dashboard/components/widgets/conversation/components/SLACardLabel.vue +++ b/app/javascript/dashboard/components/widgets/conversation/components/SLACardLabel.vue @@ -5,10 +5,10 @@ :class="showExtendedInfo ? 'h-[26px] rounded-lg' : 'rounded h-5'" >
@@ -51,6 +51,7 @@ + diff --git a/app/javascript/dashboard/components/widgets/conversation/components/SLAPopoverCard.vue b/app/javascript/dashboard/components/widgets/conversation/components/SLAPopoverCard.vue index 0b457cb9aa8ab..479e2794fc238 100644 --- a/app/javascript/dashboard/components/widgets/conversation/components/SLAPopoverCard.vue +++ b/app/javascript/dashboard/components/widgets/conversation/components/SLAPopoverCard.vue @@ -1,45 +1,85 @@ diff --git a/app/javascript/dashboard/constants/globals.js b/app/javascript/dashboard/constants/globals.js index b8014ce6c9bec..fe28c9d88d2e2 100644 --- a/app/javascript/dashboard/constants/globals.js +++ b/app/javascript/dashboard/constants/globals.js @@ -59,5 +59,10 @@ export default { TYPE: 'type', SORT_ORDER: 'sort_order', }, + SLA_MISS_TYPES: { + FRT: 'frt', + NRT: 'nrt', + RT: 'rt', + }, }; export const DEFAULT_REDIRECT_URL = '/app/'; diff --git a/app/javascript/dashboard/i18n/locale/en/conversation.json b/app/javascript/dashboard/i18n/locale/en/conversation.json index 42aa7b4a43945..d6ea8f83d75c1 100644 --- a/app/javascript/dashboard/i18n/locale/en/conversation.json +++ b/app/javascript/dashboard/i18n/locale/en/conversation.json @@ -71,12 +71,6 @@ "RT": "RT {status}", "MISSED": "missed", "DUE": "due" - }, - "SLA_POPOVER": { - "FRT": "First Response Time", - "NRT": "Next Response Time", - "RT": "Resolution Time", - "MISSED": "missed on" } }, "RESOLVE_DROPDOWN": { diff --git a/app/javascript/dashboard/i18n/locale/en/sla.json b/app/javascript/dashboard/i18n/locale/en/sla.json index d47e89c052f1b..ce6e3d17e146e 100644 --- a/app/javascript/dashboard/i18n/locale/en/sla.json +++ b/app/javascript/dashboard/i18n/locale/en/sla.json @@ -83,6 +83,14 @@ "YES": "Yes, Delete ", "NO": "No, Keep " } + }, + "EVENTS": { + "TITLE": "SLA Misses", + "FRT": "First response time", + "NRT": "Next response time", + "RT": "Resolution time", + "SHOW_MORE": "{count} more", + "HIDE": "Hide {count} rows" } } -} \ No newline at end of file +} diff --git a/app/javascript/dashboard/routes/dashboard/settings/reports/components/SLA/SLAViewDetails.vue b/app/javascript/dashboard/routes/dashboard/settings/reports/components/SLA/SLAViewDetails.vue index 72bc4749a6d30..cdeda0af2e064 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/reports/components/SLA/SLAViewDetails.vue +++ b/app/javascript/dashboard/routes/dashboard/settings/reports/components/SLA/SLAViewDetails.vue @@ -13,7 +13,7 @@