Aggiunta gestione search
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>WebDoorCreator - Egalware</i>
|
||||
<h4>Version: 0.9.2305.2909</h4>
|
||||
<h4>Version: 0.9.2305.2910</h4>
|
||||
<br /> Release note:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
0.9.2305.2909
|
||||
0.9.2305.2910
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>0.9.2305.2909</version>
|
||||
<version>0.9.2305.2910</version>
|
||||
<url>http://nexus.steamware.net/repository/SWS/WDC/stable/WDC.UI.zip</url>
|
||||
<changelog>http://nexus.steamware.net/repository/SWS/WDC/stable/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
@@ -1,20 +1,17 @@
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Security.Claims;
|
||||
|
||||
namespace WebDoorCreator.Data.User
|
||||
{
|
||||
/// <summary>
|
||||
/// Classe generalizzaizone identity (user + roles + claims) x gestione semplificata in editing
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class UserData
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
public List<System.Security.Claims.Claim> Claims { get; set; } = new List<System.Security.Claims.Claim>();
|
||||
public List<Claim> Claims { get; set; } = new List<Claim>();
|
||||
|
||||
public IdentityUser Identity { get; set; } = null!;
|
||||
|
||||
|
||||
@@ -100,6 +100,13 @@ else
|
||||
<div>
|
||||
<h3>User Administration</h3>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between gap-3 mb-1">
|
||||
<div class="input-group" title="Search">
|
||||
<span class="input-group-text"><i class="fa-solid fa-magnifying-glass"></i></span>
|
||||
<input class="form-control" placeholder="Search" @bind="@searchVal">
|
||||
<button class="input-group-text" @onclick="resetSearch"><i class="fa-solid fa-xmark"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between gap-3 mb-1">
|
||||
<div class="input-group">
|
||||
<span class="input-group-text"><i class="fas fa-user-tag"></i></span>
|
||||
|
||||
@@ -28,14 +28,31 @@ namespace WebDoorCreator.UI.Pages
|
||||
|
||||
#region Public Properties
|
||||
|
||||
public string searchVal
|
||||
protected string searchVal
|
||||
{
|
||||
get
|
||||
get => _searchVal;
|
||||
set
|
||||
{
|
||||
return AppMService.SearchVal;
|
||||
if (value != _searchVal)
|
||||
{
|
||||
_searchVal = value;
|
||||
var pUpd = Task.Run(async () =>
|
||||
{
|
||||
await ReloadData();
|
||||
});
|
||||
pUpd.Wait();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void resetSearch()
|
||||
{
|
||||
searchVal = "";
|
||||
}
|
||||
|
||||
|
||||
private string _searchVal { get; set; } = "";
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Public Methods
|
||||
@@ -126,7 +143,9 @@ namespace WebDoorCreator.UI.Pages
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
AppMService.EA_SearchUpdated -= OnSeachUpdated;
|
||||
#if false
|
||||
AppMService.EA_SearchUpdated -= OnSeachUpdated;
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -147,7 +166,6 @@ namespace WebDoorCreator.UI.Pages
|
||||
{
|
||||
System.Security.Claims.Claim cClaim = new System.Security.Claims.Claim("CompanyId", $"{FiltCompany}");
|
||||
UsersAll = UsersAll
|
||||
//.Where(x => x.Claims.Any(c => c == cClaim))
|
||||
.Where(x => x.Claims.Any(c => c.Type == "CompanyId" && c.Value == $"{FiltCompany}"))
|
||||
.ToList();
|
||||
}
|
||||
@@ -184,8 +202,10 @@ namespace WebDoorCreator.UI.Pages
|
||||
[Inject]
|
||||
protected UserManager<IdentityUser> _UserManager { get; set; } = null!;
|
||||
|
||||
#if false
|
||||
[Inject]
|
||||
protected MessageService AppMService { get; set; } = null!;
|
||||
protected MessageService AppMService { get; set; } = null!;
|
||||
#endif
|
||||
|
||||
[Inject]
|
||||
protected AuthenticationStateProvider AuthenticationStateProvider { get; set; } = null!;
|
||||
@@ -230,8 +250,11 @@ namespace WebDoorCreator.UI.Pages
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
searchVal = "";
|
||||
#if false
|
||||
AppMService.ShowSearch = true;
|
||||
AppMService.EA_SearchUpdated += OnSeachUpdated;
|
||||
AppMService.EA_SearchUpdated += OnSeachUpdated;
|
||||
#endif
|
||||
// lettura dati
|
||||
await ReloadData();
|
||||
#if false
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<Version>0.9.2305.2909</Version>
|
||||
<Version>0.9.2305.2910</Version>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<UserSecretsId>aspnet-WebDoorCreator.UI-dfe95fed-1398-4144-bd43-8b3a765d6608</UserSecretsId>
|
||||
</PropertyGroup>
|
||||
|
||||
Reference in New Issue
Block a user