@page "/group/{GroupId:guid}/stats"
@using GmRelay.Web.Services
@using GmRelay.Shared.Domain
@using Microsoft.AspNetCore.Authorization
@using Microsoft.AspNetCore.Components.Authorization
@using System.Security.Claims
@attribute [Authorize]
@inject AuthorizedSessionService SessionService
@inject AuthenticationStateProvider AuthStateProvider
@inject NavigationManager Navigation
Статистика — GM-Relay
@if (!string.IsNullOrEmpty(errorMessage))
{
⚠️ @errorMessage
}
@if (stats is null)
{
⏳ Загружаем статистику…
}
else if (stats.Count == 0)
{
📈
Пока нет данных
После первых сессий здесь появится аналитика.
}
else
{
@AvgAttendanceRate%
Средняя посещаемость
@topPlayer?.DisplayName
Самый стабильный
| SortBy("player"))" style="cursor:pointer;" class="sortable">Игрок @(sortColumn == "player" ? (sortDesc ? "▼" : "▲") : "") |
SortBy("total"))" style="cursor:pointer; text-align:center;" class="sortable">Всего @(sortColumn == "total" ? (sortDesc ? "▼" : "▲") : "") |
SortBy("confirmed"))" style="cursor:pointer; text-align:center;" class="sortable">✅ @(sortColumn == "confirmed" ? (sortDesc ? "▼" : "▲") : "") |
SortBy("declined"))" style="cursor:pointer; text-align:center;" class="sortable">❌ @(sortColumn == "declined" ? (sortDesc ? "▼" : "▲") : "") |
SortBy("noresponse"))" style="cursor:pointer; text-align:center;" class="sortable">💤 @(sortColumn == "noresponse" ? (sortDesc ? "▼" : "▲") : "") |
SortBy("waitlist"))" style="cursor:pointer; text-align:center;" class="sortable">⏳ @(sortColumn == "waitlist" ? (sortDesc ? "▼" : "▲") : "") |
SortBy("rate"))" style="cursor:pointer; text-align:center;" class="sortable">% @(sortColumn == "rate" ? (sortDesc ? "▼" : "▲") : "") |
SortBy("cancelled"))" style="cursor:pointer; text-align:center;" class="sortable">🚫 @(sortColumn == "cancelled" ? (sortDesc ? "▼" : "▲") : "") |
@foreach (var s in sortedStats)
{
|
@s.DisplayName
@if (!string.IsNullOrEmpty(s.ExternalUsername))
{
@@@s.ExternalUsername
}
|
@s.TotalSessions |
@s.ConfirmedCount |
@s.DeclinedCount |
@s.NoResponseCount |
@s.WaitlistedCount |
@s.AttendanceRate%
|
@s.CancellationAffectedCount |
}
}
@code {
[Parameter] public Guid GroupId { get; set; }
private List