diff --git a/AccessQueuePlayground/Components/Pages/Home.razor b/AccessQueuePlayground/Components/Pages/Home.razor index 3bc5f6e..2533d95 100644 --- a/AccessQueuePlayground/Components/Pages/Home.razor +++ b/AccessQueuePlayground/Components/Pages/Home.razor @@ -18,13 +18,14 @@

}

- + +

@if (Status != null) { -

Users with access

+

Users with access

@@ -45,7 +46,7 @@ -

Users in queue

+

Users in queue

@@ -66,7 +67,7 @@ -

Inactive users

+

Inactive users

@@ -100,9 +101,9 @@ }); } - public void AddUser() + public void AddUser(bool isActive) { - Manager.AddUser(); + Manager.AddUser(isActive); Status = Manager.GetStatus(); } diff --git a/AccessQueuePlayground/Services/AccessQueueManager.cs b/AccessQueuePlayground/Services/AccessQueueManager.cs index 5bad7e2..4f17277 100644 --- a/AccessQueuePlayground/Services/AccessQueueManager.cs +++ b/AccessQueuePlayground/Services/AccessQueueManager.cs @@ -36,13 +36,13 @@ namespace AccessQueuePlayground.Services _accessService.UpdateConfiguration(config); } - public Guid AddUser() + public Guid AddUser(bool isActive) { var id = Guid.NewGuid(); _users[id] = new User { Id = id, - Active = false, + Active = isActive, }; return id; } diff --git a/AccessQueuePlayground/Services/IAccessQueueManager.cs b/AccessQueuePlayground/Services/IAccessQueueManager.cs index 015dbd8..362955f 100644 --- a/AccessQueuePlayground/Services/IAccessQueueManager.cs +++ b/AccessQueuePlayground/Services/IAccessQueueManager.cs @@ -10,7 +10,7 @@ namespace AccessQueuePlayground.Services public void UpdateConfig(AccessQueueConfig config); public Task RecalculateStatus(); public AccessQueueStatus GetStatus(); - public Guid AddUser(); + public Guid AddUser(bool isActive); public void SetUserActive(Guid userId, bool isActive); public void RevokeAccess(Guid userId); public void RevokeAllAccess();