SPEC:
- Aggiunto filtro lanciati o meno
This commit is contained in:
@@ -2,7 +2,18 @@
|
||||
<div class="card-header bg-danger text-light">
|
||||
<div class="d-flex justify-content-between">
|
||||
<div class="px-0">
|
||||
<h4>KIT e Promesse</h4>
|
||||
<div class="d-flex">
|
||||
<div class="px-0">
|
||||
<h4>KIT e Promesse</h4>
|
||||
</div>
|
||||
<div class="input-group-text mx-2 small">
|
||||
<span class="me-1" title="Elenco PODL disponibili da produrre">Da Produrre</span>
|
||||
<div class="form-check form-check-sm form-switch py-0" title="Display PODL: Solo Da Produrre / Lanciati">
|
||||
<input class="form-check-input" type="checkbox" name="setupAlarms" @onclick="()=> toggleClosed()">
|
||||
</div>
|
||||
<span class="" title="Elenco PODL già lanciati/prodotti">Lanciati</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="px-0">
|
||||
Attenzione: non associare OPR a più KIT!
|
||||
@@ -28,12 +39,6 @@
|
||||
<table class="table table-sm table-striped small">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@if (EditRecord != null)
|
||||
{
|
||||
<button @onclick="() => ResetSel()" class="btn btn-primary btn-sm"><i class="bi bi-arrow-counterclockwise"></i></button>
|
||||
}
|
||||
</th>
|
||||
<th><i class="fa-solid fa-key"></i> PODL</th>
|
||||
<th><i class="fa-solid fa-object-group"></i> Kit ID</th>
|
||||
<th><i class="fa-solid fa-sitemap"></i> Templ. Kit</th>
|
||||
@@ -45,10 +50,7 @@
|
||||
<tbody>
|
||||
@foreach (var record in ListRecordsPODL)
|
||||
{
|
||||
<tr class="@checkSelect(record)">
|
||||
<td>
|
||||
<button @onclick="() => ShowDetail(record)" class="btn btn-primary btn-sm" title="Seleziona Record"><i class="bi bi-search"></i></button>
|
||||
</td>
|
||||
<tr>
|
||||
<td>
|
||||
<div>@record.IdxPromessa</div>
|
||||
</td>
|
||||
|
||||
@@ -9,6 +9,9 @@ namespace MP.SPEC.Components.ProdKit
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<bool> EC_HasOdl { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<bool> EC_ListUpdated { get; set; }
|
||||
|
||||
@@ -24,7 +27,6 @@ namespace MP.SPEC.Components.ProdKit
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
EditRecord = null;
|
||||
ListRecordsPODL = null;
|
||||
GC.Collect();
|
||||
}
|
||||
@@ -72,21 +74,6 @@ namespace MP.SPEC.Components.ProdKit
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected string checkSelect(PODLExpModel currRec)
|
||||
{
|
||||
string answ = "";
|
||||
if (EditRecord != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
answ = (EditRecord.IdxPromessa == currRec.IdxPromessa) ? "table-info" : "";
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
protected bool DelEnabled(PODLExpModel reqRec)
|
||||
{
|
||||
bool answ = reqRec.IdxOdl == 0;
|
||||
@@ -100,7 +87,6 @@ namespace MP.SPEC.Components.ProdKit
|
||||
/// <returns></returns>
|
||||
protected async Task DoCancel()
|
||||
{
|
||||
EditRecord = null;
|
||||
ReloadData();
|
||||
await Task.Delay(1);
|
||||
}
|
||||
@@ -117,7 +103,6 @@ namespace MP.SPEC.Components.ProdKit
|
||||
|
||||
// da provare...
|
||||
var done = MDService.PodlIstKitDelete(selRec.IdxPromessa);
|
||||
EditRecord = null;
|
||||
ReloadData();
|
||||
await EC_ListUpdated.InvokeAsync(true);
|
||||
}
|
||||
@@ -157,27 +142,12 @@ namespace MP.SPEC.Components.ProdKit
|
||||
ReloadData();
|
||||
}
|
||||
|
||||
protected void ResetData()
|
||||
{
|
||||
EditRecord = null;
|
||||
}
|
||||
|
||||
protected void ResetParent()
|
||||
{
|
||||
SearchComm = "";
|
||||
ReloadData();
|
||||
}
|
||||
|
||||
protected void ResetSel()
|
||||
{
|
||||
EditRecord = null;
|
||||
}
|
||||
|
||||
protected void SelRecord(PODLExpModel selRec)
|
||||
{
|
||||
EditRecord = selRec;
|
||||
}
|
||||
|
||||
protected void SetNumPage(int newNum)
|
||||
{
|
||||
currPage = newNum;
|
||||
@@ -197,9 +167,14 @@ namespace MP.SPEC.Components.ProdKit
|
||||
}
|
||||
}
|
||||
|
||||
protected async Task toggleClosed()
|
||||
{
|
||||
hasOdl = !hasOdl;
|
||||
await EC_HasOdl.InvokeAsync(hasOdl);
|
||||
}
|
||||
|
||||
protected void UpdateData()
|
||||
{
|
||||
EditRecord = null;
|
||||
ReloadData();
|
||||
}
|
||||
|
||||
@@ -212,8 +187,6 @@ namespace MP.SPEC.Components.ProdKit
|
||||
/// </summary>
|
||||
private bool doSearchArt = false;
|
||||
|
||||
private PODLExpModel? EditRecord = null;
|
||||
|
||||
/// <summary>
|
||||
/// Elenco singoli podl esplosi
|
||||
/// </summary>
|
||||
@@ -253,7 +226,6 @@ namespace MP.SPEC.Components.ProdKit
|
||||
#region Private Properties
|
||||
|
||||
private int _currPage { get; set; } = 1;
|
||||
|
||||
private int _numRecord { get; set; } = 10;
|
||||
|
||||
private string cssDetail
|
||||
@@ -274,6 +246,8 @@ namespace MP.SPEC.Components.ProdKit
|
||||
}
|
||||
}
|
||||
|
||||
private bool hasOdl { get; set; } = false;
|
||||
|
||||
private string iconDetail
|
||||
{
|
||||
get => ShowAllDet ? "fa-chevron-up" : "fa-chevron-down";
|
||||
@@ -335,7 +309,8 @@ namespace MP.SPEC.Components.ProdKit
|
||||
ListRecordsPODL = new List<PODLExpModel>();
|
||||
|
||||
ListRecordsPODL = PodlRecords
|
||||
.Where(x => !string.IsNullOrEmpty(x.KeyRichiesta) && x.Attivabile && x.KeyRichiesta.StartsWith("KIT"))
|
||||
//.Where(x => !string.IsNullOrEmpty(x.KeyRichiesta))
|
||||
.Where(x => !string.IsNullOrEmpty(x.KeyRichiesta) && x.KeyRichiesta.StartsWith("KIT"))
|
||||
.Skip(numRecord * (currPage - 1))
|
||||
.Take(numRecord)
|
||||
.ToList();
|
||||
@@ -345,30 +320,6 @@ namespace MP.SPEC.Components.ProdKit
|
||||
isLoading = false;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Toggle modale ricerca articoli
|
||||
/// </summary>
|
||||
private void SearchArtToggle()
|
||||
{
|
||||
doSearchArt = !doSearchArt;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Salva selezione articolo
|
||||
/// </summary>
|
||||
/// <param name="codArt"></param>
|
||||
private void SetCodArtChild(string codArt)
|
||||
{
|
||||
if (EditRecord != null)
|
||||
{
|
||||
#if false
|
||||
EditRecord.CodArtChild = codArt;
|
||||
doSearchArt = false;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
private void ToggleDetail()
|
||||
{
|
||||
ShowAllDet = !ShowAllDet;
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</div>
|
||||
}
|
||||
<div class="@KPColClass mb-1 px-1">
|
||||
<GestKitPodl PodlRecords="@listPOdlAct" IstKitRecords="@listIKP" EC_ListUpdated="ForceReloadData"></GestKitPodl>
|
||||
<GestKitPodl PodlRecords="@listPOdlAct" IstKitRecords="@listIKP" EC_ListUpdated="ForceReloadData" EC_HasOdl="SetHasOdl"></GestKitPodl>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
@@ -164,6 +164,13 @@ namespace MP.SPEC.Components.ProdKit
|
||||
await EC_IsComposing.InvokeAsync(false);
|
||||
}
|
||||
|
||||
private async Task SetHasOdl(bool setHasOdl)
|
||||
{
|
||||
ActFilt.HasOdl = setHasOdl;
|
||||
await EC_FiltUpdated.InvokeAsync(ActFilt);
|
||||
ReloadData();
|
||||
}
|
||||
|
||||
private async Task ForceReset()
|
||||
{
|
||||
// svuoto filtro
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<div class="px-2 input-group input-group-sm">
|
||||
<div class="input-group-text">
|
||||
<span class="me-1" title="Elenco PODL disponibili da produrre">Da Produrre</span>
|
||||
<div class="form-check form-check-sm form-switch py-1" title="Parameter View Mode (RealTime / LogData)">
|
||||
<div class="form-check form-check-sm form-switch py-1" title="Modalità display (Disponibili / Lanciati)">
|
||||
<input class="form-check-input" type="checkbox" name="setupAlarms" @onclick="()=> toggleClosed()">
|
||||
</div>
|
||||
<span class="" title="Elenco PODL già lanciati/prodotti">Lanciati</span>
|
||||
|
||||
Reference in New Issue
Block a user