108 lines
4.8 KiB
Plaintext
108 lines
4.8 KiB
Plaintext
<div class="card">
|
|
<div class="card-header">
|
|
<div class="d-flex justify-content-between">
|
|
<div class="px-2">
|
|
<div class="d-flex">
|
|
<div class="px-0">
|
|
<h3>Alias Materiali</h3>
|
|
</div>
|
|
<div class="px-2">
|
|
<div class="form-check form-switch">
|
|
<input class="form-check-input" type="checkbox" role="switch" @bind="OnlyActive">
|
|
<label class="form-check-label">@actMessage</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="px-2">
|
|
@if (CurrItem == null)
|
|
{
|
|
<button class="btn btn-success px-3" @onclick="()=>CreateNew()"><i class="fa-solid fa-square-plus"></i> Add New</button>
|
|
}
|
|
else
|
|
{
|
|
<button class="btn btn-warning px-5" @onclick="()=> ForceReload(true)"><i class="fa-solid fa-ban"></i> Cancel</button>
|
|
}
|
|
</div>
|
|
</div>
|
|
@if (CurrItem != null)
|
|
{
|
|
<hr />
|
|
<AliasEdit CurrRecord="CurrItem" KeyNum="@KeyNum" EC_update="ForceReload"></AliasEdit>
|
|
}
|
|
</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="() => ForceReload(true)"><i class="fa-solid fa-rotate"></i></button>
|
|
</th>
|
|
<th>Valore Originale (file) <Sorter ParamName="ValOrig" IsAsc="@sortAsc" CurrParam="@sortField" sortReq="SortRequested"></Sorter></th>
|
|
<th>Valore Alias (magazzino) <Sorter ParamName="ValOrig" IsAsc="@sortAsc" CurrParam="@sortField" sortReq="SortRequested"></Sorter></th>
|
|
<AuthorizeView Roles="SuperAdmin, Admin, SuperUser">
|
|
<Authorized>
|
|
<th></th>
|
|
</Authorized>
|
|
</AuthorizeView>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var item in ListRecords)
|
|
{
|
|
<tr class="align-middle @rowCss(item)">
|
|
<td>
|
|
@if (CurrItem == null)
|
|
{
|
|
<button class="btn btn-primary btn-sm" @onclick="() => DoSelect(item)"><i class="fa-solid fa-edit"></i></button>
|
|
}
|
|
else
|
|
{
|
|
<button class="btn btn-secondary btn-sm" disabled><i class="fa-solid fa-search"></i></button>
|
|
<button class="btn btn-secondary btn-sm" disabled><i class="fa-solid fa-edit"></i></button>
|
|
}
|
|
</td>
|
|
<td>
|
|
@item.ValueOriginal
|
|
</td>
|
|
<td>
|
|
@item.ValueAlias
|
|
</td>
|
|
<AuthorizeView Roles="SuperAdmin, Admin">
|
|
<Authorized>
|
|
<td class="text-end">
|
|
@if (item.IsActive)
|
|
{
|
|
<button class="btn btn-danger btn-sm" @onclick="() => DeleteRecord(item)"><i class="fa-solid fa-trash"></i></button>
|
|
}
|
|
else
|
|
{
|
|
<button class="btn btn-secondary btn-sm" disabled><i class="fa-solid fa-trash"></i></button>
|
|
}
|
|
</td>
|
|
</Authorized>
|
|
</AuthorizeView>
|
|
</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>
|
|
|
|
|