104 lines
5.4 KiB
Plaintext
104 lines
5.4 KiB
Plaintext
@inherits BaseComp
|
|
|
|
|
|
@if (isLoading || ListRecords == null)
|
|
{
|
|
<LoadingData></LoadingData>
|
|
}
|
|
else if (totalCount == 0)
|
|
{
|
|
<div class="alert alert-info text-center display-4">@Traduci("noRecord")</div>
|
|
}
|
|
else
|
|
{
|
|
<table class="table table-sm table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th class="col-1">
|
|
<button class="btn btn-sm btn-primary" title="@Traduci("reset")" @onclick="DoReset"><i class="fa-solid fa-arrow-rotate-right"></i></button>
|
|
</th>
|
|
@if (selRecord == null)
|
|
{
|
|
<th class="col-1 text-center">@Traduci("ord")</th>
|
|
<th class="col-4">@Traduci("descrizione")</th>
|
|
<th class="col-1 text-center">@Traduci("cicli_fasi")</th>
|
|
<th class="col-2 text-center">@Traduci("cicli_tags")</th>
|
|
<th class="col-2 text-center">@Traduci("cicli_drivers")</th>
|
|
}
|
|
else
|
|
{
|
|
<th>@Traduci("descrizione")</th>
|
|
}
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var item in ListRecords)
|
|
{
|
|
string cssBtnUp = editRecord == null && item.Index > 1 ? "btn-outline-primary" : "btn-outline-secondary opacity-50 disabled";
|
|
string cssBtnDown = editRecord == null && item.Index < totalCount ? "btn-outline-primary" : "btn-outline-secondary opacity-50 disabled";
|
|
|
|
<tr class="@checkSel(item)">
|
|
@if (selRecord != null)
|
|
{
|
|
<td class="text-start text-nowrap">
|
|
<button class="btn btn-sm btn-primary" @onclick="() => DoSelect(item)"><i class="fa-solid fa-magnifying-glass"></i></button>
|
|
</td>
|
|
<td>@item.Description</td>
|
|
}
|
|
else
|
|
{
|
|
<td class="text-start text-nowrap">
|
|
<button class="btn btn-sm btn-primary me-2" @onclick="() => DoSelect(item)"><i class="fa-solid fa-magnifying-glass"></i></button>
|
|
@if (item.Equals(editRecord))
|
|
{
|
|
<button class="btn btn-sm btn-info" @onclick="() => DoEdit(item)" disabled><i class="fa-solid fa-pencil"></i></button>
|
|
}
|
|
else
|
|
{
|
|
<button class="btn btn-sm btn-info" @onclick="() => DoEdit(item)"><i class="fa-solid fa-pencil"></i></button>
|
|
}
|
|
</td>
|
|
<td class="text-nowrap text-center">
|
|
<button class="btn @cssBtnUp btn-sm fa-solid fa-caret-up" @onclick="() => MoveRec(item, true)"></button>
|
|
@item.Index
|
|
<button class="btn @cssBtnDown btn-sm fa-solid fa-caret-down" @onclick="() => MoveRec(item, false)"></button>
|
|
</td>
|
|
@if (item.Equals(editRecord))
|
|
{
|
|
<td>
|
|
<div class="input-group">
|
|
<button class="btn btn-sm btn-success" @onclick="() => DoSave(item)"><i class="fa-solid fa-floppy-disk"></i></button>
|
|
<input type="text" class="form-control" @bind="@item.Description" />
|
|
<button class="btn btn-sm btn-warning" @onclick="() => DoCancel()"><i class="fa-solid fa-ban"></i></button>
|
|
</div>
|
|
</td>
|
|
}
|
|
else
|
|
{
|
|
<td>@item.Description</td>
|
|
}
|
|
<td class="text-center">@item.NumChild</td>
|
|
<td class="text-center">
|
|
<TagDisplay ParentId="@item.JobID" AllTagsList="ListAllTags" EnableEdit="true" ParentDescrption="@item.Description" ActiveTagsList="@item.TagList" DisplayAs="TagDisplay.TagMode.pill" EC_ReqSave="DoSaveTags"></TagDisplay>
|
|
</td>
|
|
<td class="text-center">
|
|
<TagDisplay AllTagsList="ListCostDrivers" EnableEdit="false" ActiveTagsList="@ListDriversName(item)" BaseCss="bg-primary bg-gradient bg-opacity-50 text-dark" DisplayAs="TagDisplay.TagMode.pill"></TagDisplay>
|
|
</td>
|
|
<td class="text-end">
|
|
@if (item.Lock || item.NumChild > 0)
|
|
{
|
|
<button class="btn btn-sm btn-secondary opacity-50" disabled title="@Traduci("childCorrelati")"><i class="fa-solid fa-trash-can"></i></button>
|
|
}
|
|
else
|
|
{
|
|
<button class="btn btn-sm btn-danger" @onclick="() => DoDelete(item)"><i class="fa-solid fa-trash-can"></i></button>
|
|
}
|
|
</td>
|
|
}
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
}
|
|
|
|
<BootstrapModal @ref=Modal Title=@mTitle Message=@mMessage Mode="mMode" UserOptions=@modalOpt></BootstrapModal> |