- Fix visualizzazione post update dei vari componenti
This commit is contained in:
Samuele Locatelli
2025-04-11 19:47:53 +02:00
parent 97852fc5bf
commit 5e76d56abe
4 changed files with 14 additions and 24 deletions
@@ -7,12 +7,18 @@ namespace MP.SPEC.Components.ProdKit
{
public partial class GestKitPodl : ComponentBase, IDisposable
{
#region Public Properties
[Parameter]
public List<IstanzeKitModel> SearchRecords { get; set; } = new List<IstanzeKitModel>();
#endregion Public Properties
#region Public Methods
public void Dispose()
{
EditRecord = null;
SearchRecords = null;
ListRecords = null;
GC.Collect();
}
@@ -84,9 +90,8 @@ namespace MP.SPEC.Components.ProdKit
return answ;
}
/// <summary>
/// Verifica eliminabilità del record: se è avviato il PODL non è liminabile...
/// Verifica eliminabilit del record: se avviato il PODL non liminabile...
/// </summary>
/// <param name="reqRec"></param>
/// <returns></returns>
@@ -150,22 +155,6 @@ namespace MP.SPEC.Components.ProdKit
}
}
#if false
protected override void OnAfterRender(bool firstRender)
{
if (firstRender)
{
if (OptAdmKitEnabled)
{
doReset();
}
}
//base.OnAfterRender(firstRender);
}
#endif
protected override void OnParametersSet()
{
ReloadData();
@@ -219,7 +208,6 @@ namespace MP.SPEC.Components.ProdKit
private bool doSearchArt = false;
private IstanzeKitModel? EditRecord = null;
private List<IstanzeKitModel>? ListRecords;
private int minChar = 2;
@@ -244,7 +232,6 @@ namespace MP.SPEC.Components.ProdKit
/// </summary>
private string regExp_OK = "#ROK";
private List<IstanzeKitModel>? SearchRecords;
#endregion Private Fields
@@ -293,7 +280,6 @@ namespace MP.SPEC.Components.ProdKit
private void ReloadData()
{
isLoading = true;
SearchRecords = MDService.IstKitFilt("", "");
totalCount = SearchRecords.Count;
// conto i kit = distinct...
kitCount = SearchRecords.GroupBy(x => x.CodArtParent).Count();
@@ -326,6 +312,5 @@ namespace MP.SPEC.Components.ProdKit
}
#endregion Private Methods
}
}
@@ -58,6 +58,9 @@ namespace MP.SPEC.Components.ProdKit
/// <param name="currRec">Record selezionato da generare x Assieme/KIT</param>
private async Task DoCreatePOdl(TksScoreModel currRec)
{
if (!await JSRuntime.InvokeAsync<bool>("confirm", "Confermi di voler creare il PODL del KIT selezionato?"))
return;
// eseguo stored...
bool fatto = MDService.IstKitInsertByWKS(currRec.CodArtParent, KeyFilt);
if (fatto)
+1 -1
View File
@@ -20,7 +20,7 @@
</div>
}
<div class="@KPColClass mb-1 px-1">
<GestKitPodl></GestKitPodl>
<GestKitPodl SearchRecords="@listIKP"></GestKitPodl>
</div>
}
</div>
@@ -87,6 +87,7 @@ namespace MP.SPEC.Components.ProdKit
private List<PODLExpModel> listPODL = new List<PODLExpModel>();
private List<TksScoreModel> listTSM = new List<TksScoreModel>();
private List<WipSetupKitModel> listWSM = new List<WipSetupKitModel>();
private List<IstanzeKitModel> listIKP = new List<IstanzeKitModel>();
private string padCodXdl = "00000";
#endregion Private Fields
@@ -108,6 +109,7 @@ namespace MP.SPEC.Components.ProdKit
listPODL = new List<PODLExpModel>();
listWSM = MDService.WipKitFilt(keyFilt);
listTSM = MDService.TksScore(keyFilt, 1000, true);
listIKP = MDService.IstKitFilt("", "");
// verifico se ho score 100%...
var recMaxScore = listTSM
.Where(x => x.TotalScore == 1)