From cc5d62d818d5cd9404ae9b8f861f421b18d927cb Mon Sep 17 00:00:00 2001 From: dyatlov-a Date: Thu, 26 Sep 2024 13:14:53 +0400 Subject: [PATCH] Added help messages to review stats --- .../wwwroot/langs/en.json | 3 ++ .../wwwroot/langs/ru.json | 3 ++ .../Reviewer/ReviewHistoryWidget.razor | 33 ++++++++++++++++--- src/Inc.TeamAssistant.WebUI/Messages.cs | 3 ++ 4 files changed, 38 insertions(+), 4 deletions(-) diff --git a/src/Inc.TeamAssistant.Gateway/wwwroot/langs/en.json b/src/Inc.TeamAssistant.Gateway/wwwroot/langs/en.json index ac9649f8..e436a704 100644 --- a/src/Inc.TeamAssistant.Gateway/wwwroot/langs/en.json +++ b/src/Inc.TeamAssistant.Gateway/wwwroot/langs/en.json @@ -189,8 +189,11 @@ "Dashboard_ReviewStateAccept": "Accept", "Dashboard_ReviewStats": "Stats", "Dashboard_FirstTouch": "First touch", + "Dashboard_FirstTouchHelp": "Time spent before the review begins", "Dashboard_Correction": "Correction", + "Dashboard_CorrectionHelp": "Time spent on adjustments", "Dashboard_Review": "Review", + "Dashboard_ReviewHelp": "Time spent on the review", "Dashboard_NoData": "No data", "Dashboard_TeammatesWidgetTitle": "Teammates", "Dashboard_BotWidgetTitle": "Bot has not selected", diff --git a/src/Inc.TeamAssistant.Gateway/wwwroot/langs/ru.json b/src/Inc.TeamAssistant.Gateway/wwwroot/langs/ru.json index 5410d8f4..9a2bd2d1 100644 --- a/src/Inc.TeamAssistant.Gateway/wwwroot/langs/ru.json +++ b/src/Inc.TeamAssistant.Gateway/wwwroot/langs/ru.json @@ -189,8 +189,11 @@ "Dashboard_ReviewStateAccept": "Принята", "Dashboard_ReviewStats": "Статистика", "Dashboard_FirstTouch": "Время первого касания", + "Dashboard_FirstTouchHelp": "Время, затраченное до начала проверки", "Dashboard_Correction": "Время корректировки", + "Dashboard_CorrectionHelp": "Время, затраченное на корректировку", "Dashboard_Review": "Время ревью", + "Dashboard_ReviewHelp": "Время, затраченное на проверку", "Dashboard_NoData": "Нет данных", "Dashboard_TeammatesWidgetTitle": "Товарищи по команде", "Dashboard_BotWidgetTitle": "Бот не выбран", diff --git a/src/Inc.TeamAssistant.WebUI/Features/Dashboard/Reviewer/ReviewHistoryWidget.razor b/src/Inc.TeamAssistant.WebUI/Features/Dashboard/Reviewer/ReviewHistoryWidget.razor index bd37aec7..e8f31e23 100644 --- a/src/Inc.TeamAssistant.WebUI/Features/Dashboard/Reviewer/ReviewHistoryWidget.razor +++ b/src/Inc.TeamAssistant.WebUI/Features/Dashboard/Reviewer/ReviewHistoryWidget.razor @@ -55,7 +55,7 @@ Title="@Resources[Messages.Dashboard_ReviewStats]" Sortable="true" SortBy="GridSort.ByAscending(e => e.TotalTime)"> - + @ConvertToString(context.FirstTouch)FT
@@ -63,7 +63,7 @@ @ConvertToString(context.Correction)C

- + @ConvertToString(context.Review)R @@ -151,11 +151,36 @@ } private string ConvertToString(TimeSpan value) => value.ToString(GlobalSettings.TimeFormat); + + private string FirstTouchTitle() + { + var builder = new StringBuilder(); + + builder.AppendLine(Resources[Messages.Dashboard_FirstTouch]); + builder.Append(Resources[Messages.Dashboard_FirstTouchHelp]); + + return builder.ToString(); + } private string CorrectionTitle(TaskForReviewDto task) { - return task.Iterations == 0 + var builder = new StringBuilder(); + + builder.AppendLine(task.Iterations == 0 ? Resources[Messages.Dashboard_Correction] - : $"{Resources[Messages.Dashboard_Correction]} ({task.Iterations})"; + : $"{Resources[Messages.Dashboard_Correction]} ({task.Iterations})"); + builder.Append(Resources[Messages.Dashboard_CorrectionHelp]); + + return builder.ToString(); + } + + private string ReviewTitle() + { + var builder = new StringBuilder(); + + builder.AppendLine(Resources[Messages.Dashboard_Review]); + builder.Append(Resources[Messages.Dashboard_ReviewHelp]); + + return builder.ToString(); } } \ No newline at end of file diff --git a/src/Inc.TeamAssistant.WebUI/Messages.cs b/src/Inc.TeamAssistant.WebUI/Messages.cs index 7902bebb..5ca03958 100644 --- a/src/Inc.TeamAssistant.WebUI/Messages.cs +++ b/src/Inc.TeamAssistant.WebUI/Messages.cs @@ -140,8 +140,11 @@ internal static class Messages public static readonly MessageId Dashboard_ReviewStateAccept = new(nameof(Dashboard_ReviewStateAccept)); public static readonly MessageId Dashboard_ReviewStats = new(nameof(Dashboard_ReviewStats)); public static readonly MessageId Dashboard_FirstTouch = new(nameof(Dashboard_FirstTouch)); + public static readonly MessageId Dashboard_FirstTouchHelp = new(nameof(Dashboard_FirstTouchHelp)); public static readonly MessageId Dashboard_Correction = new(nameof(Dashboard_Correction)); + public static readonly MessageId Dashboard_CorrectionHelp = new(nameof(Dashboard_CorrectionHelp)); public static readonly MessageId Dashboard_Review = new(nameof(Dashboard_Review)); + public static readonly MessageId Dashboard_ReviewHelp = new(nameof(Dashboard_ReviewHelp)); public static readonly MessageId Dashboard_NoData = new(nameof(Dashboard_NoData)); public static readonly MessageId Dashboard_TeammatesWidgetTitle = new(nameof(Dashboard_TeammatesWidgetTitle)); public static readonly MessageId Dashboard_BotWidgetTitle = new(nameof(Dashboard_BotWidgetTitle));