Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 40b13db320 | |||
| e0ee8fc962 | |||
| 6707a2850c | |||
| d137c334d6 | |||
| 27f9ceb038 | |||
| f53c1f6aae | |||
| e59b0a78fd |
@@ -36,19 +36,19 @@ internal static class SessionListMessageRenderer
|
|||||||
|
|
||||||
actions.Add(new PlatformMessageAction(
|
actions.Add(new PlatformMessageAction(
|
||||||
$"cancel_session:{session.Id}",
|
$"cancel_session:{session.Id}",
|
||||||
$"❌ {dateTitle}",
|
$"❌ Отменить {dateTitle}",
|
||||||
$"cancel_session:{session.Id}"));
|
$"cancel_session:{session.Id}"));
|
||||||
|
|
||||||
actions.Add(new PlatformMessageAction(
|
actions.Add(new PlatformMessageAction(
|
||||||
$"reschedule_session:{session.Id}",
|
$"reschedule_session:{session.Id}",
|
||||||
$"⏰ {dateTitle}",
|
$"⏰ Перенести {dateTitle}",
|
||||||
$"reschedule_session:{session.Id}"));
|
$"reschedule_session:{session.Id}"));
|
||||||
|
|
||||||
if (SessionCapacityRules.CanPromoteWaitlistedPlayer(session.MaxPlayers, session.PlayerCount, session.WaitlistCount))
|
if (SessionCapacityRules.CanPromoteWaitlistedPlayer(session.MaxPlayers, session.PlayerCount, session.WaitlistCount))
|
||||||
{
|
{
|
||||||
actions.Add(new PlatformMessageAction(
|
actions.Add(new PlatformMessageAction(
|
||||||
$"promote_waitlist:{session.Id}",
|
$"promote_waitlist:{session.Id}",
|
||||||
$"⬆️ Из ожидания {dateTitle}",
|
$"⬆️ С ожидания {dateTitle}",
|
||||||
$"promote_waitlist:{session.Id}"));
|
$"promote_waitlist:{session.Id}"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+6
@@ -32,6 +32,12 @@ public sealed class SessionListMessageRendererTests
|
|||||||
Assert.Contains(actions, a => a.Payload == $"reschedule_session:{sessionId}");
|
Assert.Contains(actions, a => a.Payload == $"reschedule_session:{sessionId}");
|
||||||
Assert.Contains(actions, a => a.Payload == $"promote_waitlist:{sessionId}");
|
Assert.Contains(actions, a => a.Payload == $"promote_waitlist:{sessionId}");
|
||||||
Assert.Contains(actions, a => a.Payload == $"delete_session:{sessionId}");
|
Assert.Contains(actions, a => a.Payload == $"delete_session:{sessionId}");
|
||||||
|
|
||||||
|
var shortDate = new DateTime(2026, 5, 7, 16, 30, 0, DateTimeKind.Utc).FormatMoscowShort();
|
||||||
|
Assert.Contains(actions, a => a.Label == $"❌ Отменить {shortDate}");
|
||||||
|
Assert.Contains(actions, a => a.Label == $"⏰ Перенести {shortDate}");
|
||||||
|
Assert.Contains(actions, a => a.Label == $"⬆️ С ожидания {shortDate}");
|
||||||
|
Assert.Contains(actions, a => a.Label == $"🗑 Удалить {shortDate}");
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
|
|||||||
Reference in New Issue
Block a user