SPEC:
- aggiunta gestione show/hide dettaglio ordini
This commit is contained in:
@@ -38,10 +38,8 @@
|
||||
<th><i class="fa-solid fa-object-group"></i> Kit ID</th>
|
||||
<th><i class="fa-solid fa-sitemap"></i> Cod Kit</th>
|
||||
<th><i class="fa-solid fa-hashtag"></i> Qty Kit</th>
|
||||
<th><i class="fa-solid fa-circle-info"></i> Dettaglio PODL/Articoli</th>
|
||||
@* <th><i class="fa-solid fa-file"></i> Articolo (Child)</th>
|
||||
<th><i class="fa-solid fa-hashtag"></i> Qty Art</th> *@
|
||||
<th></th>
|
||||
<th class="text-end"><i class="fa-solid fa-circle-info"></i> Dettaglio PODL/Articoli <button class="btn btn-sm @cssDetail" @onclick=ToggleDetail><i class="fa-solid @iconDetail"></i></button></th>
|
||||
<th class="text-end"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -63,26 +61,41 @@
|
||||
<td>
|
||||
<div>@record.NumPezzi</div>
|
||||
</td>
|
||||
<td>
|
||||
@foreach (var recDet in ListDetIK(record.IdxPromessa))
|
||||
<td class="text-end">
|
||||
@if (ShowAllDet)
|
||||
{
|
||||
<div class="d-flex justify-content-between">
|
||||
<div class="px-1">@recDet.KeyExtOrd</div>
|
||||
<div class="px-1">ART: @recDet.CodArtChild x @recDet.QtyART</div>
|
||||
</div>
|
||||
<table class="table table-sm table-striped small shadow">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>PODL</th>
|
||||
<th>Cod Ord</th>
|
||||
<th>Cod Art</th>
|
||||
<th class="text-end">Qty</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var recDet in ListDetIK(record.IdxPromessa))
|
||||
{
|
||||
<tr>
|
||||
<th>@recDet.IdxPodlChild</th>
|
||||
<th>@recDet.KeyExtOrd</th>
|
||||
<th>@recDet.CodArtChild</th>
|
||||
<th class="text-end">@recDet.QtyART</th>
|
||||
</tr>
|
||||
// <div class="d-flex justify-content-between">
|
||||
// <div class="px-1">@recDet.KeyExtOrd</div>
|
||||
// <div class="px-1">ART: @recDet.CodArtChild x @recDet.QtyART</div>
|
||||
// </div>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span><b>@ListDetIKCount(record.IdxPromessa)</b> ordini</span>
|
||||
}
|
||||
</td>
|
||||
@*
|
||||
<td>
|
||||
<div>@record.KeyExtOrd</div>
|
||||
</td>
|
||||
<td>
|
||||
<div>@record.CodArtChild</div>
|
||||
</td>
|
||||
<td>
|
||||
<div>@record.QtyART</div>
|
||||
</td>*@
|
||||
<td>
|
||||
<td class="text-end">
|
||||
@if (DelEnabled(record))
|
||||
{
|
||||
<button @onclick="() => DoDelete(record)" class="btn btn-danger btn-sm"><i class="bi bi-trash-fill"></i></button>
|
||||
|
||||
@@ -311,12 +311,50 @@ namespace MP.SPEC.Components.ProdKit
|
||||
/// <returns></returns>
|
||||
private List<IstanzeKitModel> ListDetIK(int idxPODL)
|
||||
{
|
||||
List<IstanzeKitModel> filtList = IstKitRecords
|
||||
List<IstanzeKitModel> answ = IstKitRecords
|
||||
.Where(x => x.IdxPodlParent == idxPODL)
|
||||
.ToList();
|
||||
return filtList;
|
||||
return answ;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Conteggio record dettaglio IK dato IdxPODL
|
||||
/// </summary>
|
||||
/// <param name="idxPODL"></param>
|
||||
/// <returns></returns>
|
||||
private int ListDetIKCount(int idxPODL)
|
||||
{
|
||||
int answ = IstKitRecords
|
||||
.Where(x => x.IdxPodlParent == idxPODL)
|
||||
.Count();
|
||||
return answ;
|
||||
}
|
||||
|
||||
private void ToggleDetail()
|
||||
{
|
||||
ShowAllDet = !ShowAllDet;
|
||||
}
|
||||
|
||||
private string cssDetail
|
||||
{
|
||||
get => ShowAllDet ? "btn-secondary" : "btn-primary";
|
||||
}
|
||||
private string iconDetail
|
||||
{
|
||||
get => ShowAllDet ? "fa-chevron-up" : "fa-chevron-down";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// mostra tutti i dettagli delle istanze x PODL
|
||||
/// </summary>
|
||||
private bool ShowAllDet = false;
|
||||
|
||||
/// <summary>
|
||||
/// Elenco singoli podl esplosi
|
||||
/// </summary>
|
||||
private List<int> ListPodlExpl = new List<int>();
|
||||
|
||||
/// <summary>
|
||||
/// Toggle modale ricerca articoli
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user