Skip to content

Commit

Permalink
Added help messages to review stats
Browse files Browse the repository at this point in the history
  • Loading branch information
dyatlov-a committed Sep 26, 2024
1 parent 8cdc4b8 commit cc5d62d
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 4 deletions.
3 changes: 3 additions & 0 deletions src/Inc.TeamAssistant.Gateway/wwwroot/langs/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 3 additions & 0 deletions src/Inc.TeamAssistant.Gateway/wwwroot/langs/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "Бот не выбран",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@
Title="@Resources[Messages.Dashboard_ReviewStats]"
Sortable="true"
SortBy="GridSort<TaskForReviewDto>.ByAscending(e => e.TotalTime)">
<span class="task__time hint" title="@Resources[Messages.Dashboard_FirstTouch]">
<span class="task__time hint" title="@FirstTouchTitle()">
@ConvertToString(context.FirstTouch)FT
</span>
<br/>
<span class="task__time hint" title="@CorrectionTitle(context)">
@ConvertToString(context.Correction)C
</span>
<br/>
<span class="task__time hint" title="@Resources[Messages.Dashboard_Review]">
<span class="task__time hint" title="@ReviewTitle()">
@ConvertToString(context.Review)R
</span>
</TemplateColumn>
Expand Down Expand Up @@ -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();
}
}
3 changes: 3 additions & 0 deletions src/Inc.TeamAssistant.WebUI/Messages.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit cc5d62d

Please sign in to comment.