- fix display dettagli solo se presenti
- fix col spacing - aggiunta warng signal
This commit is contained in:
@@ -461,7 +461,7 @@ namespace MP.MONO.Data.Controllers
|
||||
dbResult = localDbCtx
|
||||
.DbSetSMTask
|
||||
.Include(i => i.CounterNav)
|
||||
.Where(x => x.PMTaskeNav.MachineId == MachineId && x.PMTaskId == PMTaskId)
|
||||
.Where(x => x.PMTaskeNav.MachineId == MachineId && x.PMTaskId == PMTaskId && x.DtExecution > DateTime.MinValue)
|
||||
.Include(m => m.PMTaskeNav.MachGroupNav)
|
||||
.Include(m => m.CounterNav)
|
||||
.Include(m => m.PMTaskeNav.MachineNav)
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
<div class="small row">
|
||||
<div class="col-4">
|
||||
<p>...deve mostrare quelli in scadenza nel periodo richiesto, es 10/15 gg...</p>
|
||||
@if (@ListRecords != null && ListRecords.Count > 0)
|
||||
{
|
||||
<ul class="list-group">
|
||||
@@ -21,7 +20,6 @@
|
||||
</div>
|
||||
</li>
|
||||
}
|
||||
<li class="list-group-item list-group-item-action">...Calendar???</li>
|
||||
</ul>
|
||||
}
|
||||
else
|
||||
|
||||
@@ -33,13 +33,14 @@
|
||||
<th>Team in Charge</th>
|
||||
<th>Counter Var</th>
|
||||
<th>Job Description</th>
|
||||
<th class="text-end"># Exec</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var record in ListRecords)
|
||||
{
|
||||
<tr>
|
||||
<tr class="@checkSel(record.PMTaskId)">
|
||||
<td class="text-nowrap">
|
||||
@record.ExtIdx
|
||||
</td>
|
||||
@@ -49,8 +50,15 @@
|
||||
<td>@record.UserTeamNav.Description</td>
|
||||
<td>@record.CounterNav.Description</td>
|
||||
<td>@record.JobDescription</td>
|
||||
@if (currPMTaskId == 0)
|
||||
{
|
||||
<td class="text-end">@record.NumTaskDone</td>
|
||||
}
|
||||
<td>
|
||||
<button class="btn btn-success btn-sm" @onclick="() => ShowDetail(record.PMTaskId)" title="Show History">Hist <i class="bi bi-clock-history"></i></button>
|
||||
@if (record.NumTaskDone > 0)
|
||||
{
|
||||
<button class="btn btn-success btn-sm" @onclick="() => ShowDetail(record.PMTaskId)" title="Show History"><i class="bi bi-clock-history"></i></button>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
@@ -59,7 +67,7 @@
|
||||
</div>
|
||||
@if (currPMTaskId > 0)
|
||||
{
|
||||
<div class="col-3 small">
|
||||
<div class="col-4 small">
|
||||
<SchedMaintTaskHist currPMTaskId="@currPMTaskId" reqClose="() => ShowDetail(0)"></SchedMaintTaskHist>
|
||||
</div>
|
||||
}
|
||||
|
||||
@@ -32,6 +32,7 @@ namespace MP.MONO.UI.Components
|
||||
{
|
||||
if (_currPage != value)
|
||||
{
|
||||
currPMTaskId = 0;
|
||||
_currPage = value;
|
||||
var pUpd = Task.Run(async () => await ReloadData());
|
||||
pUpd.Wait();
|
||||
@@ -45,7 +46,7 @@ namespace MP.MONO.UI.Components
|
||||
|
||||
private string mainCssClass
|
||||
{
|
||||
get => currPMTaskId == 0 ? "col-12" : "col-9";
|
||||
get => currPMTaskId == 0 ? "col-12" : "col-8";
|
||||
}
|
||||
|
||||
private int MaxRecord
|
||||
@@ -72,6 +73,7 @@ namespace MP.MONO.UI.Components
|
||||
{
|
||||
if (_numRecord != value)
|
||||
{
|
||||
currPMTaskId = 0;
|
||||
_numRecord = value;
|
||||
var pUpd = Task.Run(async () => await ReloadData());
|
||||
pUpd.Wait();
|
||||
@@ -105,6 +107,11 @@ namespace MP.MONO.UI.Components
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private string checkSel(int PMTaskId)
|
||||
{
|
||||
return PMTaskId == currPMTaskId ? "table-primary" : "";
|
||||
}
|
||||
|
||||
private void ForceReload(int newNum)
|
||||
{
|
||||
numRecord = newNum;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div class="text-center @textStyle">
|
||||
<b>@currVal.ToString("N0")</b>
|
||||
<span class="@warnClass"><i class="bi bi-exclamation-triangle-fill"></i></span> <b>@currVal.ToString("N0")</b> <span class="@warnClass"><i class="bi bi-exclamation-triangle-fill"></i></span>
|
||||
</div>
|
||||
<div class="progress">
|
||||
<div class="progress-bar @bgStyle" style="width:@(percWidth)%">@(percWidth)%</div>
|
||||
|
||||
@@ -26,10 +26,6 @@ namespace MP.MONO.UI.Components
|
||||
{
|
||||
get => $"bg-{currStyle}";
|
||||
}
|
||||
private string textStyle
|
||||
{
|
||||
get => $"text-{currStyle}";
|
||||
}
|
||||
|
||||
private string currStyle
|
||||
{
|
||||
@@ -55,6 +51,16 @@ namespace MP.MONO.UI.Components
|
||||
|
||||
private int percWidth { get => (int)(100 * currVal / maxVal); }
|
||||
|
||||
private string textStyle
|
||||
{
|
||||
get => $"text-{currStyle}";
|
||||
}
|
||||
|
||||
private string warnClass
|
||||
{
|
||||
get => currVal > 0 ? "d-none" : "text-danger";
|
||||
}
|
||||
|
||||
#endregion Private Properties
|
||||
}
|
||||
}
|
||||
@@ -7,12 +7,12 @@
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<div class="card-header bg-primary text-light">
|
||||
<div class="d-flex justify-content-between">
|
||||
<div class="p-2">
|
||||
<div class="px-2">
|
||||
<h5>Task history</h5>
|
||||
</div>
|
||||
<div class="p-2">
|
||||
<div class="px-2">
|
||||
<button class="btn btn-success btn-sm" @onclick="() => CloseDet()" title="Close History">Close <i class="bi bi-x-circle"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -33,26 +33,19 @@
|
||||
<tr>
|
||||
<th>Operator</th>
|
||||
<th>Execution</th>
|
||||
<th title="Elapsed/ Prev" class="text-end">H</th>
|
||||
<th title="Elapsed/ Prev" class="text-end">Hours</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var record in ListRecords)
|
||||
{
|
||||
<tr>
|
||||
@*<td>@record.DtCreation.ToString("yyyy-MM-dd HH:mm:ss")</td>*@
|
||||
<td>@record.UserCode</td>
|
||||
<td>
|
||||
@if (@record.DtExecution > DateTime.MinValue)
|
||||
{
|
||||
@record.DtExecution.ToString("yyyy-MM-dd HH:mm")
|
||||
}
|
||||
@record.DtExecution.ToString("yyyy-MM-dd HH:mm:ss")
|
||||
</td>
|
||||
<td class="text-end" title="Elapsed / Programmed">
|
||||
@if (@record.DtExecution > DateTime.MinValue)
|
||||
{
|
||||
<div><b>@record.ElapsedVal.ToString("N0")</b>/@record.ExpiryVal</div>
|
||||
}
|
||||
<div><b>@record.ElapsedVal.ToString("N0")</b>/@record.ExpiryVal</div>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<div class="px-2">
|
||||
<div class="form-check form-check-sm form-switch" title="Setup Maintenance Task">
|
||||
<input class="form-check-input" type="checkbox" id="mySwitch" name="setupMaintTask" value="@doSetup" unchecked @onclick="() => SetupPMTask()">
|
||||
<label class="form-check-label" for="mySwitch">Setup</label>
|
||||
<label class="form-check-label" for="mySwitch">Show Maintenance Task Config</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user