106 lines
4.5 KiB
Plaintext
106 lines
4.5 KiB
Plaintext
<div class="card">
|
|
<div class="card-header">
|
|
<div class="row">
|
|
<div class="col-4 col-lg-6 col-xl-8 text-truncate">
|
|
<h3>User Administration</h3>
|
|
</div>
|
|
<div class="col-4 col-lg-3 col-xl-2 text-right">
|
|
<div class="input-group mb-3">
|
|
<div class="input-group-prepend">
|
|
<span class="input-group-text"><i class="fas fa-user-tag"></i></span>
|
|
</div>
|
|
<select class="form-control" @bind="@FiltUserRole">
|
|
<option value="0">--- Tutti ---</option>
|
|
@foreach (var option in RolesList)
|
|
{
|
|
<option value="@option">
|
|
@option
|
|
</option>
|
|
}
|
|
</select>
|
|
</div>
|
|
</div>
|
|
@* <div class="col-4 col-lg-3 col-xl-2 text-right">
|
|
<AuthorizeView>
|
|
<Authorized>
|
|
@if (@context.User.IsInRole("SuperAdmin"))
|
|
{
|
|
<button class="btn btn-success btn-block" @onclick="AddNewUser">Add User</button>
|
|
}
|
|
</Authorized>
|
|
</AuthorizeView>
|
|
</div> *@
|
|
</div>
|
|
</div>
|
|
<div class="card-body">
|
|
|
|
<table class="table table-sm table-striped table-responsive-md">
|
|
<thead>
|
|
<tr>
|
|
<th></th>
|
|
<th>Id</th>
|
|
<th>User / Email</th>
|
|
<th>Ruolo</th>
|
|
<th>Permessi</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var user in UsersList)
|
|
{
|
|
<tr>
|
|
<td>
|
|
@if (!ShowPopup)
|
|
{
|
|
<button class="btn btn-sm btn-primary" @onclick="(() => EditUser(user.Identity))" title="Edit">
|
|
<i class="fas fa-pen"></i>
|
|
</button>
|
|
}
|
|
else
|
|
{
|
|
<button class="btn btn-sm btn-secondary disabled" title="Edit">
|
|
<i class="fas fa-pen"></i>
|
|
</button>
|
|
}
|
|
</td>
|
|
<td>@user.Identity.Id.Substring(0, 8)...</td>
|
|
<td>
|
|
@if (user.Identity.EmailConfirmed)
|
|
{
|
|
<span class="badge badge-pill badge-success" title="Email validata"><span class="oi oi-check" aria-hidden="true"></span></span>
|
|
}
|
|
else
|
|
{
|
|
<span class="badge badge-pill badge-danger" title="Email NON ancora validata!"><span class="oi oi-check" aria-hidden="true"></span></span>
|
|
}
|
|
@user.Identity.Email
|
|
</td>
|
|
<td>
|
|
@ShowRoles(user.Roles)
|
|
</td>
|
|
<td>
|
|
@ShowClaims(user.Claims)
|
|
</td>
|
|
<td>
|
|
@if (!ShowPopup)
|
|
{
|
|
<button class="btn btn-sm btn-danger" @onclick="(() => DeleteUser(user.Identity))" title="Delete">
|
|
<i class="fas fa-trash"></i>
|
|
</button>
|
|
}
|
|
else
|
|
{
|
|
<button class="btn btn-sm btn-secondary disabled" title="Delete">
|
|
<i class="fas fa-trash"></i>
|
|
</button>
|
|
}
|
|
</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="card-footer">
|
|
<EgwCoreLib.Razor.DataPager PageSize="@numRecord" currPage="@currPage" numRecordChanged="SetNumRec" numPageChanged="SetPage" totalCount="@totalCount" showLoading="@isLoading"></EgwCoreLib.Razor.DataPager>
|
|
</div>
|
|
</div> |