From 5ab9efc464405f554a5cad588a51739ff63c946f Mon Sep 17 00:00:00 2001 From: Muhsin Keloth Date: Wed, 27 Mar 2024 11:46:34 +0530 Subject: [PATCH 1/6] feat: Add SLA reports page --- .../layout/config/sidebarItems/reports.js | 7 +++++++ .../dashboard/i18n/locale/en/report.json | 3 +++ .../dashboard/i18n/locale/en/settings.json | 1 + .../dashboard/settings/reports/SLAReports.vue | 11 +++++++++++ .../settings/reports/reports.routes.js | 18 ++++++++++++++++++ 5 files changed, 40 insertions(+) create mode 100644 app/javascript/dashboard/routes/dashboard/settings/reports/SLAReports.vue diff --git a/app/javascript/dashboard/components/layout/config/sidebarItems/reports.js b/app/javascript/dashboard/components/layout/config/sidebarItems/reports.js index 551256c74..1e4deeb28 100644 --- a/app/javascript/dashboard/components/layout/config/sidebarItems/reports.js +++ b/app/javascript/dashboard/components/layout/config/sidebarItems/reports.js @@ -71,6 +71,13 @@ const reports = accountId => ({ toState: frontendURL(`accounts/${accountId}/reports/teams`), toStateName: 'team_reports', }, + { + icon: 'people', + label: 'REPORTS_SLA', + hasSubMenu: false, + toState: frontendURL(`accounts/${accountId}/reports/sla`), + toStateName: 'sla_reports', + }, ], }); diff --git a/app/javascript/dashboard/i18n/locale/en/report.json b/app/javascript/dashboard/i18n/locale/en/report.json index 56ca21773..b74fdb8f2 100644 --- a/app/javascript/dashboard/i18n/locale/en/report.json +++ b/app/javascript/dashboard/i18n/locale/en/report.json @@ -505,5 +505,8 @@ "THURSDAY": "Thursday", "FRIDAY": "Friday", "SATURDAY": "Saturday" + }, + "SLA_REPORTS": { + "HEADER": "SLA Reports" } } diff --git a/app/javascript/dashboard/i18n/locale/en/settings.json b/app/javascript/dashboard/i18n/locale/en/settings.json index 9a4bde2c8..3d37b7bf5 100644 --- a/app/javascript/dashboard/i18n/locale/en/settings.json +++ b/app/javascript/dashboard/i18n/locale/en/settings.json @@ -239,6 +239,7 @@ "REPORTS_LABEL": "Labels", "REPORTS_INBOX": "Inbox", "REPORTS_TEAM": "Team", + "REPORTS_SLA": "SLA", "SET_AVAILABILITY_TITLE": "Set yourself as", "SLA": "SLA", "BETA": "Beta", diff --git a/app/javascript/dashboard/routes/dashboard/settings/reports/SLAReports.vue b/app/javascript/dashboard/routes/dashboard/settings/reports/SLAReports.vue new file mode 100644 index 000000000..b917cf5ef --- /dev/null +++ b/app/javascript/dashboard/routes/dashboard/settings/reports/SLAReports.vue @@ -0,0 +1,11 @@ + + diff --git a/app/javascript/dashboard/routes/dashboard/settings/reports/reports.routes.js b/app/javascript/dashboard/routes/dashboard/settings/reports/reports.routes.js index 5e363553d..7d14eb804 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/reports/reports.routes.js +++ b/app/javascript/dashboard/routes/dashboard/settings/reports/reports.routes.js @@ -9,6 +9,7 @@ const TeamReports = () => import('./TeamReports.vue'); const CsatResponses = () => import('./CsatResponses.vue'); const BotReports = () => import('./BotReports.vue'); const LiveReports = () => import('./LiveReports.vue'); +const SLAReports = () => import('./SLAReports.vue'); export default { routes: [ @@ -151,5 +152,22 @@ export default { }, ], }, + { + path: frontendURL('accounts/:accountId/reports'), + component: SettingsContent, + props: { + headerTitle: 'SLA_REPORTS.HEADER', + icon: 'people-team', + keepAlive: false, + }, + children: [ + { + path: 'sla', + name: 'sla_reports', + roles: ['administrator'], + component: SLAReports, + }, + ], + }, ], }; From 5abe802198ea1e6661de6bdb49855951a0aaa353 Mon Sep 17 00:00:00 2001 From: Muhsin Keloth Date: Wed, 27 Mar 2024 15:24:39 +0530 Subject: [PATCH 2/6] feat: Add SLA table --- .../dashboard/settings/reports/SLAMetrics.vue | 54 ++++++++++++++++++ .../dashboard/settings/reports/SLAReports.vue | 12 +++- .../dashboard/settings/reports/SLATable.vue | 55 +++++++++++++++++++ 3 files changed, 118 insertions(+), 3 deletions(-) create mode 100644 app/javascript/dashboard/routes/dashboard/settings/reports/SLAMetrics.vue create mode 100644 app/javascript/dashboard/routes/dashboard/settings/reports/SLATable.vue diff --git a/app/javascript/dashboard/routes/dashboard/settings/reports/SLAMetrics.vue b/app/javascript/dashboard/routes/dashboard/settings/reports/SLAMetrics.vue new file mode 100644 index 000000000..90a4bbb6f --- /dev/null +++ b/app/javascript/dashboard/routes/dashboard/settings/reports/SLAMetrics.vue @@ -0,0 +1,54 @@ + + + diff --git a/app/javascript/dashboard/routes/dashboard/settings/reports/SLAReports.vue b/app/javascript/dashboard/routes/dashboard/settings/reports/SLAReports.vue index b917cf5ef..fa83baa53 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/reports/SLAReports.vue +++ b/app/javascript/dashboard/routes/dashboard/settings/reports/SLAReports.vue @@ -1,11 +1,17 @@ diff --git a/app/javascript/dashboard/routes/dashboard/settings/reports/SLATable.vue b/app/javascript/dashboard/routes/dashboard/settings/reports/SLATable.vue new file mode 100644 index 000000000..b930037cf --- /dev/null +++ b/app/javascript/dashboard/routes/dashboard/settings/reports/SLATable.vue @@ -0,0 +1,55 @@ + From d4d5734a045b52bb080379800a5e4b5f8d40f87e Mon Sep 17 00:00:00 2001 From: Muhsin Keloth Date: Wed, 27 Mar 2024 22:06:59 +0530 Subject: [PATCH 3/6] SLAMetrics.vue --- .../dashboard/i18n/locale/en/report.json | 12 ++++- .../dashboard/settings/reports/SLAMetrics.vue | 54 ------------------- .../dashboard/settings/reports/SLAReports.vue | 8 +-- .../reports/components/SLA/SLAMetricCard.vue | 38 +++++++++++++ .../reports/components/SLA/SLAMetrics.vue | 31 +++++++++++ .../reports/{ => components/SLA}/SLATable.vue | 0 6 files changed, 84 insertions(+), 59 deletions(-) delete mode 100644 app/javascript/dashboard/routes/dashboard/settings/reports/SLAMetrics.vue create mode 100644 app/javascript/dashboard/routes/dashboard/settings/reports/components/SLA/SLAMetricCard.vue create mode 100644 app/javascript/dashboard/routes/dashboard/settings/reports/components/SLA/SLAMetrics.vue rename app/javascript/dashboard/routes/dashboard/settings/reports/{ => components/SLA}/SLATable.vue (100%) diff --git a/app/javascript/dashboard/i18n/locale/en/report.json b/app/javascript/dashboard/i18n/locale/en/report.json index b74fdb8f2..6afd5cddd 100644 --- a/app/javascript/dashboard/i18n/locale/en/report.json +++ b/app/javascript/dashboard/i18n/locale/en/report.json @@ -507,6 +507,16 @@ "SATURDAY": "Saturday" }, "SLA_REPORTS": { - "HEADER": "SLA Reports" + "HEADER": "SLA Reports", + "METRICS":{ + "HIT_RATE": { + "LABEL": "Hit Rate", + "TOOLTIP": "Percentage of SLAs created were completed successfully" + }, + "NO_OF_BREACHES": { + "LABEL": "Number of Breaches", + "TOOLTIP": "The total SLA breaches in a certain period." + } + } } } diff --git a/app/javascript/dashboard/routes/dashboard/settings/reports/SLAMetrics.vue b/app/javascript/dashboard/routes/dashboard/settings/reports/SLAMetrics.vue deleted file mode 100644 index 90a4bbb6f..000000000 --- a/app/javascript/dashboard/routes/dashboard/settings/reports/SLAMetrics.vue +++ /dev/null @@ -1,54 +0,0 @@ - - - diff --git a/app/javascript/dashboard/routes/dashboard/settings/reports/SLAReports.vue b/app/javascript/dashboard/routes/dashboard/settings/reports/SLAReports.vue index fa83baa53..f5dce84ed 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/reports/SLAReports.vue +++ b/app/javascript/dashboard/routes/dashboard/settings/reports/SLAReports.vue @@ -1,12 +1,12 @@ + + diff --git a/app/javascript/dashboard/routes/dashboard/settings/reports/components/SLA/SLAMetrics.vue b/app/javascript/dashboard/routes/dashboard/settings/reports/components/SLA/SLAMetrics.vue new file mode 100644 index 000000000..848ea081c --- /dev/null +++ b/app/javascript/dashboard/routes/dashboard/settings/reports/components/SLA/SLAMetrics.vue @@ -0,0 +1,31 @@ + + + diff --git a/app/javascript/dashboard/routes/dashboard/settings/reports/SLATable.vue b/app/javascript/dashboard/routes/dashboard/settings/reports/components/SLA/SLATable.vue similarity index 100% rename from app/javascript/dashboard/routes/dashboard/settings/reports/SLATable.vue rename to app/javascript/dashboard/routes/dashboard/settings/reports/components/SLA/SLATable.vue From e243eb619a5f9256a9ac06cdf6869a71cc68cfe0 Mon Sep 17 00:00:00 2001 From: Muhsin Keloth Date: Wed, 27 Mar 2024 22:41:03 +0530 Subject: [PATCH 4/6] Update SLATable.vue --- .../dashboard/settings/reports/components/SLA/SLATable.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/javascript/dashboard/routes/dashboard/settings/reports/components/SLA/SLATable.vue b/app/javascript/dashboard/routes/dashboard/settings/reports/components/SLA/SLATable.vue index b930037cf..8fb5df3dd 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/reports/components/SLA/SLATable.vue +++ b/app/javascript/dashboard/routes/dashboard/settings/reports/components/SLA/SLATable.vue @@ -37,6 +37,7 @@ class="flex items-center col-span-6 px-0 py-2 text-sm tracking-[0.5] text-slate-700 dark:text-slate-100 rtl:text-right" > #198 with John Doe +
+ + From 5a9a9e3b5387e10bbbfa31bbe63d874ca6cc0a09 Mon Sep 17 00:00:00 2001 From: Muhsin Keloth Date: Thu, 28 Mar 2024 15:12:45 +0530 Subject: [PATCH 5/6] Update SLAMetricCard.vue --- .../dashboard/settings/reports/components/SLA/SLAMetricCard.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/dashboard/routes/dashboard/settings/reports/components/SLA/SLAMetricCard.vue b/app/javascript/dashboard/routes/dashboard/settings/reports/components/SLA/SLAMetricCard.vue index 50d356d46..ff808622a 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/reports/components/SLA/SLAMetricCard.vue +++ b/app/javascript/dashboard/routes/dashboard/settings/reports/components/SLA/SLAMetricCard.vue @@ -16,7 +16,7 @@ defineProps({