Files
mapo-core/MP.SPEC/Components/ProdKit/KitDetailModal.razor
T
Samuele Locatelli 45aac2c576 SPEC:
- aggiunta dettaglio composizione KIT
2025-05-10 17:11:47 +02:00

80 lines
2.8 KiB
Plaintext

<dialog class="modal fade show" tabindex="-1" style="display:block; background-color: rgba(10,10,10,.6);" aria-modal="true" role="dialog">
<div class="modal-dialog shadow shadow-lg">
<div class="modal-content p-2">
<div class="modal-title d-flex justify-content-between">
<div class="px-0">
<h4>Dettaglio KIT <b>@CodArtParent</b></h4>
</div>
<div class="px-0">
<button class="btn btn-outline-dark" @onclick="() => ReqClose()"><i class="fa-solid fa-xmark"></i></button>
</div>
</div>
<div class="modal-body px-1">
@if (ListRecords == null)
{
<LoadingData></LoadingData>
}
else if (totalKitCount == 0)
{
<div class="alert alert-warning text-center display-4">
Nessun record trovato
</div>
}
else
{
<table class="table table-sm table-striped">
<thead>
<tr>
<th><i class="fa-solid fa-sitemap"></i> Cod Kit (Parent)</th>
<th><i class="fa-solid fa-file"></i> Articolo (Child)</th>
<th class="text-end"><i class="fa-solid fa-hashtag"></i> Art/Kit Qty</th>
</tr>
</thead>
<tbody>
@foreach (var record in ListRecords)
{
<tr>
<td>
@record.CodArtParent
</td>
<td>
@record.CodArtChild
</td>
<td class="text-end">
<div>@record.Qty</div>
</td>
</tr>
}
</tbody>
</table>
}
</div>
</div>
</div>
</dialog>
@code {
[Parameter]
public string CodArtParent { get; set; } = "";
[Parameter]
public EventCallback<bool> EC_Close { get; set; }
[Parameter]
public List<TemplateKitModel>? ListRecords { get; set; } = null;
protected override void OnParametersSet()
{
// base.OnParametersSet();
totalKitCount = ListRecords != null ? ListRecords.Count() : 0;
}
private int totalKitCount = 0;
protected async void ReqClose()
{
await EC_Close.InvokeAsync(true);
}
}