Merge branch 'main' into edit-config-runtime
This commit is contained in:
commit
fe3f7c3766
|
@ -18,13 +18,14 @@
|
|||
</p>
|
||||
}
|
||||
<p>
|
||||
<Button Color="ButtonColor.Success" @onclick="AddUser">Add User</Button>
|
||||
<Button Color="ButtonColor.Success" @onclick="() => AddUser(true)">Add Active User</Button>
|
||||
<Button Color="ButtonColor.Success" Outline @onclick="() => AddUser(false)">Add Inctive User</Button>
|
||||
<Button Color="ButtonColor.Danger" @onclick="RevokeAllAccess">Revoke All</Button>
|
||||
<Button Color="ButtonColor.Warning" @onclick="Reset">Reset Data</Button>
|
||||
</p>
|
||||
@if (Status != null)
|
||||
{
|
||||
<h2>Users with access</h2>
|
||||
<h4>Users with access</h4>
|
||||
<Grid TItem="User" Data="Status.AccessUsers" Class="table table-bordered mt-3" AllowSorting>
|
||||
<GridColumns>
|
||||
<GridColumn TItem="User" HeaderText="Id" PropertyName="Id" SortKeySelector="item => item.Id">
|
||||
|
@ -45,7 +46,7 @@
|
|||
</GridColumn>
|
||||
</GridColumns>
|
||||
</Grid>
|
||||
<h2>Users in queue</h2>
|
||||
<h4>Users in queue</h4>
|
||||
<Grid TItem="User" Data="Status.QueuedUsers" Class="table table-bordered mt-3">
|
||||
<GridColumns>
|
||||
<GridColumn TItem="User" HeaderText="Id" PropertyName="Id">
|
||||
|
@ -66,7 +67,7 @@
|
|||
</GridColumn>
|
||||
</GridColumns>
|
||||
</Grid>
|
||||
<h2>Inactive users</h2>
|
||||
<h4>Inactive users</h4>
|
||||
<Grid TItem="User" Data="Status.InactiveUsers" Class="table table-bordered mt-3" AllowSorting>
|
||||
<GridColumns>
|
||||
<GridColumn TItem="User" HeaderText="Id" PropertyName="Id" SortKeySelector="item => item.Id">
|
||||
|
@ -100,9 +101,9 @@
|
|||
});
|
||||
}
|
||||
|
||||
public void AddUser()
|
||||
public void AddUser(bool isActive)
|
||||
{
|
||||
Manager.AddUser();
|
||||
Manager.AddUser(isActive);
|
||||
Status = Manager.GetStatus();
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue