add quick add entry.

This commit is contained in:
Chris Chen
2026-06-20 20:42:06 -07:00
parent 87425b3276
commit 8061a60fe5
18 changed files with 1050 additions and 5 deletions
+21
View File
@@ -0,0 +1,21 @@
using Microsoft.AspNetCore.SignalR;
namespace ROLAC.API.Hubs;
/// <summary>
/// Real-time hub backing the mobile Sunday offering-entry page. Anonymous
/// (no [Authorize]) so volunteers can enter givings on their phones without
/// logging in. Clients join a group named after the session date (yyyy-MM-dd);
/// when a line is appended, the controller broadcasts "LineAdded" to that
/// group so every phone and the desktop Sunday Offering Entry page updating
/// the same date see the new line instantly. The hub itself holds no business
/// logic — broadcasting is done from the controller via IHubContext.
/// </summary>
public class OfferingEntryHub : Hub
{
public Task JoinDate(string date)
=> Groups.AddToGroupAsync(Context.ConnectionId, date);
public Task LeaveDate(string date)
=> Groups.RemoveFromGroupAsync(Context.ConnectionId, date);
}