@page "/group/{GroupId:guid}"
@using GmRelay.Web.Services
@using GmRelay.Shared.Domain
@using Microsoft.AspNetCore.Authorization
@using Microsoft.AspNetCore.Components.Authorization
@attribute [Authorize]
@inject AuthorizedSessionService SessionService
@inject AuthenticationStateProvider AuthStateProvider
@inject NavigationManager Navigation
Сессии группы — GM-Relay
@if (groupManagement is not null)
{
@foreach (var manager in groupManagement.Managers)
{
@FormatManager(manager)
@if (groupManagement.CurrentUserIsOwner && manager.Role == GroupManagerRoleExtensions.CoGmValue)
{
}
}
@if (groupManagement.CurrentUserIsOwner)
{
}
}
@if (!string.IsNullOrEmpty(errorMessage))
{
⚠️ @errorMessage
}
@if (!string.IsNullOrEmpty(successMessage))
{
✅ @successMessage
}
@if (campaignTemplates is not null)
{
@if (campaignTemplateModels.Count == 0)
{
Шаблонов пока нет
Создайте шаблоны в отдельной вкладке, а здесь запускайте из них новые batch-расписания.
}
else
{
@foreach (var template in campaignTemplateModels)
{
}
}
}
@if (sessions == null)
{
}
else if (sessions.Count == 0)
{
🎯
Нет предстоящих сессий
Для этой группы пока не запланировано игровых сессий.
}
else
{
@foreach (var batch in batchModels)
{
}
@* Desktop table *@
| Название |
Время (МСК) |
Места |
Статус |
Ссылка |
Действие |
@foreach (var session in sessions)
{
| @session.Title |
@session.ScheduledAt.FormatMoscow() |
@FormatSeats(session) |
@TranslateStatus(session.Status)
|
Подключиться ↗
|
✏️ Изменить
@if (CanPromote(session))
{
}
|
}
@* Mobile cards *@
@foreach (var session in sessions)
{
🕐 Время
@session.ScheduledAt.FormatMoscow()
👥 Места
@FormatSeats(session)
✏️ Изменить
@if (CanPromote(session))
{
}
}
}
@code {
[Parameter] public Guid GroupId { get; set; }
private List