Update gestione editing fasi/key richeista

This commit is contained in:
Samuele Locatelli
2022-09-13 16:51:13 +02:00
parent 31ed8b2edb
commit 385c5cf7ea
4 changed files with 41 additions and 14 deletions
+2 -4
View File
@@ -20,12 +20,11 @@ else
<button @onclick="() => resetSel()" class="btn btn-primary btn-sm"><i class="bi bi-arrow-counterclockwise"></i></button>
</th>
<th>Articolo</th>
<th>Fase</th>
<th>Macchina</th>
<th># pz</th>
<th>T.Ciclo</th>
<th>Note</th>
<th>Fase</th>
<th>Richiesta</th>
<th></th>
</tr>
</thead>
@@ -39,6 +38,7 @@ else
<td>
@record.CodArticolo
</td>
<td>@tradFase(record.KeyRichiesta)</td>
<td>
@record.IdxMacchina
</td>
@@ -49,8 +49,6 @@ else
@record.Tcassegnato.ToString("N3")
</td>
<td>@record.Note</td>
<td>@record.CodFase</td>
<td>@record.KeyRichiesta</td>
<td>
@*@if (ArticoloDelEnabled(record.CodArticolo))
{
+17 -3
View File
@@ -67,6 +67,7 @@ namespace MP.SPEC.Components
MsgService.EA_PageUpdated += MessageService_EA_PageUpdated;
MsgService.EA_SearchUpdated += OnSeachUpdated;
MsgService.EA_StatoSearch += MsgService_EA_StatoSearch;
ListStati = await MDService.AnagStatiComm();
await reloadData();
}
@@ -152,9 +153,22 @@ namespace MP.SPEC.Components
});
}
#if false
private string _statoSel = "*";
#endif
private string tradFase(string codFase)
{
string answ = codFase;
if (ListStati != null && ListStati.Count > 0)
{
var recSel = ListStati.FirstOrDefault(x => x.value == codFase);
if (recSel != null)
{
answ = recSel.label;
}
}
return answ;
}
private List<MP.Data.DatabaseModels.ListValues>? ListStati;
private async Task reloadData()
{
+21 -6
View File
@@ -71,6 +71,25 @@
</div>
</div>
</div>
<div class="col-3">
</div>
<div class="col-3">
<div class="input-group input-group-sm">
<span class="input-group-text" id="inputGroup-sizing-sm">Fase</span>
<select @bind="@currRecord.KeyRichiesta" class="form-select">
@if (ListStati != null)
{
foreach (var item in ListStati)
{
<option value="@item.value">@item.label</option>
}
}
</select>
</div>
</div>
</div>
<div class="row mt-2">
<div class="col-3">
<div class="input-group input-group-sm">
<span class="input-group-text">Gruppo</span>
@@ -83,16 +102,12 @@
<input type="text" class="form-control" placeholder="Macchina" @bind-value="@currRecord.IdxMacchina">
</div>
</div>
</div>
<div class="row mt-2">
<div class="col-8">
</div>
<div class="col-2">
<div class="col-3">
<div class="d-grid gap-2">
<button class="btn btn-warning" @onclick="() => cancel()">Annulla <i class="bi bi-x-circle"></i></button>
</div>
</div>
<div class="col-2">
<div class="col-3">
<div class="d-grid gap-2">
<button class="btn btn-success" @onclick="() => update(currRecord)">Salva <i class="bi bi-save"></i></button>
</div>