From df657a3e96738801e60bce075c8d963183acbd38 Mon Sep 17 00:00:00 2001 From: Denny Bresch Date: Mon, 24 Jun 2019 16:34:04 +0200 Subject: [PATCH] Added DashboardStatsWidget help description. --- .../app/controllers/_dashboard/stats.coffee | 5 ++++- .../stats/ticket_channel_distribution.coffee | 2 ++ .../_dashboard/stats/ticket_escalation.coffee | 2 ++ .../_dashboard/stats/ticket_in_process.coffee | 2 ++ .../_dashboard/stats/ticket_load_measure.coffee | 2 ++ .../_dashboard/stats/ticket_reopen.coffee | 2 ++ .../_dashboard/stats/ticket_waiting_time.coffee | 2 ++ .../stats/ticket_channel_distribution.jst.eco | 9 +++++++-- .../dashboard/stats/ticket_escalation.jst.eco | 7 ++++++- .../dashboard/stats/ticket_in_process.jst.eco | 7 ++++++- .../dashboard/stats/ticket_load_measure.jst.eco | 7 ++++++- .../views/dashboard/stats/ticket_reopen.jst.eco | 7 ++++++- .../dashboard/stats/ticket_waiting_time.jst.eco | 7 ++++++- app/assets/stylesheets/zammad.scss | 15 +++++++++++++++ 14 files changed, 68 insertions(+), 8 deletions(-) diff --git a/app/assets/javascripts/app/controllers/_dashboard/stats.coffee b/app/assets/javascripts/app/controllers/_dashboard/stats.coffee index d4a672c16..d13708c92 100644 --- a/app/assets/javascripts/app/controllers/_dashboard/stats.coffee +++ b/app/assets/javascripts/app/controllers/_dashboard/stats.coffee @@ -22,6 +22,9 @@ class App.DashboardStats extends App.Controller new widget.controller( el: el ) + @$('.js-stat-help').tooltip() catch e - @log 'error', "statsWidgets #{key}:", e + @log 'error', "statsWidgets #{widget}:", e + + App.Event.trigger(event + ':ready') diff --git a/app/assets/javascripts/app/controllers/_dashboard/stats/ticket_channel_distribution.coffee b/app/assets/javascripts/app/controllers/_dashboard/stats/ticket_channel_distribution.coffee index 47e8e752e..8ffceb062 100644 --- a/app/assets/javascripts/app/controllers/_dashboard/stats/ticket_channel_distribution.coffee +++ b/app/assets/javascripts/app/controllers/_dashboard/stats/ticket_channel_distribution.coffee @@ -30,6 +30,8 @@ class Stats extends App.Controller inbound_in_percent: 0 outbound_in_percent: 0 + data.StatsTicketChannelDistribution.description = 'How many of your tickets are coming from email, phone, Twitter, or Facebook? (Shows percentages for both inbound and outbound tickets.)' + content = App.view('dashboard/stats/ticket_channel_distribution')(data) if @$('.ticket_channel_distribution').length > 0 diff --git a/app/assets/javascripts/app/controllers/_dashboard/stats/ticket_escalation.coffee b/app/assets/javascripts/app/controllers/_dashboard/stats/ticket_escalation.coffee index 6d29c02cb..15560c9a3 100644 --- a/app/assets/javascripts/app/controllers/_dashboard/stats/ticket_escalation.coffee +++ b/app/assets/javascripts/app/controllers/_dashboard/stats/ticket_escalation.coffee @@ -17,6 +17,8 @@ class Stats extends App.Controller own: 0 total: 0 + data.StatsTicketEscalation.description = 'How many escalated tickets do you have open? (Mr. Bubbles gets grumpy if you have too many…)' + content = App.view('dashboard/stats/ticket_escalation')(data) if @$('.ticket_escalation').length > 0 diff --git a/app/assets/javascripts/app/controllers/_dashboard/stats/ticket_in_process.coffee b/app/assets/javascripts/app/controllers/_dashboard/stats/ticket_in_process.coffee index e15cacf0b..457792b2f 100644 --- a/app/assets/javascripts/app/controllers/_dashboard/stats/ticket_in_process.coffee +++ b/app/assets/javascripts/app/controllers/_dashboard/stats/ticket_in_process.coffee @@ -17,6 +17,8 @@ class Stats extends App.Controller percent: 0 average_per_agent: 0 + data.StatsTicketInProcess.description = 'What percentage of your tickets have you responded to, updated, or modified in some way today?' + content = App.view('dashboard/stats/ticket_in_process')(data) if @$('.ticket_in_process').length > 0 diff --git a/app/assets/javascripts/app/controllers/_dashboard/stats/ticket_load_measure.coffee b/app/assets/javascripts/app/controllers/_dashboard/stats/ticket_load_measure.coffee index 74b8112ed..b54649ab2 100644 --- a/app/assets/javascripts/app/controllers/_dashboard/stats/ticket_load_measure.coffee +++ b/app/assets/javascripts/app/controllers/_dashboard/stats/ticket_load_measure.coffee @@ -19,6 +19,8 @@ class Stats extends App.Controller total: 0 average_per_agent: 0 + data.StatsTicketLoadMeasure.description = 'Out of all open tickets (company-wide), how many are assigned to you?' + content = App.view('dashboard/stats/ticket_load_measure')(data) if @$('.ticket_load_measure').length > 0 diff --git a/app/assets/javascripts/app/controllers/_dashboard/stats/ticket_reopen.coffee b/app/assets/javascripts/app/controllers/_dashboard/stats/ticket_reopen.coffee index 1a6b845dd..17a26a421 100644 --- a/app/assets/javascripts/app/controllers/_dashboard/stats/ticket_reopen.coffee +++ b/app/assets/javascripts/app/controllers/_dashboard/stats/ticket_reopen.coffee @@ -17,6 +17,8 @@ class Stats extends App.Controller percent: 0 average_per_agent: 0 + data.StatsTicketReopen.description = 'How many of your tickets have been re-opened after being marked “closed”?' + content = App.view('dashboard/stats/ticket_reopen')(data) if @$('.ticket_reopen').length > 0 @$('.ticket_reopen').html(content) diff --git a/app/assets/javascripts/app/controllers/_dashboard/stats/ticket_waiting_time.coffee b/app/assets/javascripts/app/controllers/_dashboard/stats/ticket_waiting_time.coffee index 29c78869a..0ab1d0269 100644 --- a/app/assets/javascripts/app/controllers/_dashboard/stats/ticket_waiting_time.coffee +++ b/app/assets/javascripts/app/controllers/_dashboard/stats/ticket_waiting_time.coffee @@ -18,6 +18,8 @@ class Stats extends App.Controller state: 'supergood' average_per_agent: 0 + data.StatsTicketWaitingTime.description = 'How long has each customer had to wait, on average, to get a response from you today?' + content = App.view('dashboard/stats/ticket_waiting_time')(data) if @$('.ticket_waiting_time').length > 0 @$('.ticket_waiting_time').html(content) diff --git a/app/assets/javascripts/app/views/dashboard/stats/ticket_channel_distribution.jst.eco b/app/assets/javascripts/app/views/dashboard/stats/ticket_channel_distribution.jst.eco index 2ed22d9e8..7567746f6 100644 --- a/app/assets/javascripts/app/views/dashboard/stats/ticket_channel_distribution.jst.eco +++ b/app/assets/javascripts/app/views/dashboard/stats/ticket_channel_distribution.jst.eco @@ -1,6 +1,11 @@
-
-
<%- @T('Channel Distribution') %>
+
+
+ <%- @T('Channel Distribution') %> +
+ <%- @Icon('help') %> +
+
<% for channel_name, channel of @StatsTicketChannelDistribution.channels: %>