Fix last update da pagina main
This commit is contained in:
@@ -17,7 +17,11 @@ namespace MP.SPEC.Components
|
||||
|
||||
#region Protected Fields
|
||||
|
||||
protected string lastUpdate = "-";
|
||||
protected string lastUpdate
|
||||
{
|
||||
get => SelFilter.lastUpdate;
|
||||
set => SelFilter.lastUpdate = value;
|
||||
}
|
||||
|
||||
#endregion Protected Fields
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
public int MaxRecord { get; set; } = 100;
|
||||
public int TempoAgg { get; set; } = 2000;
|
||||
public int CurrPage { get; set; } = 1;
|
||||
//public string lastUpdate { get; set; } = "-";
|
||||
public string lastUpdate { get; set; } = "-";
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
@@ -47,8 +47,8 @@
|
||||
if (CurrPage != item.CurrPage)
|
||||
return false;
|
||||
|
||||
//if (lastUpdate != item.lastUpdate)
|
||||
// return false;
|
||||
if (lastUpdate != item.lastUpdate)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<RootNamespace>MP.SPEC</RootNamespace>
|
||||
<Version>6.15.2209.1614</Version>
|
||||
<Version>6.15.2209.1615</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
+15
-212
@@ -2,223 +2,26 @@
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header table-primary">
|
||||
<div class="row">
|
||||
<div class="col-5">
|
||||
<div class="d-flex justify-content-between">
|
||||
<div class="px-2">
|
||||
<h3><b>ODL</b></h3>
|
||||
</div>
|
||||
<div class="px-2">
|
||||
<button class="btn btn-success" disabled="!@addEnabled" @onclick="() => reqNewPODL()">Nuovo ODL <i class="bi bi-plus-square"></i></button>
|
||||
</div><div class="px-2">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
<div class="px-1">
|
||||
<h3><b>ODL</b></h3>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
</div>
|
||||
<div class="col-5">
|
||||
<div class="d-flex justify-content-between">
|
||||
<div class="px-2">
|
||||
<div class="form-check form-switch" title="Visualizzazione ODL Programmati / In Corso" style="padding-top: 3px">
|
||||
@*<input class="form-check-input" type="checkbox" id="flexSwitchCheckDefault" @onclick="() => toggleCurrent()">*@
|
||||
<button type="button" class="btn btn-primary btn-sm" @onclick="() => navToPODL()">PODL</button>
|
||||
<label class="form-check-label" for="flexSwitchCheckDefault">Visualizza programmati</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="px-2">
|
||||
<select @bind="@selStato" class="form-select">
|
||||
<option value="*">--- Tutti ---</option>
|
||||
@if (ListStati != null)
|
||||
{
|
||||
foreach (var item in ListStati)
|
||||
{
|
||||
<option value="@item.value">@item.label</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="px-2">
|
||||
<select @bind="@selStato" class="form-select">
|
||||
<option value="*">--- Tutti ---</option>
|
||||
@if (ListStati != null)
|
||||
{
|
||||
foreach (var item in ListStati)
|
||||
{
|
||||
<option value="@item.value">@item.label</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (reqNew)
|
||||
{
|
||||
<div class="d-flex justify-content-around">
|
||||
<div class="px-2">
|
||||
<div class="input-group input-group-sm">
|
||||
<span class="input-group-text" id="inputGroup-sizing-sm">Azienda</span>
|
||||
<select @bind="@currAzienda" class="form-select">
|
||||
@if (ListAziende != null)
|
||||
{
|
||||
foreach (var item in ListAziende.Where(x => x.CodGruppo != "*").ToList())
|
||||
{
|
||||
<option value="@item.CodGruppo">@item.DescrGruppo</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
<span class="input-group-text" id="inputGroup-sizing-sm">Art Search</span>
|
||||
<input type="text" class="form-control" aria-label="Art search" aria-describedby="inputGroup-sizing-sm">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex justify-content-around">
|
||||
<div class="px-2">
|
||||
<div class="input-group input-group-sm">
|
||||
<span class="input-group-text" id="inputGroup-sizing-sm">Articolo</span>
|
||||
<select @bind="@currAzienda" class="form-select">
|
||||
@if (ListAziende != null)
|
||||
{
|
||||
foreach (var item in ListAziende.Where(x => x.CodGruppo != "*").ToList())
|
||||
{
|
||||
<option value="@item.CodGruppo">@item.DescrGruppo</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
else if (currRecordOdl != null)
|
||||
{
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-header bg-primary text-light">Modifica ODL</div>
|
||||
<div class="card-body">
|
||||
@*<div class="row">
|
||||
<div class="col-4">
|
||||
<div class="input-group">
|
||||
<span class="input-group-text">Codice</span>
|
||||
<input type="text" class="form-control" placeholder="Articolo" @bind-value="@currRecord.CodArticolo">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="input-group">
|
||||
<span class="input-group-text">Disegno</span>
|
||||
<input type="text" class="form-control" placeholder="Disegno" @bind-value="@currRecord.Disegno">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-1">
|
||||
<div class="input-group" title="Tipo">
|
||||
<select @bind="@currRecord.Tipo" class="form-select text-end">
|
||||
@if (ListTipoArt != null)
|
||||
{
|
||||
foreach (var item in ListTipoArt)
|
||||
{
|
||||
<option value="@item.value">@item.label</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<div class="input-group" title="Azienda">
|
||||
<select @bind="@currRecord.Azienda" class="form-select text-end">
|
||||
@if (ListAziende != null)
|
||||
{
|
||||
foreach (var item in ListAziende.Where(x => x.CodGruppo != "*").ToList())
|
||||
{
|
||||
<option value="@item.CodGruppo">@item.DescrGruppo</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-2">
|
||||
<div class="col-8">
|
||||
<input type="text" class="form-control" placeholder="Descrizione Articolo" @bind-value="@currRecord.DescArticolo">
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<div class="d-grid gap-2">
|
||||
<button class="btn btn-warning" @onclick="() => cancel()">Annulla <i class="bi bi-x-circle"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<div class="d-grid gap-2">
|
||||
<button class="btn btn-success" @onclick="() => update(currRecord)">Salva <i class="bi bi-save"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>*@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
else if (currRecordPOdl != null)
|
||||
{
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-header bg-primary text-light">Modifica PODL</div>
|
||||
<div class="card-body">
|
||||
|
||||
@*<div class="row">
|
||||
<div class="col-4">
|
||||
<div class="input-group">
|
||||
<span class="input-group-text">Codice</span>
|
||||
<input type="text" class="form-control" placeholder="Articolo" @bind-value="@currRecord.CodArticolo">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="input-group">
|
||||
<span class="input-group-text">Disegno</span>
|
||||
<input type="text" class="form-control" placeholder="Disegno" @bind-value="@currRecord.Disegno">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-1">
|
||||
<div class="input-group" title="Tipo">
|
||||
<select @bind="@currRecord.Tipo" class="form-select text-end">
|
||||
@if (ListTipoArt != null)
|
||||
{
|
||||
foreach (var item in ListTipoArt)
|
||||
{
|
||||
<option value="@item.value">@item.label</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<div class="input-group" title="Azienda">
|
||||
<select @bind="@currRecord.Azienda" class="form-select text-end">
|
||||
@if (ListAziende != null)
|
||||
{
|
||||
foreach (var item in ListAziende.Where(x => x.CodGruppo != "*").ToList())
|
||||
{
|
||||
<option value="@item.CodGruppo">@item.DescrGruppo</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-2">
|
||||
<div class="col-8">
|
||||
<input type="text" class="form-control" placeholder="Descrizione Articolo" @bind-value="@currRecord.DescArticolo">
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<div class="d-grid gap-2">
|
||||
<button class="btn btn-warning" @onclick="() => cancel()">Annulla <i class="bi bi-x-circle"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<div class="d-grid gap-2">
|
||||
<button class="btn btn-success" @onclick="() => update(currRecord)">Salva <i class="bi bi-save"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>*@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<ListODL StatoSel="@selStato" PagerResetReq="pgResetReq"></ListODL>
|
||||
<ListODL StatoSel="@selStato" PagerResetReq="pgResetReq"></ListODL>
|
||||
</div>
|
||||
<div class="card-footer py-1">
|
||||
<DataPager @ref="pagerODL" PageSize="numRecord" currPage="currPage" numRecordChanged="ForceReload" numPageChanged="ForceReloadPage" totalCount="totalCount" showLoading="isLoading" />
|
||||
|
||||
+21
-101
@@ -7,19 +7,22 @@ namespace MP.SPEC.Pages
|
||||
{
|
||||
public partial class ODL
|
||||
{
|
||||
#region Protected Fields
|
||||
|
||||
protected DataPager pagerODL;
|
||||
|
||||
#endregion Protected Fields
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
[Inject]
|
||||
protected IJSRuntime JSRuntime { get; set; }
|
||||
protected IJSRuntime JSRuntime { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected MpDataService MDService { get; set; }
|
||||
protected MpDataService MDService { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected MessageService MsgService { get; set; }
|
||||
|
||||
[Inject]
|
||||
protected NavigationManager NavManager { get; set; }
|
||||
protected MessageService MsgService { get; set; } = null!;
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
@@ -35,54 +38,6 @@ namespace MP.SPEC.Pages
|
||||
currPage = newNum;
|
||||
}
|
||||
|
||||
protected async Task pgResetReq(bool doReset)
|
||||
{
|
||||
if (doReset)
|
||||
{
|
||||
await pagerODL.resetCurrPage();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private MP.Data.DatabaseModels.ODLModel? currRecordOdl = null;
|
||||
private MP.Data.DatabaseModels.PODLModel? currRecordPOdl = null;
|
||||
|
||||
/// <summary>
|
||||
/// Crea nuovo record e va in editing...
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected async Task addNew()
|
||||
{
|
||||
currRecordPOdl = new MP.Data.DatabaseModels.PODLModel()
|
||||
{
|
||||
CodArticolo = $"_NEW_{DateTime.Now:yyyyMMdd.HHmmss}"
|
||||
};
|
||||
await Task.Delay(1);
|
||||
}
|
||||
|
||||
protected async Task cancel()
|
||||
{
|
||||
currRecordOdl = null;
|
||||
currRecordPOdl = null;
|
||||
await reloadData();
|
||||
await Task.Delay(1);
|
||||
}
|
||||
|
||||
protected DataPager pagerODL;
|
||||
|
||||
protected bool reqNew = false;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Crea nuovo record e va in editing...
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected async Task reqNewPODL()
|
||||
{
|
||||
reqNew = !reqNew;
|
||||
await Task.Delay(1);
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
// abilito ricerca...
|
||||
@@ -95,20 +50,29 @@ namespace MP.SPEC.Pages
|
||||
await reloadData();
|
||||
}
|
||||
|
||||
private string currAzienda { get; set; } = "*";
|
||||
|
||||
private List<MP.Data.DatabaseModels.AnagGruppi>? ListAziende;
|
||||
protected async Task pgResetReq(bool doReset)
|
||||
{
|
||||
if (doReset)
|
||||
{
|
||||
await pagerODL.resetCurrPage();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private MP.Data.DatabaseModels.ODLModel? currRecordOdl = null;
|
||||
private MP.Data.DatabaseModels.PODLModel? currRecordPOdl = null;
|
||||
private List<MP.Data.DatabaseModels.AnagGruppi>? ListAziende;
|
||||
private List<MP.Data.DatabaseModels.ListValues>? ListStati;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Properties
|
||||
|
||||
private string currAzienda { get; set; } = "*";
|
||||
|
||||
private int currPage
|
||||
{
|
||||
get => MsgService.currPage;
|
||||
@@ -124,37 +88,6 @@ namespace MP.SPEC.Pages
|
||||
}
|
||||
|
||||
private string selStato { get; set; } = "*";
|
||||
#if false
|
||||
private string selStato
|
||||
{
|
||||
get => _selStato;
|
||||
set
|
||||
{
|
||||
if (!_selStato.Equals(value))
|
||||
{
|
||||
_selStato = value;
|
||||
addEnabled = selStato != "*";
|
||||
////StateHasChanged();
|
||||
//var pUpd = Task.Run(async () =>
|
||||
//{
|
||||
// //await reloadData();
|
||||
// await Task.Delay(1);
|
||||
// await InvokeAsync(() => StateHasChanged());
|
||||
//});
|
||||
//pUpd.Wait();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
//private bool showODL { get; set; } = false;
|
||||
|
||||
private bool addEnabled = false;
|
||||
|
||||
//private string textToggle
|
||||
//{
|
||||
// get => showODL ? "In Corso" : "Programmati";
|
||||
//}
|
||||
|
||||
private int totalCount
|
||||
{
|
||||
@@ -173,19 +106,6 @@ namespace MP.SPEC.Pages
|
||||
isLoading = false;
|
||||
}
|
||||
|
||||
//private async Task toggleCurrent()
|
||||
//{
|
||||
// //NavManager.NavigateTo("/PODL");
|
||||
// showODL = !showODL;
|
||||
// await Task.Delay(1);
|
||||
//}
|
||||
private async Task navToPODL()
|
||||
{
|
||||
NavManager.NavigateTo("/PODL");
|
||||
//showODL = !showODL;
|
||||
await Task.Delay(1);
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -29,6 +29,7 @@ namespace MP.SPEC.Pages
|
||||
protected void ForceReloadPage(int newNum)
|
||||
{
|
||||
currPage = newNum;
|
||||
currFilter.lastUpdate= $"Last Snapshot: {DateTime.Now:yyyy/MM/dd HH:mm:ss}";
|
||||
currFilter.LiveUpdate = (currPage == 1);
|
||||
StateHasChanged();
|
||||
}
|
||||
@@ -105,7 +106,6 @@ namespace MP.SPEC.Pages
|
||||
{
|
||||
newParams.CurrPage = 1;
|
||||
newParams.LiveUpdate = false;
|
||||
//newParams.lastUpdate = $"Last Snapshot: {DateTime.Now:yyyy/MM/dd HH:mm:ss}";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo MAPOSPEC </i>
|
||||
<h4>Versione: 6.15.2209.1614</h4>
|
||||
<h4>Versione: 6.15.2209.1615</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
6.15.2209.1614
|
||||
6.15.2209.1615
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>6.15.2209.1614</version>
|
||||
<version>6.15.2209.1615</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