131 lines
6.1 KiB
Plaintext
131 lines
6.1 KiB
Plaintext
<div class="card">
|
|
<div class="card-header">
|
|
<div class="d-flex justify-content-between">
|
|
<div class="px-2">
|
|
<h3>Materiali</h3>
|
|
</div>
|
|
<div class="px-2">
|
|
<div class="d-flex">
|
|
<div class="px-2">
|
|
@if (CurrItem == null)
|
|
{
|
|
<button class="btn btn-success" @onclick="()=>CreateNew()"><i class="fa-solid fa-square-plus"></i> Add New</button>
|
|
}
|
|
else
|
|
{
|
|
<button class="btn btn-warning" @onclick="()=> DoEdit(null)"><i class="fa-solid fa-ban"></i> Cancel</button>
|
|
}
|
|
</div>
|
|
<div class="px-2">
|
|
<div class="input-group">
|
|
<span class="input-group-text" id="basic-addon1">Tipo Mat.</span>
|
|
<select class="form-select" @bind="@FiltType">
|
|
<option value="0">--- Tutti ---</option>
|
|
<option value="1">Beam</option>
|
|
<option value="2">Wall</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@if (CurrItem != null)
|
|
{
|
|
<hr />
|
|
<MaterialEdit CurrRecord="CurrItem" EC_update="ForceReload"></MaterialEdit>
|
|
}
|
|
</div>
|
|
<div class="card-body p-1">
|
|
@if (ListRecords == null || isLoading)
|
|
{
|
|
<EgwCoreLib.Razor.LoadingData></EgwCoreLib.Razor.LoadingData>
|
|
}
|
|
else if (totalCount == 0)
|
|
{
|
|
<div class="alert alert-info">Nessun record trovato</div>
|
|
}
|
|
else
|
|
{
|
|
<table class="table table-striped table-sm text-start">
|
|
<thead>
|
|
<tr class="">
|
|
<th>
|
|
<button class="btn btn-primary btn-sm" @onclick="() => DoEdit(null)"><i class="fa-solid fa-rotate"></i></button>
|
|
</th>
|
|
<th>ID <Sorter ParamName="MatId" IsAsc="@sortAsc" CurrParam="@sortField" sortReq="SortRequested"></Sorter></th>
|
|
<th>Mat.Code <Sorter ParamName="MatCode" IsAsc="@sortAsc" CurrParam="@sortField" sortReq="SortRequested"></Sorter></th>
|
|
<th>Descr. <Sorter ParamName="MatDesc" IsAsc="@sortAsc" CurrParam="@sortField" sortReq="SortRequested"></Sorter></th>
|
|
<th class="text-end"><Sorter ParamName="W" IsAsc="@sortAsc" CurrParam="@sortField" sortReq="SortRequested"></Sorter> W (mm)</th>
|
|
<th class="text-end"><Sorter ParamName="H" IsAsc="@sortAsc" CurrParam="@sortField" sortReq="SortRequested"></Sorter> H (mm)</th>
|
|
@if (MaterialId == 0)
|
|
{
|
|
<th class="text-end"><Sorter ParamName="SizeNum" IsAsc="@sortAsc" CurrParam="@sortField" sortReq="SortRequested"></Sorter> Var.</th>
|
|
<th class="text-end"><Sorter ParamName="QtyTot" IsAsc="@sortAsc" CurrParam="@sortField" sortReq="SortRequested"></Sorter> Qty</th>
|
|
}
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var item in ListRecords)
|
|
{
|
|
<tr class="align-middle @CheckSel(item)">
|
|
<td>
|
|
<button class="btn btn-info btn-sm" @onclick="() => DoSelect(item)"><i class="fa-solid fa-search"></i></button>
|
|
<button class="btn btn-primary btn-sm" @onclick="() => DoEdit(item)"><i class="fa-solid fa-edit"></i></button>
|
|
</td>
|
|
<td>
|
|
@if (item.IsBeam)
|
|
{
|
|
<span class="border border-primary rounded px-1">
|
|
<i class="fa-solid fa-lines-leaning"></i>
|
|
</span>
|
|
}
|
|
else if (@item.IsWall)
|
|
{
|
|
<span class="border border-info rounded px-1">
|
|
<i class="fa-solid fa-draw-polygon"></i>
|
|
</span>
|
|
}
|
|
@item.MatCloudId
|
|
</td>
|
|
<td>
|
|
@item.MatCode
|
|
</td>
|
|
<td>
|
|
@item.MatDesc
|
|
</td>
|
|
<td class="text-end">
|
|
@if (item.IsBeam)
|
|
{
|
|
@($"{item.WMm:N2}")
|
|
}
|
|
else
|
|
{
|
|
<span>-</span>
|
|
}
|
|
</td>
|
|
<td class="text-end">
|
|
@($"{item.HMm:N2}")
|
|
</td>
|
|
@if (MaterialId == 0)
|
|
{
|
|
<td class="text-end">
|
|
@item.SizeNum
|
|
</td>
|
|
<td class="text-end">
|
|
@item.QtyTot
|
|
</td>
|
|
}
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
}
|
|
|
|
</div>
|
|
<div class="card-footer">
|
|
<EgwCoreLib.Razor.DataPager PageSize="@numRecord" currPage="@currPage" numRecordChanged="SetNumRec" numPageChanged="SetPage" totalCount="@totalCount" showLoading="@isLoading"></EgwCoreLib.Razor.DataPager>
|
|
</div>
|
|
</div>
|
|
|
|
|