diff --git a/MP-TAB3/Components/CurrOdlDetail.razor b/MP-TAB3/Components/CurrOdlDetail.razor
index d42d3702..dca1043f 100644
--- a/MP-TAB3/Components/CurrOdlDetail.razor
+++ b/MP-TAB3/Components/CurrOdlDetail.razor
@@ -90,7 +90,7 @@
{
@if (CheckIsKit(CurrOdl.CodArticolo))
{
-
+
}
@CurrOdl.DescArticolo
}
@@ -98,7 +98,7 @@
{
@if (CheckIsKit(CurrPodl.CodArticolo))
{
-
+
}
@CurrPodl.DescArticolo
}
diff --git a/MP.SPEC/Components/ListODL.razor b/MP.SPEC/Components/ListODL.razor
index 3abd6733..88a163d2 100644
--- a/MP.SPEC/Components/ListODL.razor
+++ b/MP.SPEC/Components/ListODL.razor
@@ -1,5 +1,4 @@
-
-@if (ListRecords == null)
+@if (ListRecords == null)
{
}
@@ -10,6 +9,10 @@ else if (totalCount == 0)
else
{
+ @if (showKitDetail)
+ {
+
+ }
@if (currRecord != null && !showStats && isCurrOdl)
{
@@ -102,7 +105,13 @@ else
- @record.CodArticolo
+
+ @record.CodArticolo
+ @if (CheckIsKit(record.CodArticolo))
+ {
+
+ }
+
@record.DescArticolo
|
diff --git a/MP.SPEC/Components/ListODL.razor.cs b/MP.SPEC/Components/ListODL.razor.cs
index 48ba8531..2b9dbc00 100644
--- a/MP.SPEC/Components/ListODL.razor.cs
+++ b/MP.SPEC/Components/ListODL.razor.cs
@@ -182,6 +182,7 @@ namespace MP.SPEC.Components
protected override async Task OnInitializedAsync()
{
ListStati = await MDService.AnagStatiComm();
+ ListArtKit = MDService.ArticoliGetByTipo("KIT", "*");
string SPEC_PODL_gest = await MDService.ConfigTryGetAsync("SPEC_PODL_gest");
if (!string.IsNullOrEmpty(SPEC_PODL_gest))
{
@@ -368,5 +369,42 @@ namespace MP.SPEC.Components
}
#endregion Private Methods
+
+ ///
+ /// Verifica se sia un articolo di tipo "KIT" x mostrare show dettaglio
+ ///
+ ///
+ ///
+ protected bool CheckIsKit(string CodArticolo)
+ {
+ bool answ = false;
+ if (ListArtKit != null && ListArtKit.Count > 0)
+ {
+ answ = ListArtKit.Count(x => x.CodArticolo == CodArticolo) > 0;
+ }
+ return answ;
+ }
+ protected void KitToggleDetail(string? selCodArt)
+ {
+ CodArtParent = selCodArt ?? "";
+ if (!string.IsNullOrEmpty(CodArtParent))
+ {
+ ListKitTemplate = MDService.TemplateKitFilt(CodArtParent, "");
+ }
+ else
+ {
+ ListKitTemplate = null;
+ }
+ showKitDetail = !showKitDetail;
+ }
+
+ ///
+ /// Elenco articoli tipo KIT
+ ///
+ private List? ListArtKit;
+
+ private List? ListKitTemplate = null;
+ private bool showKitDetail = false;
+ private string CodArtParent = "";
}
}
\ No newline at end of file
diff --git a/MP.SPEC/Components/ListPODL.razor b/MP.SPEC/Components/ListPODL.razor
index 5dc8eae3..90d57359 100644
--- a/MP.SPEC/Components/ListPODL.razor
+++ b/MP.SPEC/Components/ListPODL.razor
@@ -1,5 +1,4 @@
@using MP.SPEC.Components
-@using MP.SPEC.Components.ProdKit
@using MP.SPEC.Data
@if (ListRecords == null || isLoading)
@@ -16,7 +15,7 @@ else
@if (showKitDetail)
{
-
+
}
@@ -118,7 +117,7 @@ else
@record.CodArticolo
@if (CheckIsKit(record.CodArticolo))
{
-
+
}
@record.DescArticolo
|