Files
mapo-mono/MP.MONO.UI/Components/SchedMaintTask.razor
T
2022-06-11 11:14:13 +02:00

85 lines
3.4 KiB
Plaintext

@using MP.MONO.Data
@using MP.MONO.UI.Components
@using MP.MONO.Core.DTO
@using MP.MONO.UI.Data
@inject CurrentDataService MMDataService
<div class="card">
<div class="card-header">
<div class="d-flex justify-content-between">
<div class="p-2">
<h5>Scheduled Maintenance's Task</h5>
</div>
<div class="p-2">
<div class="form-check form-check-sm form-switch" title="Show Closed">
<input class="form-check-input" type="checkbox" id="filClosed" name="filtShowCompleted" value="@showCompleted" unchecked @onclick="() => ToggleCompleted()">
<label class="form-check-label" for="filClosed">Show Completed</label>
</div>
</div>
<div class="px-2">
<div class="input-group">
<span class="input-group-text" title="Limit visualization to event expirying in the next hour period">Period</span>
<input type="text" class="form-control" placeholder="Expiry Hour Window">
<button class="btn btn-primary" @onclick="() => RegenTask()">Refresh <i class="bi bi-tools"></i></button>
</div>
</div>
@*<div class="px-2">
</div>*@
</div>
</div>
<div class="card-body">
@if (ListRecords == null)
{
<LoadingData></LoadingData>
}
else if (totalCount == 0)
{
<div class="alert alert-warning text-center display-4">No record found</div>
}
else
{
<table class="table table-sm table-striped table-responsive-lg small">
<thead>
<tr>
<th>ID</th>
<th>Created</th>
<th>Topic</th>
<th>Machine Group</th>
<th>Rem. Hours</th>
<th>Team in Charge</th>
<th>Counter Var</th>
<th>Job Description</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach (var record in ListRecords)
{
<tr>
<td>@record.PMTaskeNav.ExtIdx</td>
<td>@record.DtCreation.ToString("yyyy-MM-dd HH:mm:ss")</td>
<td>@record.PMTaskeNav.TopicNav.Description</td>
<td>@record.PMTaskeNav.MachGroupNav.Description</td>
<td style="width: 8rem;"><ProgBar currVal="@record.CountRemainVal" maxVal="@record.ExpiryVal"></ProgBar></td>
<td>@record.PMTaskeNav.UserTeamNav.Description</td>
<td>@record.CounterNav.Description</td>
<td>@record.PMTaskeNav.JobDescription</td>
<td>
@*..buttons...*@
</td>
</tr>
}
</tbody>
</table>
}
</div>
<div class="card-footer py-0">
<DataPager PageSize="numRecord" currPage="currPage" numRecordChanged="ForceReload" numPageChanged="ForceReloadPage" totalCount="totalCount" showLoading="isLoading" />
</div>
</div>