Ancora updat eprocesso edit PMTask
This commit is contained in:
@@ -11,15 +11,15 @@
|
||||
<DataAnnotationsValidator />
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-10">
|
||||
<div class="form-row">
|
||||
<div class="col-6 col-lg-4">
|
||||
<div class="row">
|
||||
<div class="col-6 col-lg-3">
|
||||
<div class="input-group input-group-sm">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">
|
||||
Topic
|
||||
</span>
|
||||
</div>
|
||||
<select @bind="@_currItem.PMTCode" class="form-control form-control-sm">
|
||||
<select @bind="@_currItem.PMTCode" class="form-select form-select-sm">
|
||||
@if (ListTopics != null)
|
||||
{
|
||||
foreach (var item in ListTopics)
|
||||
@@ -30,14 +30,14 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 col-lg-4">
|
||||
<div class="col-6 col-lg-3">
|
||||
<div class="input-group input-group-sm">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">
|
||||
Machine Group
|
||||
Mach.Group
|
||||
</span>
|
||||
</div>
|
||||
<select @bind="@_currItem.PMMGCode" class="form-control form-control-sm">
|
||||
<select @bind="@_currItem.PMMGCode" class="form-select form-select-sm">
|
||||
@if (ListMachGroup != null)
|
||||
{
|
||||
foreach (var item in ListMachGroup)
|
||||
@@ -48,14 +48,14 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 col-lg-4">
|
||||
<div class="col-6 col-lg-3">
|
||||
<div class="input-group input-group-sm">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">
|
||||
Team
|
||||
</span>
|
||||
</div>
|
||||
<select @bind="@_currItem.PMUTCode" class="form-control form-control-sm">
|
||||
<select @bind="@_currItem.PMUTCode" class="form-select form-select-sm">
|
||||
@if (ListUserTeam != null)
|
||||
{
|
||||
foreach (var item in ListUserTeam)
|
||||
@@ -66,14 +66,14 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 col-lg-4">
|
||||
<div class="col-6 col-lg-3">
|
||||
<div class="input-group input-group-sm">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">
|
||||
Counter
|
||||
</span>
|
||||
</div>
|
||||
<select @bind="@_currItem.CCode" class="form-control form-control-sm">
|
||||
<select @bind="@_currItem.CCode" class="form-select form-select-sm">
|
||||
@if (ListCounters != null)
|
||||
{
|
||||
foreach (var item in ListCounters)
|
||||
@@ -84,57 +84,43 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@*<div class="col-6 col-lg-4">
|
||||
<div class="input-group input-group-sm" title="Numero Licenze">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">
|
||||
Team
|
||||
</span>
|
||||
</div>
|
||||
<InputNumber @bind-Value="@_currItem.PMUTCode" class="form-control"></InputNumber>
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">
|
||||
Scadenza
|
||||
</span>
|
||||
</div>
|
||||
<InputDate @bind-Value="@_currItem.Scadenza" class="form-control"></InputDate>
|
||||
</div>
|
||||
</div>*@
|
||||
</div>
|
||||
<div class="form-row mt-2">
|
||||
<div class="col-6 col-lg-6">
|
||||
<div class="row mt-2">
|
||||
<div class="col-6 col-lg-2">
|
||||
<div class="input-group input-group-sm">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">
|
||||
Descrizione
|
||||
ID
|
||||
</span>
|
||||
</div>
|
||||
@*<InputText @bind-Value="@_currItem.Descrizione" class="form-control"></InputText>*@
|
||||
<InputNumber @bind-Value="@_currItem.ExtIdx" class="form-control"></InputNumber>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 col-lg-6">
|
||||
<div class="col-6 col-lg-2">
|
||||
<div class="input-group input-group-sm">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">
|
||||
<i class="fas fa-key"></i>
|
||||
Expiry H
|
||||
</span>
|
||||
</div>
|
||||
@*<InputText @bind-Value="@_currItem.Chiave" class="form-control" readonly></InputText>
|
||||
@if (!_currItem.IsValid)
|
||||
{
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text text-danger">
|
||||
<i class="fas fa-exclamation-triangle"></i>
|
||||
</span>
|
||||
<InputNumber @bind-Value="@_currItem.ExpiryVal" class="form-control"></InputNumber>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-8">
|
||||
<div class="input-group input-group-sm">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">
|
||||
Job Description
|
||||
</span>
|
||||
</div>
|
||||
}*@
|
||||
<InputText @bind-Value="@_currItem.JobDescription" class="form-control"></InputText>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-2">
|
||||
<button type="button" class="btn btn-sm btn-warning btn-block" value="Cancel" @onclick="cancelUpdate">Cancel <i class="fas fa-ban"></i></button>
|
||||
<div class="mt-2">
|
||||
<div class="d-grid">
|
||||
<button type="button" class="btn btn-sm btn-warning btn-block mb-2" value="Cancel" @onclick="cancelUpdate">Cancel <i class="fas fa-ban"></i></button>
|
||||
@if (!_currItem.IsValid)
|
||||
{
|
||||
<button type="button" class="btn btn-sm btn-success btn-block" value="Save" @onclick="saveUpdate">Save <i class="far fa-save"></i></button>
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
{
|
||||
@if (showAddNew)
|
||||
{
|
||||
<EditMaintTask currItem="@currRec"></EditMaintTask>
|
||||
<EditMaintTask currItem="@currRec" DataReset="() => ResetData()" DataUpdated="() => UpdateActivData()"></EditMaintTask>
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -160,6 +160,21 @@ namespace MP.MONO.UI.Components
|
||||
currPage = newNum;
|
||||
}
|
||||
|
||||
protected async Task ResetData()
|
||||
{
|
||||
showAddNew = false;
|
||||
currRec = null;
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
protected async Task UpdateActivData()
|
||||
{
|
||||
int currTaskId = currRec.PMTaskId;
|
||||
await ReloadData();
|
||||
currRec = ListRecords.Where(x => x.PMTaskId == currTaskId).FirstOrDefault();
|
||||
showAddNew = false;
|
||||
}
|
||||
|
||||
private async Task ReloadData()
|
||||
{
|
||||
isLoading = true;
|
||||
|
||||
Reference in New Issue
Block a user