-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #673 from Laixer/develop
3.6.2
- Loading branch information
Showing
5 changed files
with
161 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
@page "/user" | ||
@attribute [Authorize(Policy = "AdministratorPolicy")] | ||
|
||
<PageTitle>Users</PageTitle> | ||
|
||
@using FunderMaps.Core.Interfaces.Repositories | ||
@inject IUserRepository UserRepository | ||
|
||
<h1>Users</h1> | ||
|
||
@if (trackers == null) | ||
{ | ||
<p><em>Loading...</em></p> | ||
} | ||
else | ||
{ | ||
<table class="table"> | ||
<thead> | ||
<tr> | ||
<th>ID</th> | ||
<th>Name</th> | ||
<th>Email</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
@foreach (var tracker in trackers) | ||
{ | ||
<tr> | ||
<td>@tracker.Id</td> | ||
<td>@tracker.Name</td> | ||
<td>@tracker.Email</td> | ||
</tr> | ||
} | ||
</tbody> | ||
</table> | ||
} | ||
|
||
@code { | ||
public class Woei | ||
{ | ||
/// <summary> | ||
/// Unique identifier. | ||
/// </summary> | ||
public Guid Id { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the name for the user. | ||
/// </summary> | ||
public string Name { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the email address for the user. | ||
/// </summary> | ||
public string Email { get; set; } | ||
} | ||
|
||
private List<Woei> trackers = new(); | ||
|
||
protected override async Task OnInitializedAsync() | ||
{ | ||
await foreach (var user in UserRepository.ListAllAsync(FunderMaps.Core.Navigation.All)) | ||
{ | ||
trackers.Add(new Woei | ||
{ | ||
Id = user.Id, | ||
Name = user.ToString(), | ||
Email = user.Email, | ||
}); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters