SPEC:
- aggiunta ricerca x operatori
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<RootNamespace>MP.SPEC</RootNamespace>
|
||||
<Version>8.16.2606.408</Version>
|
||||
<Version>8.16.2606.409</Version>
|
||||
<UserSecretsId>1800a78a-6ff1-40f9-b490-87fb8bfc1394</UserSecretsId>
|
||||
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -11,7 +11,18 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="px-0 align-content-center d-flex justify-content-end">
|
||||
@* <small class="fs-5">Edit Massivo Fermi</small> *@
|
||||
<div class="input-group">
|
||||
<span class="input-group-text"><i class="fa fa-search"></i></span>
|
||||
@if (ShowDetail)
|
||||
{
|
||||
<input type="text" class="form-control disabled" disabled placeholder="Search Ctr-R" @bind="@SearchVal" @bind:after="ReloadDataAsync" accesskey="R">
|
||||
}
|
||||
else
|
||||
{
|
||||
<input type="text" class="form-control" placeholder="Search Alt-R" @bind="@SearchVal" @bind:after="ReloadDataAsync" accesskey="R">
|
||||
}
|
||||
<button class="btn @btnSearchCss" @onclick="DoReset"><i class="fa fa-ban"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -24,7 +35,7 @@
|
||||
{
|
||||
<div class="row">
|
||||
<div class="@cssMain">
|
||||
<ListOperatori CurrRecords="@ListOperatori" AllRecords="@ListOperatori" AddEnabled="false" DelEnabled="false" StaChgEnab="true" EC_RecSel="ShowDetail"></ListOperatori>
|
||||
<ListOperatori CurrRecords="@ListOperatori" AllRecords="@ListOperatori" AddEnabled="false" DelEnabled="false" StaChgEnab="true" EC_RecSel="DoSelect"></ListOperatori>
|
||||
</div>
|
||||
@if (SelRec != null)
|
||||
{
|
||||
|
||||
@@ -26,28 +26,31 @@ namespace MP.SPEC.Pages
|
||||
#region Private Fields
|
||||
|
||||
private bool isLoading = false;
|
||||
private List<AnagOperatoriModel> ListOperatori = new();
|
||||
private List<RepartiDTO> ListGruppi = new();
|
||||
private List<AnagOperatoriModel> ListOperatori = new();
|
||||
private string SearchVal = "";
|
||||
private AnagOperatoriModel? SelRec = null;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Properties
|
||||
|
||||
private string btnSearchCss => string.IsNullOrWhiteSpace(SearchVal) ? "btn-secondary" : "btn-primary";
|
||||
private string cssMain => SelRec == null ? "col-12" : "col-6";
|
||||
|
||||
private bool ShowDetail => SelRec != null;
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private async Task ReloadDataAsync()
|
||||
private async Task DoReset()
|
||||
{
|
||||
isLoading = true;
|
||||
ListOperatori = await MDService.OperatoriGetFiltAsync("*");
|
||||
isLoading = false;
|
||||
SearchVal = "";
|
||||
await ReloadDataAsync();
|
||||
}
|
||||
|
||||
private async Task ShowDetail(AnagOperatoriModel? newRec)
|
||||
private async Task DoSelect(AnagOperatoriModel? newRec)
|
||||
{
|
||||
SelRec = newRec;
|
||||
if (SelRec == null)
|
||||
@@ -61,6 +64,22 @@ namespace MP.SPEC.Pages
|
||||
}
|
||||
}
|
||||
|
||||
private async Task ReloadDataAsync()
|
||||
{
|
||||
isLoading = true;
|
||||
var rawList = await MDService.OperatoriGetFiltAsync("*");
|
||||
if (string.IsNullOrEmpty(SearchVal))
|
||||
{
|
||||
ListOperatori = rawList;
|
||||
}
|
||||
else
|
||||
{
|
||||
ListOperatori = rawList
|
||||
.Where(x => x.Cognome.Contains(SearchVal, StringComparison.InvariantCultureIgnoreCase) || x.Nome.Contains(SearchVal, StringComparison.InvariantCultureIgnoreCase)).ToList();
|
||||
}
|
||||
isLoading = false;
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -57,10 +57,7 @@ namespace MP.SPEC.Pages
|
||||
|
||||
#region Private Properties
|
||||
|
||||
private string btnSearchCss
|
||||
{
|
||||
get => string.IsNullOrWhiteSpace(SearchVal) ? "btn-secondary" : "btn-primary";
|
||||
}
|
||||
private string btnSearchCss => string.IsNullOrWhiteSpace(SearchVal) ? "btn-secondary" : "btn-primary";
|
||||
|
||||
private string CssMain => ShowDetail ? "col-4" : "col-12";
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo MAPOSPEC </i>
|
||||
<h4>Versione: 8.16.2606.408</h4>
|
||||
<h4>Versione: 8.16.2606.409</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
8.16.2606.408
|
||||
8.16.2606.409
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>8.16.2606.408</version>
|
||||
<version>8.16.2606.409</version>
|
||||
<url>https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/MP.SPEC.zip</url>
|
||||
<changelog>https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
Reference in New Issue
Block a user